More Cisco and LWAP specific stuff added.
WTP cann connect to a WLC and wait for and dump config update requests. FossilOrigin-Name: 5b69ac4d9fd9f9a54395fe24de3456fff3bb76458d64c863d3cb7245dbda629c
This commit is contained in:
@ -16,6 +16,13 @@ int configure()
|
||||
|
||||
int rc = cw_readmsg_configuration_status_response(cwrmsg->msgelems,cwrmsg->msgelems_len);
|
||||
|
||||
exit(0);
|
||||
printf("Chage Sate\n");
|
||||
cw_prepare_change_state_event_request(conn,rip,wtpinfo);
|
||||
cwrmsg = conn_send_request(conn);
|
||||
|
||||
|
||||
printf("Got change resp %p\n",cwrmsg);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "capwap/cw_log.h"
|
||||
#include "capwap/dtls.h"
|
||||
#include "capwap/sock.h"
|
||||
#include "capwap/cw_util.h"
|
||||
|
||||
|
||||
#include "wtp_conf.h"
|
||||
@ -73,6 +74,9 @@ int run(struct conn * conn)
|
||||
struct radioinfo radioinfo;
|
||||
memset(&radioinfo,0,sizeof(radioinfo));
|
||||
|
||||
|
||||
struct cwrmsg * cwrmsg;
|
||||
|
||||
echo_interval_timer=time(NULL);
|
||||
while (1){
|
||||
if (time(NULL)-echo_interval_timer >= conf_echo_interval)
|
||||
@ -85,7 +89,14 @@ int run(struct conn * conn)
|
||||
// cw_log_debug1("Sending echo request");
|
||||
struct cwmsg *cwmsg=&conn->req_msg;
|
||||
uint8_t * buffer = conn->req_buffer;
|
||||
cwmsg_init_echo_request(cwmsg,buffer,conn,&radioinfo);
|
||||
|
||||
|
||||
struct wtpinfo * wtpinfo = get_wtpinfo();
|
||||
struct radioinfo *rip = &(wtpinfo->radioinfo[0]);
|
||||
|
||||
cwmsg_init_echo_request(cwmsg,buffer,conn,rip);
|
||||
|
||||
printf("Echo ->>>>>>>>>>>>>>>>>>>>> Seqnum %d\n",conn->req_msg.seqnum);
|
||||
|
||||
|
||||
printf("Conn target is %s",sock_addr2str(&conn->addr));
|
||||
@ -106,6 +117,17 @@ printf("Error !\n");
|
||||
}
|
||||
echo_interval_timer=time(NULL);
|
||||
}
|
||||
|
||||
time_t rt = cw_timer_start(5);
|
||||
cwrmsg = conn_wait_for_request(conn,0,rt);
|
||||
struct wtpinfo * wtpinfo = get_wtpinfo();
|
||||
struct radioinfo *rip = &(wtpinfo->radioinfo[0]);
|
||||
|
||||
if(cwrmsg){
|
||||
cw_readmsg_configuration_update_request(cwrmsg->msgelems,cwrmsg->msgelems_len);
|
||||
cw_send_configuration_update_response(conn,cwrmsg->seqnum,rip);
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
|
||||
}
|
||||
|
@ -1227,7 +1227,8 @@ int wtpdrv_get_radioinfo(int rid,struct radioinfo * radioinfo)
|
||||
radioinfo->type|=rid+1; //CW_80211_RADIO_TYPE_B; //CWRADIO_TYPE_N;
|
||||
radioinfo->regDomain=1;
|
||||
|
||||
memcpy(radioinfo->country_str,"AUDE",4);
|
||||
strcpy(radioinfo->country_str,"DE ");
|
||||
strcpy(radioinfo->country_str2,"DE ");
|
||||
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user