ac descriptor works
FossilOrigin-Name: 8e68ed51a2c8ee448474ab13ef8d0edbd8cfda5b5384684e2ed9ffa1fca4e799
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
|
||||
#include "cw/capwap.h"
|
||||
#include "cw/conn.h"
|
||||
#include "cw/sock.h"
|
||||
@ -24,12 +25,7 @@ static int run_discovery(struct conn *conn)
|
||||
conn->capwap_state = CAPWAP_STATE_DISCOVERY;
|
||||
|
||||
|
||||
cw_ktv_add(conn->local_cfg, "discovery_type", CW_TYPE_BYTE, &dtype,1);
|
||||
/* mbag_set_byte(conn->outgoing, CW_ITEM_DISCOVERY_TYPE,
|
||||
CAPWAP_DISCOVERY_TYPE_UNKNOWN);
|
||||
*/
|
||||
|
||||
|
||||
/*cw_ktv_add(conn->local_cfg, "discovery-type", CW_TYPE_BYTE, &dtype,17);*/
|
||||
|
||||
|
||||
cw_init_request(conn, CAPWAP_MSG_DISCOVERY_REQUEST);
|
||||
@ -39,11 +35,11 @@ static int run_discovery(struct conn *conn)
|
||||
|
||||
timer = cw_timer_start(0);
|
||||
|
||||
/*
|
||||
|
||||
while (!cw_timer_timeout(timer)
|
||||
&& conn->capwap_state == CAPWAP_STATE_DISCOVERY) {
|
||||
int rc;
|
||||
mavl_del_all(conn->incomming);
|
||||
/*mavl_del_all(conn->incomming);*/
|
||||
|
||||
rc = cw_read_from(conn);
|
||||
|
||||
@ -55,7 +51,7 @@ static int run_discovery(struct conn *conn)
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
mbag_t discs;
|
||||
|
@ -50,6 +50,7 @@ static int parse_args (int argc, char *argv[], struct bootcfg * bootcfg)
|
||||
break;
|
||||
case 'c':
|
||||
bootcfg->cfgfilename = optarg;
|
||||
break;
|
||||
case '?':
|
||||
exit(EXIT_FAILURE);
|
||||
default:
|
||||
@ -98,13 +99,15 @@ int main (int argc, char **argv)
|
||||
for (ti=CW_KTV_STD_TYPES;*ti;ti++){
|
||||
mavl_add_ptr(types_tree,*ti);
|
||||
}
|
||||
|
||||
|
||||
/* read the initial config file */
|
||||
file = fopen(bootcfg.cfgfilename,"r");
|
||||
|
||||
if (file == NULL){
|
||||
cw_log(LOG_ERR,"Cant open file '%s':%s", strerror(errno));
|
||||
cw_log(LOG_ERR,"Can't open file '%s':%s",bootcfg.cfgfilename, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
cw_ktv_read_file(file,global_cfg,types_tree);
|
||||
|
||||
|
||||
@ -133,8 +136,8 @@ int main (int argc, char **argv)
|
||||
conn->dtls_mtu = 12000;
|
||||
conn->msgset=msgset;
|
||||
conn->local_cfg = global_cfg;
|
||||
|
||||
|
||||
conn->remote_cfg = cw_ktv_create();
|
||||
conn->receiver = CW_RECEIVER_WTP;
|
||||
|
||||
cw_run_discovery(conn, "255.255.255.255",NULL);
|
||||
|
||||
|
Reference in New Issue
Block a user