More work on CW VM code ..
FossilOrigin-Name: 3b0cb324535527b32d0e938b03151c75f6100ca2059fc121e2c4d350a8caf8a4
This commit is contained in:
@ -11,7 +11,7 @@ ifndef ARCH
|
||||
endif
|
||||
|
||||
LDFLAGS+=-g -D_REENTRANT -L/usr/local/lib -L../capwap/$(ARCH)
|
||||
CFLAGS += -Wall -g -O0 -D_REENTRANT -DIPV6 -I/usr/local/include -I../
|
||||
CFLAGS += -Wall -g -O3 -D_REENTRANT -DIPV6 -I/usr/local/include -I../
|
||||
|
||||
|
||||
LIBS+=-lcapwap
|
||||
|
@ -104,7 +104,7 @@ int ac_global_init()
|
||||
// cw_itemstore_set_avltree(ac_config, CW_ITEM_AC_IP_LIST, aciplist);
|
||||
|
||||
|
||||
cw_itemstore_set_fun(ac_config, CW_ITEM_CAPWAP_CONTROL_IP_LIST, get_iplist,release_iplist,(void*)771);
|
||||
cw_itemstore_set_fun(ac_config, CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST, get_iplist,release_iplist,(void*)771);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -105,7 +105,29 @@ int readelem_cisco_rad_name(struct conn *conn,struct cw_action * a,uint8_t *data
|
||||
|
||||
int main (int argc, const char * argv[])
|
||||
{
|
||||
/*
|
||||
intavltree_t t = intavltree_create();
|
||||
int i;
|
||||
for (i=0; i<100; i++){
|
||||
intavltree_add(t,i);
|
||||
}
|
||||
|
||||
avliter_t iter;
|
||||
avliter_init(&iter,t);
|
||||
int *val;
|
||||
|
||||
|
||||
for (avliter_seek_set(&iter); val = avliter_get(&iter); avliter_next(&iter)){
|
||||
|
||||
|
||||
printf("Val is: %d\n",*val);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
exit(0);
|
||||
*/
|
||||
cw_log_name="AC-Tube";
|
||||
|
||||
read_config("ac.conf");
|
||||
|
@ -117,15 +117,15 @@ static void wtpman_run_discovery(void *arg)
|
||||
*/
|
||||
|
||||
|
||||
wtpman->conn->local = ac_config;
|
||||
wtpman->conn->remote = cw_itemstore_create();
|
||||
wtpman->conn->outgoing = ac_config;
|
||||
wtpman->conn->incomming = cw_itemstore_create();
|
||||
|
||||
while (!cw_timer_timeout(timer)
|
||||
&& wtpman->conn->capwap_state == CW_STATE_DISCOVERY) {
|
||||
cw_read_messages(wtpman->conn);
|
||||
}
|
||||
|
||||
struct cw_item *wn = cw_itemstore_get(wtpman->conn->remote, CW_ITEM_WTP_NAME);
|
||||
struct cw_item *wn = cw_itemstore_get(wtpman->conn->incomming, CW_ITEM_WTP_NAME);
|
||||
|
||||
if (wn) {
|
||||
printf("WTP Name: %s\n", wn->data);
|
||||
@ -282,8 +282,8 @@ static int wtpman_join(void *arg, time_t timer)
|
||||
|
||||
// wtpman->conn->itemstore = cw_itemstore_create();
|
||||
|
||||
wtpman->conn->local = ac_config;
|
||||
wtpman->conn->remote = cw_itemstore_create();
|
||||
wtpman->conn->outgoing = ac_config;
|
||||
wtpman->conn->incomming = cw_itemstore_create();
|
||||
|
||||
while (!cw_timer_timeout(timer) && wtpman->conn->capwap_state == CW_STATE_JOIN) {
|
||||
int rc = cw_read_messages(wtpman->conn);
|
||||
@ -305,7 +305,7 @@ static int wtpman_join(void *arg, time_t timer)
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
static int wtpman_send_image_file(struct wtpman *wtpman, struct cwrmsg *cwrmsg)
|
||||
{
|
||||
struct cwimage_data data;
|
||||
@ -343,6 +343,7 @@ static int wtpman_send_image_file(struct wtpman *wtpman, struct cwrmsg *cwrmsg)
|
||||
return 0;
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
static void wtpman_run(void *arg)
|
||||
{
|
||||
|
Reference in New Issue
Block a user