/*
This file is part of actube.
actube is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
libcapwap is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Foobar. If not, see .
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include "actube.h"
#include "wtplist.h"
#include "capwap/dtls.h"
#include "capwap/cw_log.h"
#include "conf.h"
#include "capwap/sock.h"
#include "socklist.h"
#include "db.h"
#include "capwap/capwap_items.h"
#include "capwap/capwap_cisco.h"
#include "ac.h"
#include "capwap/format.h"
int ac_run();
void alive_thread(void *data)
{
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; imax)
max=socklist[i].sockfd;
}
/* wait for an event */
int n;
while((n=select(max+1, &fset, NULL, NULL, NULL)) < 0) {
if (errno != EINTR)
return n;
}
/* process the received packet */
for( i=0; i