diff --git a/src/ac/ac_main.c b/src/ac/ac_main.c index a141ec7c..f2987ef4 100644 --- a/src/ac/ac_main.c +++ b/src/ac/ac_main.c @@ -39,142 +39,78 @@ #include "capwap/capwap_items.h" #include "capwap/capwap_cisco.h" #include "capwap/capwap_80211.h" +#include "capwap/action.h" +#include "capwap/capwap_crypto.h" +#include "capwap/mbag.h" + #include "ac.h" #include "capwap/format.h" int ac_run(); -void * alive_thread(void *data) + +static void * alive_thread(void *data) { + /* Ping the database every 5 seconds */ while(1){ sleep(5); db_ping(); } } -#include "capwap/action.h" - - -/* -int readelem_vendor_specific_payload(struct conn *conn,struct cw_action * a,uint8_t *data,int len) -{ - cw_action_t as,*af; - as = *a; - - as.vendor_id = cw_get_dword(data); - as.elem_id = cw_get_word(data+4); - printf("Vendor Specific: %d, %d\n",as.vendor_id,as.elem_id); - - af = cw_actionlist_get(conn->msgtr,&as); - - - - if (!af) { - printf("Msg unknown\n"); - return 0; - } - - printf("Found\n"); - - if (af->start) { - af->start(conn,af,data+6,len-6); - } - - - return 1; -} -*/ - - -/* -int readelem_cisco_rad_name(struct conn *conn,struct cw_action * a,uint8_t *data,int len) -{ - printf("Here is the rad name reader\n"); - int i; - - for (i=0; i