Inserted a lot of debug printfs, fixed some bugs
This commit is contained in:
parent
ac58b6cc72
commit
d582503c78
@ -199,29 +199,29 @@ ssl_cert="../../ssl/certs/ac-xcisco.pem"
|
||||
#
|
||||
dbg = info # Show all kind of infos
|
||||
# dbg += all
|
||||
dbg += msg_in # Incomming CAPWAP messages
|
||||
dbg += msg_out # Outgoing CAPWAP messages
|
||||
dbg += msg_err # Be verbose about capwap message errors like re-transmission
|
||||
dbg += msg_dmp
|
||||
dbg += elem_in # CAPWAP message elements
|
||||
dbg += elem_out
|
||||
dbg += subelem #
|
||||
dbg += elem_err # Errors in message elements
|
||||
dbg += elem_dmp # Print hex dump for capwap messages elements
|
||||
dbg += rfc # Show warnings if CAPWAP messages don't conform to RFC
|
||||
dbg += pkt_in # CAPWAP packets received
|
||||
dbg += pkt_out # CAPWAP packets sent
|
||||
dbg += pkt # CAPWAP packets both sent and received
|
||||
dbg += pkt_dmp # Hex dump CAPWAP packets.
|
||||
dbg += pkt_err # Show messages about malformed packets when detected
|
||||
dbg += dtls # Messages concerning DTLS
|
||||
# dbg += msg_in # Incomming CAPWAP messages
|
||||
# dbg += msg_out # Outgoing CAPWAP messages
|
||||
# dbg += msg_err # Be verbose about capwap message errors like re-transmission
|
||||
# dbg += msg_dmp
|
||||
# dbg += elem_in # CAPWAP message elements
|
||||
# dbg += elem_out
|
||||
# dbg += subelem #
|
||||
# dbg += elem_err # Errors in message elements
|
||||
# dbg += elem_dmp # Print hex dump for capwap messages elements
|
||||
# dbg += rfc # Show warnings if CAPWAP messages don't conform to RFC
|
||||
# dbg += pkt_in # CAPWAP packets received
|
||||
# dbg += pkt_out # CAPWAP packets sent
|
||||
# dbg += pkt # CAPWAP packets both sent and received
|
||||
# dbg += pkt_dmp # Hex dump CAPWAP packets.
|
||||
# dbg += pkt_err # Show messages about malformed packets when detected
|
||||
# dbg += dtls # Messages concerning DTLS
|
||||
# dbg += dtls_detail # DTLS in more detail
|
||||
dbg += dtls_bio # DTLS BIO operations
|
||||
# dbg += dtls_bio # DTLS BIO operations
|
||||
# dbg += dtls_bio_dmp # HeXy dump data in BIO operations
|
||||
dbg += warn # misc warnings
|
||||
dbg += mod # Debugs specific to mod
|
||||
dbg += cfg_dmp
|
||||
dbg += state
|
||||
# dbg += warn # misc warnings
|
||||
# dbg += mod # Debugs specific to mod
|
||||
# dbg += cfg_dmp
|
||||
# dbg += state
|
||||
#
|
||||
# dbg += all # all of the above
|
||||
# dbg += err # Same as dbg_err and pkt_err
|
||||
|
@ -225,6 +225,30 @@ void tester1()
|
||||
}
|
||||
|
||||
|
||||
static void show_cfg (FILE *out, mavl_t ktv)
|
||||
{
|
||||
char value[500];
|
||||
struct cw_KTV * data;
|
||||
mavliter_t it;
|
||||
const struct cw_Type * type;
|
||||
|
||||
|
||||
mavliter_init(&it,ktv);
|
||||
|
||||
mavliter_foreach(&it){
|
||||
|
||||
data = mavliter_get(&it);
|
||||
type = data->type;
|
||||
type->to_str(data,value,0);
|
||||
|
||||
fprintf(out,"%s :%s: %s\n",data->key,type->get_type_name(data), value);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
int rc = 0;
|
||||
@ -261,6 +285,8 @@ int main (int argc, char *argv[])
|
||||
|
||||
fclose(file);
|
||||
|
||||
//show_cfg(stdout,global_cfg);
|
||||
//exit(0);
|
||||
|
||||
actube_global_cfg = global_cfg;
|
||||
|
||||
|
@ -32,6 +32,7 @@ void ucfg_cmd(struct shelldata *sd, const char * cmd);
|
||||
void set_cmd(struct shelldata *sd, const char * cmd);
|
||||
void del_cmd(struct shelldata *sd, const char * cmd);
|
||||
void send_cmd(struct shelldata *sd, const char * cmd);
|
||||
void wlan0_cmd(struct shelldata *sd, const char * cmd);
|
||||
void show_cfg (FILE *out, mavl_t ktv);
|
||||
void show_aps (FILE *out);
|
||||
|
||||
@ -50,6 +51,7 @@ static struct command cmdlist[]={
|
||||
{"select", select_cmd },
|
||||
{"send", send_cmd},
|
||||
{"set", set_cmd },
|
||||
{"wlan0",wlan0_cmd},
|
||||
|
||||
|
||||
{NULL,NULL}
|
||||
@ -106,6 +108,25 @@ send_cmd(struct shelldata * sd, const char *cmd)
|
||||
wtplist_unlock();
|
||||
}
|
||||
|
||||
void
|
||||
wlan0_cmd(struct shelldata * sd, const char *cmd)
|
||||
{
|
||||
struct conn * conn;
|
||||
wtplist_lock();
|
||||
conn = find_ap(sd->prompt);
|
||||
if (conn==NULL){
|
||||
fprintf(sd->out,"WTP '%s' not found\n",sd->prompt);
|
||||
}
|
||||
else {
|
||||
FILE *f=fopen("wlan0.ktv","r");
|
||||
cw_ktv_read_file(f,sd->update_cfg,conn->msgset->types_tree);
|
||||
//conn->update_cfg=sd->update_cfg;
|
||||
fclose(f);
|
||||
}
|
||||
wtplist_unlock();
|
||||
|
||||
}
|
||||
|
||||
void set_cmd(struct shelldata *sd, const char *str)
|
||||
{
|
||||
struct conn * conn;
|
||||
|
@ -114,23 +114,6 @@ static void wtpman_run_discovery(void *arg)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
int xprocess_message(struct conn *conn, uint8_t * rawmsg, int rawlen,
|
||||
struct sockaddr *from)
|
||||
{
|
||||
uint8_t *msgptr = rawmsg + cw_get_hdr_msg_offset(rawmsg);
|
||||
uint32_t type = cw_get_msg_type(msgptr);
|
||||
cw_log(LOG_ERR, "Hey: %d", type);
|
||||
if (type == CAPWAP_MSG_DISCOVERY_REQUEST)
|
||||
conn->capwap_state = CAPWAP_STATE_DISCOVERY;
|
||||
|
||||
|
||||
return process_message(conn, rawmsg, rawlen, from);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
static int wtpman_dtls_setup(void *arg)
|
||||
{
|
||||
char cipherstr[512];
|
||||
@ -386,62 +369,6 @@ static void * wtpman_main(void *arg)
|
||||
return NULL;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
switch (conn->capwap_transition){
|
||||
case CW_TRANSITION(CAPWAP_STATE_DTLS_SETUP, CAPWAP_STATE_JOIN):
|
||||
{
|
||||
|
||||
wait_join = cw_ktv_get_word(conn->global_cfg,"wait-join",CAPWAP_WAIT_JOIN);
|
||||
timer = cw_timer_start(wait_join);
|
||||
break;
|
||||
}
|
||||
case CW_TRANSITION(CAPWAP_STATE_JOIN, CAPWAP_STATE_JOIN):
|
||||
{
|
||||
char wtpname[CAPWAP_MAX_WTP_NAME_LEN];
|
||||
cw_KTV_t * result;
|
||||
result = cw_ktv_get(conn->remote_cfg,"wtp-name",NULL);
|
||||
result->type->to_str(result,wtpname,CAPWAP_MAX_WTP_NAME_LEN);
|
||||
cw_dbg(DBG_INFO, "WTP joined: '%s', IP %s.",
|
||||
wtpname,
|
||||
sock_addr2str(&conn->addr,sock_buf)
|
||||
);
|
||||
break;
|
||||
}
|
||||
case CW_TRANSITION(CAPWAP_STATE_JOIN,CAPWAP_STATE_TIMEOUT):
|
||||
{
|
||||
cw_dbg(DBG_MSG_ERR, "No join request from %s after %d seconds, WTP died.",
|
||||
sock_addr2str(&wtpman->conn->addr,sock_buf), wait_join);
|
||||
wtpman_remove(wtpman);
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
case CW_TRANSITION(CAPWAP_STATE_JOIN, CAPWAP_STATE_CONFIGURE):
|
||||
{
|
||||
|
||||
wait_change_state = cw_ktv_get_word(conn->global_cfg,
|
||||
"capwap-timers/change-state-pending-timer",
|
||||
CAPWAP_TIMER_CHANGE_STATE_PENDING_TIMER);
|
||||
break;
|
||||
}
|
||||
case CW_TRANSITION(CAPWAP_STATE_CONFIGURE,CAPWAP_STATE_TIMEOUT):
|
||||
{
|
||||
cw_dbg(DBG_MSG_ERR, "No Change State Event Request %s after %d seconds, WTP died.",
|
||||
sock_addr2str(&wtpman->conn->addr,sock_buf), wait_change_state);
|
||||
wtpman_remove(wtpman);
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
while (!cw_timer_timeout(timer)) {
|
||||
if (conn->update_cfg != NULL){
|
||||
@ -580,7 +507,7 @@ cw_dbg_ktv_dump(conn->remote_cfg,DBG_INFO,"-------------dump------------","DMP",
|
||||
}
|
||||
|
||||
/*// cw_dbg(DBG_X, "Time left: %d",
|
||||
//*/
|
||||
// */
|
||||
/*cw_timer_timeleft(wtpman->echointerval_timer);*/
|
||||
|
||||
if (cw_timer_timeout(wtpman->echointerval_timer)) {
|
||||
|
@ -90,7 +90,7 @@ struct conn * conn_create(int sock, struct sockaddr * addr, int qsize)
|
||||
/* conn->send_data_packet = conn_send_data_packet;*/
|
||||
|
||||
conn->last_seqnum_received=-1;
|
||||
conn->mtu=500;
|
||||
conn->mtu=600;
|
||||
|
||||
|
||||
conn->cur_packet=0;
|
||||
@ -102,7 +102,7 @@ struct conn * conn_create(int sock, struct sockaddr * addr, int qsize)
|
||||
|
||||
/* conn->write_data = conn->send_data_packet; */
|
||||
|
||||
conn->dtls_mtu = 500;
|
||||
conn->dtls_mtu = 600;
|
||||
|
||||
return conn;
|
||||
}
|
||||
|
@ -515,6 +515,7 @@ int process_message(struct conn *conn, uint8_t * rawmsg, int rawlen,
|
||||
if ((sd > 0 && sd < 128) || (sd < 0 && sd < -128) || s1 < 0) {
|
||||
/* seqnum is ok, normal message processing */
|
||||
conn->last_seqnum_received = seqnum;
|
||||
|
||||
return process_elements(conn, rawmsg, rawlen, from);
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,8 @@ int cw_decode_element(struct cw_ElemHandlerParams *params, int proto,
|
||||
handler->name);
|
||||
return CAPWAP_RESULT_UNRECOGNIZED_MESSAGE_ELEMENT;
|
||||
}
|
||||
|
||||
printf ("USING HANDLERi TO DECODE: %d %s\n",handler->id,handler->name);
|
||||
rc = handler->get(handler, params, data, len);
|
||||
|
||||
|
||||
|
@ -18,6 +18,8 @@ int cw_in_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHandlerP
|
||||
key = handler->key;
|
||||
}
|
||||
|
||||
printf("CW_IN_GENERIC STRUCT: %s\n",key);
|
||||
|
||||
/* int (*mkkey)(struct cw_ElemHandler * handler, char *dst, struct cw_ElemHandlerParams * params,
|
||||
uint8_t*data, int len);
|
||||
*/
|
||||
|
@ -8,9 +8,6 @@ int cw_ktv_read_struct(mavl_t ktv,const cw_KTVStruct_t * stru, const char *pkey,
|
||||
int pos, i,l;
|
||||
cw_KTV_t * result;
|
||||
|
||||
if (strcmp(pkey,"radio.0/cisco/wtp-radio-config")==0)
|
||||
i = 99;
|
||||
|
||||
|
||||
pos=0; i=0;
|
||||
while (stru[i].type != NULL){
|
||||
@ -47,6 +44,7 @@ int cw_ktv_read_struct(mavl_t ktv,const cw_KTVStruct_t * stru, const char *pkey,
|
||||
|
||||
stru[i].type->to_str(result,dbstr,100);
|
||||
cw_dbg(DBG_ELEM_DETAIL, "Read (%d): %s: %s",pos,key,dbstr);
|
||||
printf("READ STRUCT (%d): %s: %s\n",pos,key,dbstr);
|
||||
|
||||
if (stru[i].len==-1)
|
||||
l = result->type->len(result);
|
||||
|
@ -24,9 +24,15 @@ int cw_ktv_write_struct(mavl_t ktv, mavl_t def, const cw_KTVStruct_t * stru, con
|
||||
else
|
||||
sprintf(key,"%s",pkey);
|
||||
|
||||
|
||||
printf("Get Key: %s\n",key);
|
||||
result = cw_ktv_get(ktv,key,NULL);
|
||||
|
||||
|
||||
if(result)
|
||||
{
|
||||
char s[129];
|
||||
result->type->to_str(result,s,128);
|
||||
printf("Content: '%s'\n",s);
|
||||
}
|
||||
|
||||
if (result == NULL && def != NULL){
|
||||
result = cw_ktv_get(def,key,NULL);
|
||||
|
@ -22,7 +22,7 @@ int cw_out_generic_indexed_enum(struct cw_ElemHandler * handler, struct cw_ElemH
|
||||
for(i=0; e[i].name!=NULL; i++) {
|
||||
sprintf(key,"%s/%s",handler->key,e[i].name);
|
||||
|
||||
printf("Her is the Key: %s - %s\n",key, );
|
||||
//printf("Her is the Key: %s - %s\n",key, );
|
||||
|
||||
result = cw_ktv_base_exists(params->local_cfg,key);
|
||||
if (result==NULL)
|
||||
|
@ -52,10 +52,12 @@ int cw_out_traverse0(struct cw_ElemHandler * handler, struct cw_ElemHandlerParam
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
int len;
|
||||
len = 0;
|
||||
|
||||
|
||||
printf("Next: %s\n", next);
|
||||
|
||||
sl = strchr(next,'/');
|
||||
if (sl==NULL){
|
||||
cw_KTV_t * result;
|
||||
cw_KTV_t * result;
|
||||
sprintf(key,"%s/%s",current,next);
|
||||
result = cw_ktv_base_exists(params->local_cfg,key);
|
||||
if (result != NULL){
|
||||
@ -84,6 +86,9 @@ int cw_out_traverse0(struct cw_ElemHandler * handler, struct cw_ElemHandlerParam
|
||||
}
|
||||
|
||||
strcpy(key,current);
|
||||
|
||||
printf("current is %s\n", current);
|
||||
|
||||
if (key[0!=0])
|
||||
strcat(key,"/");
|
||||
l = sl - next;
|
||||
@ -98,6 +103,7 @@ int cw_out_traverse0(struct cw_ElemHandler * handler, struct cw_ElemHandlerParam
|
||||
cw_KTV_t * result;
|
||||
|
||||
i = cw_ktv_idx_get_next(params->local_cfg,key,i+1);
|
||||
|
||||
if (i==-1)
|
||||
break;
|
||||
sprintf(basekey,"%s.%d",key,i);
|
||||
@ -127,6 +133,8 @@ int cw_out_traverse(struct cw_ElemHandler * handler, struct cw_ElemHandlerParams
|
||||
stack[0]=0;
|
||||
|
||||
current[0]=0;
|
||||
|
||||
|
||||
|
||||
return cw_out_traverse0(handler,params,dst,-1,current,handler->key, stack);
|
||||
}
|
||||
|
@ -851,11 +851,6 @@ struct cw_MsgSet * capwap_register_msg_set(struct cw_MsgSet * set, int mode){
|
||||
|
||||
cw_msgset_add_states(set,statemachine_states);
|
||||
|
||||
mavl_insert_ptr(set->types_tree,CW_TYPE_BSTR16);
|
||||
mavl_insert_ptr(set->types_tree,CW_TYPE_BYTE);
|
||||
mavl_insert_ptr(set->types_tree,CW_TYPE_DWORD);
|
||||
mavl_insert_ptr(set->types_tree,CW_TYPE_WORD);
|
||||
|
||||
set->write_header = write_header;
|
||||
set->header_len = header_len;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
ac-descriptor/active-wtps :Word: 1
|
||||
ac-descriptor/active-wtps :Word: 2
|
||||
ac-descriptor/dtls-policy :Byte: 0
|
||||
ac-descriptor/hardware/vendor :Dword: 4232704
|
||||
ac-descriptor/hardware/version :Bstr16: .x01000001
|
||||
@ -61,7 +61,7 @@ cisco/ap-regulatory-domain.1/slot :Byte: 0
|
||||
cisco/ap-sub-mode :Byte: 0
|
||||
cisco/ap-telnet-ssh/ssh :Bool: false
|
||||
cisco/ap-telnet-ssh/telnet :Bool: false
|
||||
cisco/ap-timesync/timestamp :Dword: 1469728495
|
||||
cisco/ap-timesync/timestamp :Dword: 1469886778
|
||||
cisco/ap-timesync/type :Byte: 0
|
||||
cisco/ap-username-and-password/802.1x-credentials/option :Word: 2
|
||||
cisco/ap-username-and-password/802.1x-credentials/password :Str:
|
||||
@ -85,7 +85,7 @@ cisco/loghost-config/loghost.0 :IPAddress: 7.7.1.3
|
||||
cisco/loghost-config/loghost.1 :IPAddress: 0.0.0.0
|
||||
cisco/loghost-config/loghost.2 :IPAddress: 0.0.0.0
|
||||
cisco/loghost-config/loghost.3 :IPAddress: 0.0.0.0
|
||||
cisco/mcast-mgid-info :Bstr16: .x000000010000000000000000000000000000000101000000
|
||||
cisco/mcast-mgid-info :Bstr16: .x0000000d0000000000000000000000000000000101000000
|
||||
cisco/mwar-addr/address :IPAddress: 192.168.0.162
|
||||
cisco/mwar-addr/mwar-type :Byte: 0
|
||||
cisco/mwar-addr/unknown :Word: 0
|
||||
@ -97,7 +97,7 @@ cisco/rouge-and-mss/roge-detection :Bool: true
|
||||
cisco/rouge-and-mss/tcp-adjust-mss :Word: 0
|
||||
cisco/rouge-detection/rest :Bstr16: .x000aff800000
|
||||
cisco/rouge-detection/rouge-detection :Bool: false
|
||||
cisco/sig-toogle :Bool: false
|
||||
cisco/sig-toogle :Bool: true
|
||||
cisco/spam-domain-secret :Bstr16: .xe1ffd18a8f15b3b59c0a47a7f17a96e7cb36174f00
|
||||
cisco/ssl-certfile :Str: ../../ssl/certs/wtpc.crt
|
||||
cisco/ssl-cipher :Str: RSA:AES-128-CBC:SHA1
|
||||
@ -141,7 +141,7 @@ radio.0/cisco/direct-sequence-control/current-cca-mode :Byte: 0
|
||||
radio.0/cisco/direct-sequence-control/current-channel :Byte: 1
|
||||
radio.0/cisco/direct-sequence-control/energy-detect-threshold :Dword: -50
|
||||
radio.0/cisco/direct-sequence-control/unknown :Byte: 1
|
||||
radio.0/cisco/elem19 :Bstr16: .xc0a800a10001000bc0a800a103000101003ccd774fc43bd27db633509934957d3acb000000000000000052464d000000000000000000000000000000000000000000000000000000000001060b010101
|
||||
radio.0/cisco/elem19 :Bstr16: .xc0a800a10001000bc0a800a103000101001ecd774fc43bd27db633509934957d3acb000000000000000052464d000000000000000000000000000000000000000000000000000000000001060b010101
|
||||
radio.0/cisco/elem22 :Bstr16: .x0d00b400320102030405060708090a0b0c0d
|
||||
radio.0/cisco/elem24 :Bstr16: .x003c000c
|
||||
radio.0/cisco/elem81 :Bstr16: .x00000000010101010a001e0a02051cbfffbfff0a00
|
||||
@ -165,7 +165,7 @@ radio.0/cisco/rad-extended-config/multicast-buffer :Word: 0
|
||||
radio.0/cisco/rad-extended-config/multicast-data-range :Word: 0
|
||||
radio.0/cisco/rad-extended-config/rx-sensop-threshold :Word: 0
|
||||
radio.0/cisco/tx-power-levels :Bstr16: .x070011000e000b000800050002ffff0000
|
||||
radio.0/cisco/tx-power/current-tx-power :Word: 3
|
||||
radio.0/cisco/tx-power/current-tx-power :Word: 1
|
||||
radio.0/cisco/tx-power/reserved :Byte: 1
|
||||
radio.0/cisco/wtp-radio-config/beacon-period :Word: 100
|
||||
radio.0/cisco/wtp-radio-config/bss-id :Bstr16: .x0800276edf58
|
||||
@ -196,7 +196,7 @@ radio.0/wlan.0/add-wlan/scan-defer-time :Word: 100
|
||||
radio.0/wlan.0/add-wlan/session-timout :Word: 1800
|
||||
radio.0/wlan.0/add-wlan/ssid :Str:
|
||||
radio.0/wlan.0/add-wlan/wep-encryption :Bool: false
|
||||
radio.0/wlan.0/add-wlan/wep-key :Bstr16: .x4e1c7dbd0d2f612263b1a002fd
|
||||
radio.0/wlan.0/add-wlan/wep-key :Bstr16: .x25c544f95684f1f8687a411ca5
|
||||
radio.0/wlan.0/add-wlan/wep-key-index :Byte: 1
|
||||
radio.0/wlan.0/add-wlan/wlan-capability :Word: 1073
|
||||
radio.0/wlan.0/add-wlan/wlan-id :Byte: 1
|
||||
@ -212,6 +212,40 @@ radio.0/wlan.0/ssid-a :Str: Schlosspark
|
||||
radio.0/wlan.0/wep-key :Bstr16: .xaa0c0a02000000000000000000
|
||||
radio.0/wlan.0/wlan-capability :Word: 1057
|
||||
radio.0/wlan.0/wlan-id :Byte: 0
|
||||
radio.0/wlan.1/add-wlan/aironet-ie :Bool: true
|
||||
radio.0/wlan.1/add-wlan/broadcast-ssid :Bool: true
|
||||
radio.0/wlan.1/add-wlan/dtim-period :Byte: 1
|
||||
radio.0/wlan.1/add-wlan/encryption-policy :Dword: 4
|
||||
radio.0/wlan.1/add-wlan/hreap-local-switch :Byte: 0
|
||||
radio.0/wlan.1/add-wlan/profile-name :Str: tubeC
|
||||
radio.0/wlan.1/add-wlan/qos :Byte: 0
|
||||
radio.0/wlan.1/add-wlan/radio-id :Byte: 0
|
||||
radio.0/wlan.1/add-wlan/scan-defer-period :Word: 28784
|
||||
radio.0/wlan.1/add-wlan/scan-defer-time :Word: 100
|
||||
radio.0/wlan.1/add-wlan/session-timout :Word: 1800
|
||||
radio.0/wlan.1/add-wlan/ssid :Str: tubeC
|
||||
radio.0/wlan.1/add-wlan/wep-encryption :Bool: false
|
||||
radio.0/wlan.1/add-wlan/wep-key :Bstr16: .xc3616fee42fcf74fa02bff3d87
|
||||
radio.0/wlan.1/add-wlan/wep-key-index :Byte: 1
|
||||
radio.0/wlan.1/add-wlan/wlan-capability :Word: 1073
|
||||
radio.0/wlan.1/add-wlan/wlan-id :Byte: 1
|
||||
radio.0/wlan.13/add-wlan/aironet-ie :Bool: true
|
||||
radio.0/wlan.13/add-wlan/broadcast-ssid :Bool: true
|
||||
radio.0/wlan.13/add-wlan/dtim-period :Byte: 19
|
||||
radio.0/wlan.13/add-wlan/encryption-policy :Dword: 1
|
||||
radio.0/wlan.13/add-wlan/hreap-local-switch :Byte: 16
|
||||
radio.0/wlan.13/add-wlan/profile-name :Str: SuerWLAN
|
||||
radio.0/wlan.13/add-wlan/qos :Byte: 0
|
||||
radio.0/wlan.13/add-wlan/radio-id :Byte: 0
|
||||
radio.0/wlan.13/add-wlan/scan-defer-period :Word: 15420
|
||||
radio.0/wlan.13/add-wlan/scan-defer-time :Word: 100
|
||||
radio.0/wlan.13/add-wlan/session-timout :Word: 1800
|
||||
radio.0/wlan.13/add-wlan/ssid :Str: SuperSSID
|
||||
radio.0/wlan.13/add-wlan/wep-encryption :Bool: false
|
||||
radio.0/wlan.13/add-wlan/wep-key :Bstr16: .x00000000000000000000000000
|
||||
radio.0/wlan.13/add-wlan/wep-key-index :Byte: 1
|
||||
radio.0/wlan.13/add-wlan/wlan-capability :Word: 1057
|
||||
radio.0/wlan.13/add-wlan/wlan-id :Byte: 13
|
||||
radio.0/wtp-radio-information :Dword: 1
|
||||
radio.1/admin-state :Byte: reserved
|
||||
radio.1/cisco-multi-domain-capability/first-channel :Word: 36
|
||||
@ -229,7 +263,7 @@ radio.1/cisco/antenna-payload/number-of-antennas :Byte: 2
|
||||
radio.1/cisco/antenna-payload/unknown :Byte: 3
|
||||
radio.1/cisco/channel-power :Bstr16: .x0808102408221c16100a04fefe2808221c16100a04fefe2c08221c16100a04fefe3008221c16100a04fefe3408221c16100a04fefe3808221c16100a04fefe3c08221c16100a04fefe4008221c16100a04fefe6408221c16100a04fefe6808221c16100a04fefe6c08221c16100a04fefe7008221c16100a04fefe7408221c16100a04fefe8408221c16100a04fefe8808221c16100a04fefe8c08221c16100a04fefe
|
||||
radio.1/cisco/elem15 :Bstr16: .x027007ffffffce010001
|
||||
radio.1/cisco/elem19 :Bstr16: .xc0a800a10001000ac0a800a110000101003ccd774fc43bd27db633509934957d3acb000000000000000052464d000000000000000000000000000000000000000000000000000000000024282c3034383c4064686c707484888c01010101010101010101010101010101
|
||||
radio.1/cisco/elem19 :Bstr16: .xc0a800a10001000ac0a800a110000101001ecd774fc43bd27db633509934957d3acb000000000000000052464d000000000000000000000000000000000000000000000000000000000024282c3034383c4064686c707484888c01010101010101010101010101010101
|
||||
radio.1/cisco/elem22 :Bstr16: .x1000b4003224282c3034383c4064686c707484888c
|
||||
radio.1/cisco/elem24 :Bstr16: .x003c000c
|
||||
radio.1/cisco/elem47 :Bstr16: .x01ccb0000c000f42401999ba1040000003
|
||||
@ -248,7 +282,7 @@ radio.1/cisco/multi-domain-capability/max-tx-power-level :Word: 20
|
||||
radio.1/cisco/multi-domain-capability/number-of-channels :Word: 4
|
||||
radio.1/cisco/multi-domain-capability/reserved :Byte: 1
|
||||
radio.1/cisco/tx-power-levels :Bstr16: .x070011000e000b000800050002ffff0000
|
||||
radio.1/cisco/tx-power/current-tx-power :Word: 3
|
||||
radio.1/cisco/tx-power/current-tx-power :Word: 1
|
||||
radio.1/cisco/tx-power/reserved :Byte: 1
|
||||
radio.1/cisco/wtp-radio-config/beacon-period :Word: 100
|
||||
radio.1/cisco/wtp-radio-config/bss-id :Bstr16: .x04fe7f499b90
|
||||
@ -266,23 +300,40 @@ radio.1/decryption-error-report-period :Word: 120
|
||||
radio.1/operational-state/cause :Byte: Normal
|
||||
radio.1/operational-state/state :Byte: enabled
|
||||
radio.1/rate_set :Bstr16: .x8c129824b048606c
|
||||
radio.1/wlan.0/add-lw-wlan/misc :Bstr16: .x3e9904fac0000100
|
||||
radio.1/wlan.0/add-lw-wlan/misc2 :Word: 4
|
||||
radio.1/wlan.0/add-lw-wlan/ssid :Str: TubeSSID
|
||||
radio.1/wlan.0/add-wlan/broadcast-ssid :Bool: true
|
||||
radio.1/wlan.0/add-wlan/dtim-period :Byte: 1
|
||||
radio.1/wlan.0/add-wlan/encryption-policy :Dword: 4
|
||||
radio.1/wlan.0/add-wlan/profile-name :Str: tubeC
|
||||
radio.1/wlan.0/add-wlan/qos :Byte: 0
|
||||
radio.1/wlan.0/add-wlan/radio-id :Byte: 1
|
||||
radio.1/wlan.0/add-wlan/scan-defer-time :Word: 100
|
||||
radio.1/wlan.0/add-wlan/session-timout :Word: 1800
|
||||
radio.1/wlan.0/add-wlan/ssid :Str:
|
||||
radio.1/wlan.0/add-wlan/wep-encryption :Bool: false
|
||||
radio.1/wlan.0/add-wlan/wep-key :Bstr16: .xf0571b63dc70fdf913e2bd0806
|
||||
radio.1/wlan.0/add-wlan/wep-key-index :Byte: 1
|
||||
radio.1/wlan.0/add-wlan/wlan-capability :Word: 17
|
||||
radio.1/wlan.0/add-wlan/wlan-id :Byte: 1
|
||||
radio.1/wlan.1/add-wlan/aironet-ie :Bool: true
|
||||
radio.1/wlan.1/add-wlan/broadcast-ssid :Bool: true
|
||||
radio.1/wlan.1/add-wlan/dtim-period :Byte: 1
|
||||
radio.1/wlan.1/add-wlan/encryption-policy :Dword: 4
|
||||
radio.1/wlan.1/add-wlan/hreap-local-switch :Byte: 0
|
||||
radio.1/wlan.1/add-wlan/profile-name :Str: tubeC
|
||||
radio.1/wlan.1/add-wlan/qos :Byte: 0
|
||||
radio.1/wlan.1/add-wlan/radio-id :Byte: 1
|
||||
radio.1/wlan.1/add-wlan/scan-defer-period :Word: 28784
|
||||
radio.1/wlan.1/add-wlan/scan-defer-time :Word: 100
|
||||
radio.1/wlan.1/add-wlan/session-timout :Word: 1800
|
||||
radio.1/wlan.1/add-wlan/ssid :Str: tubeC
|
||||
radio.1/wlan.1/add-wlan/wep-encryption :Bool: false
|
||||
radio.1/wlan.1/add-wlan/wep-key :Bstr16: .xcac80297ec10e7a8da2c9b1f03
|
||||
radio.1/wlan.1/add-wlan/wep-key-index :Byte: 1
|
||||
radio.1/wlan.1/add-wlan/wlan-capability :Word: 17
|
||||
radio.1/wlan.1/add-wlan/wlan-id :Byte: 1
|
||||
radio.1/wlan.13/add-wlan/aironet-ie :Bool: true
|
||||
radio.1/wlan.13/add-wlan/broadcast-ssid :Bool: true
|
||||
radio.1/wlan.13/add-wlan/dtim-period :Byte: 19
|
||||
radio.1/wlan.13/add-wlan/encryption-policy :Dword: 1
|
||||
radio.1/wlan.13/add-wlan/hreap-local-switch :Byte: 16
|
||||
radio.1/wlan.13/add-wlan/profile-name :Str: SuerWLAN
|
||||
radio.1/wlan.13/add-wlan/qos :Byte: 0
|
||||
radio.1/wlan.13/add-wlan/radio-id :Byte: 1
|
||||
radio.1/wlan.13/add-wlan/scan-defer-period :Word: 15420
|
||||
radio.1/wlan.13/add-wlan/scan-defer-time :Word: 100
|
||||
radio.1/wlan.13/add-wlan/session-timout :Word: 1800
|
||||
radio.1/wlan.13/add-wlan/ssid :Str: SuperSSID
|
||||
radio.1/wlan.13/add-wlan/wep-encryption :Bool: false
|
||||
radio.1/wlan.13/add-wlan/wep-key :Bstr16: .x00000000000000000000000000
|
||||
radio.1/wlan.13/add-wlan/wep-key-index :Byte: 1
|
||||
radio.1/wlan.13/add-wlan/wlan-capability :Word: 1
|
||||
radio.1/wlan.13/add-wlan/wlan-id :Byte: 13
|
||||
radio.1/wtp-radio-information :Dword: 2
|
||||
radio.255/admin-state :Byte: reserved
|
||||
radio.255/operational-state/cause :Byte: Normal
|
||||
|
@ -97,21 +97,24 @@ static void do_update(struct conn * conn)
|
||||
|
||||
|
||||
|
||||
if (!update)
|
||||
return;
|
||||
update=0;
|
||||
// if (!update)
|
||||
// return;
|
||||
// update=0;
|
||||
|
||||
/* mbag_t result = mbag_create();
|
||||
update_radios(conn,result);
|
||||
*/ cw_dbg(DBG_INFO, "Saving configuration ...");
|
||||
/* cfg_to_json();*/
|
||||
/* Change State ... */
|
||||
|
||||
|
||||
/*
|
||||
rc = cw_send_request(conn,CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST);
|
||||
if ( !cw_result_is_ok(rc) ) {
|
||||
cw_strresult(rc);
|
||||
return ;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
@ -162,24 +165,26 @@ int run(struct conn * conn)
|
||||
if (rc < 0 && errno == EAGAIN) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
printf("--------------------------------------------------------------------------------------\n");
|
||||
|
||||
if ( !cw_result_is_ok(rc))
|
||||
if ( !cw_result_is_ok(rc)) {
|
||||
printf("---------------------- cwrsult is not ok\n");
|
||||
break;
|
||||
}
|
||||
|
||||
printf("lalalala\n");
|
||||
cw_dbg_ktv_dump(conn->remote_cfg,DBG_INFO,"KTV DUMP ----------------","Remote:", "DUMP done -------");
|
||||
|
||||
printf("Saving Config\n");
|
||||
mavl_merge(conn->local_cfg,conn->remote_cfg);
|
||||
cw_ktv_save(conn->local_cfg,"cisco.ktv");
|
||||
clean_cfg(conn->remote_cfg);
|
||||
|
||||
|
||||
/*cw_dbg(DBG_X,"We hav a message processed");*/
|
||||
cw_dbg(DBG_X,"We hav a message processed");
|
||||
update=1;
|
||||
do_update(conn);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (rc<0 && errno == EAGAIN){
|
||||
rc = cw_send_request(conn,CAPWAP_MSG_ECHO_REQUEST);
|
||||
|
||||
@ -194,9 +199,6 @@ int run(struct conn * conn)
|
||||
cw_log(LOG_ERR,"Error in run state: %d %s",rc,cw_strrc(rc));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} while (conn->capwap_state == CAPWAP_STATE_RUN);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user