| 1 | == Ping Protocol == |
| 2 | |
| 3 | |
| 4 | Wifidog uses the ping protocol as a heartbeat mechanism to send current status information to the auth server. This enables central logging of the status for each node at the auth server, and perhaps in future two way communications between the auth server and the node to centrally co-ordinate walled-garden settings etc. |
| 5 | |
| 6 | The wifidog client uses a setting in the conf file to periodically start a thread ( ping_thread.c ) to send a status message via http to the auth server. The message format is |
| 7 | |
| 8 | |
| 9 | {{{ |
| 10 | http://auth_sever/ping/index.php? |
| 11 | gw_id=%s |
| 12 | sys_uptime=%lu |
| 13 | sys_memfree=%u |
| 14 | sys_load=%.2f |
| 15 | wifidog_uptime=%lu |
| 16 | }}} |
| 17 | |
| 18 | With the data gathered via system calls on the wifidog client. |
| 19 | |
| 20 | {{{ |
| 21 | Headers |
| 22 | HTTP/1.0\r\n" |
| 23 | "User-Agent: WiFiDog %s\r\n" |
| 24 | "Host: %s\r\n" |
| 25 | "\r\n", |
| 26 | }}} |
| 27 | |
| 28 | |
| 29 | To this the auth server is expected to respond with an http message containing the word "Pong". |
| 30 | |
| 31 | |