void http_callback_auth(httpd *webserver, request *r)
{
t_client *client;
httpVar * token;
char *mac;
httpVar *logout = httpdGetVariableByName(r, "logout");
if (wx_link_wifi == 1) {
debug(LOG_DEBUG, "#####http_callback_auth#######: %s/%s\r\n", r->request.host, r->request.path);
return;
}
t_client *client;
httpVar * token;
char *mac;
httpVar *logout = httpdGetVariableByName(r, "logout");
if (wx_link_wifi == 1) {
debug(LOG_DEBUG, "#####http_callback_auth#######: %s/%s\r\n", r->request.host, r->request.path);
return;
}
debug(LOG_DEBUG, "!!!!http_callback_auth!!!\n");
/*
检查http 报文里有没有token*/
if ((token = httpdGetVariableByName(r, "token"))) {
/* They supplied variable "token" */
/*
然后通过arp_get 拿该报文发送者的ip 对应的MAC 地址*/
if (!(mac = arp_get(r->clientAddr))) {
/* We could not get their MAC address */
debug(LOG_ERR, "Failed to retrieve MAC address for ip %s", r->clientAddr);
send_http_page(r, "WiFiDog Error", "Failed to retrieve your MAC address");
} else {
/* We have their MA
/* We could not get their MAC address */
debug(LOG_ERR, "Failed to retrieve MAC address for ip %s", r->clientAddr);
send_http_page(r, "WiFiDog Error", "Failed to retrieve your MAC address");
} else {
/* We have their MA

最低0.47元/天 解锁文章
1164

被折叠的 条评论
为什么被折叠?



