doc/developer/PingProtocol

Version 1 (modified by datamile, 13 years ago)

--

Ping Protocol

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.

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

http://auth_sever/ping/index.php?
gw_id=%s
sys_uptime=%lu
sys_memfree=%u
sys_load=%.2f
wifidog_uptime=%lu

With the data gathered via system calls on the wifidog client.

Headers
HTTP/1.0\r\n" 
"User-Agent: WiFiDog %s\r\n" 
"Host: %s\r\n" 
"\r\n",

To this the auth server is expected to respond with an http message containing the word "Pong".