More Cisco stuff
FossilOrigin-Name: f5d524e032376c67bfe637ce08b701e55e4be62ac7ee960b0daacda910cf1d2f
This commit is contained in:
parent
9dadcc3fd5
commit
3dbca93a88
@ -289,6 +289,7 @@
|
||||
<File Name="src/cw/cw_out_idx_generic_struct.c"/>
|
||||
<File Name="src/cw/cw_out_radio_generic_struct.c"/>
|
||||
<File Name="src/cw/cw_ktv_base_exists.c"/>
|
||||
<File Name="src/cw/cw_ktv_save.c"/>
|
||||
</VirtualDirectory>
|
||||
</VirtualDirectory>
|
||||
<Description/>
|
||||
|
@ -38,7 +38,7 @@ result-code :Dword: 0
|
||||
|
||||
|
||||
|
||||
ac-name:Bstr16:"TubesAC"
|
||||
ac-name:Bstr16:"CiscoAC73"
|
||||
|
||||
#capwap-control-ip-address/address.0:IPAddress:1192.168.0.14
|
||||
capwap-control-ip-address/address.0:IPAddress:192.168.0.14
|
||||
|
@ -131,6 +131,7 @@ KTVSRC=\
|
||||
cw_ktv_write_struct.c\
|
||||
cw_ktv_std_types.c\
|
||||
cw_ktv_base_exists.c\
|
||||
cw_ktv_save.c\
|
||||
|
||||
|
||||
LWSRC=\
|
||||
|
@ -0,0 +1,58 @@
|
||||
|
||||
#include "ktv.h"
|
||||
|
||||
|
||||
static int write_str(FILE *outfile,const char *str)
|
||||
{
|
||||
if ( (strchr(str,'\\')!=NULL) || (strchr(str,'"')!=NULL) || (strchr(str,'\n')!=NULL)){
|
||||
fprintf(outfile,"\"");
|
||||
|
||||
while (*str != 0){
|
||||
switch(*str){
|
||||
case '\n':
|
||||
fprintf(outfile,"\\n");
|
||||
break;
|
||||
case '\\':
|
||||
fprintf(outfile,"\\\\");
|
||||
break;
|
||||
case '"':
|
||||
fprintf(outfile,"\\\"");
|
||||
break;
|
||||
default:
|
||||
fprintf(outfile,"%c",*str);
|
||||
break;
|
||||
}
|
||||
str++;
|
||||
}
|
||||
|
||||
fprintf(outfile,"\"");
|
||||
return 1;
|
||||
}
|
||||
|
||||
fprintf(outfile,"%s",str);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cw_ktv_save(mavl_t ktvstore, const char * filename){
|
||||
mavliter_t it;
|
||||
FILE * outfile;
|
||||
|
||||
outfile = fopen(filename,"w");
|
||||
if (outfile == NULL)
|
||||
return 0;
|
||||
|
||||
mavliter_init(&it,ktvstore);
|
||||
mavliter_foreach(&it){
|
||||
cw_KTV_t * val;
|
||||
char buf[4000];
|
||||
val = mavliter_get(&it);
|
||||
val->type->to_str(val,buf,4000);
|
||||
write_str(outfile,val->key);
|
||||
fprintf(outfile," :%s: ",val->type->name);
|
||||
write_str(outfile,buf);
|
||||
fprintf(outfile,"\n");
|
||||
|
||||
}
|
||||
fclose(outfile);
|
||||
return 1;
|
||||
}
|
@ -172,7 +172,8 @@ char * cw_ktv_get_str(mavl_t ktv,const char *key, char * def);
|
||||
|
||||
int cw_ktv_idx_get(mavl_t ktv, const char *key);
|
||||
cw_KTV_t * cw_ktv_base_exists(mavl_t ktvstore, const char *basekey);
|
||||
|
||||
int cw_ktv_save(mavl_t ktvstore, const char * filename);
|
||||
|
||||
extern const cw_Type_t * cw_ktv_std_types[];
|
||||
#define CW_KTV_STD_TYPES cw_ktv_std_types
|
||||
|
||||
|
@ -473,6 +473,12 @@ static struct cw_ElemDef configuration_update_request_elements[] ={
|
||||
{0,0,0,0,0}
|
||||
};
|
||||
|
||||
static int configuration_update_response_states[] = {CAPWAP_STATE_RUN,0};
|
||||
static struct cw_ElemDef configuration_update_response_elements[] ={
|
||||
{0,0,CAPWAP_ELEM_RESULT_CODE, 1, 0},
|
||||
|
||||
{0,0,0,0,0}
|
||||
};
|
||||
|
||||
|
||||
static int echo_request_states[] = {CAPWAP_STATE_RUN,0};
|
||||
@ -546,6 +552,13 @@ static struct cw_MsgDef messages[] = {
|
||||
configuration_update_request_elements /* msg elements */
|
||||
},
|
||||
|
||||
{
|
||||
"Configuration Update Reponse", /* name */
|
||||
CAPWAP_MSG_CONFIGURATION_UPDATE_RESPONSE, /* msg type */
|
||||
CW_ROLE_WTP, /* role */
|
||||
configuration_update_response_states, /* allowed states */
|
||||
configuration_update_response_elements /* msg elements */
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
|
@ -34,7 +34,7 @@
|
||||
#define CISCO_ELEM_MWAR_ADDR LWAPP_ELEM_AC_ADDRESS /* 2 */
|
||||
#define CW_CISCO_RAD 3
|
||||
#define CW_CISCO_RAD_SLOT 4
|
||||
#define CW_CISCO_RAD_NAME LWAPP_ELEM_WTP_NAME /* 5 */
|
||||
#define CISCO_ELEM_RAD_NAME LWAPP_ELEM_WTP_NAME /* 5 */
|
||||
#define CW_CISCO_MWAR LW_ELEM_AC_DESCRIPTOR /* 6 */
|
||||
#define CW_CISCO_ADD_WLAN LW_ELEM_80211_ADD_WLAN /* 7 */
|
||||
#define CISCO_ELEM_WTP_RADIO_CONFIGURATION 8
|
||||
@ -70,7 +70,7 @@
|
||||
#define CW_CISCO_SIG_TOGGLE 87
|
||||
#define CISCO_ELEM_AIRSPACE_CAPABILITY 88
|
||||
|
||||
#define CW_CISCO_AC_NAME_WITH_INDEX 91
|
||||
#define CISCO_ELEM_AC_NAME_WITH_INDEX 91
|
||||
#define CW_CISCO_SPAM_DOMAIN_SECRET 96
|
||||
|
||||
#define CISCO_ELEM_SPAM_VENDOR_SPECIFIC 104
|
||||
|
@ -308,6 +308,61 @@ static cw_KTVStruct_t cisco_ap_core_dump[]={
|
||||
};
|
||||
|
||||
|
||||
int cisco_in_with_index(struct cw_ElemHandler *eh,
|
||||
struct cw_ElemHandlerParams *params,
|
||||
uint8_t * data, int len)
|
||||
{
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
int idx;
|
||||
|
||||
idx = cw_get_byte(data);
|
||||
sprintf(key,"%s.%d",eh->key,idx);
|
||||
cw_ktv_add(params->conn->remote_cfg,key,eh->type,data+1,len-1);
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
int cisco_out_with_index(struct cw_ElemHandler * eh,
|
||||
struct cw_ElemHandlerParams * params, uint8_t * dst)
|
||||
|
||||
{
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
int idx;
|
||||
cw_KTV_t * result, search;
|
||||
int len,start;
|
||||
uint8_t * ob;
|
||||
|
||||
|
||||
idx = 0;
|
||||
ob = dst;
|
||||
|
||||
do {
|
||||
sprintf(key,"%s.%d",eh->key,idx);
|
||||
search.key=key;
|
||||
result = mavl_get_first(params->conn->local_cfg,&search);
|
||||
if (result==NULL)
|
||||
break;
|
||||
if (strncmp(result->key,key,strlen(key))!=0)
|
||||
break;
|
||||
|
||||
start = params->conn->header_len(eh);
|
||||
len = cw_put_byte(ob+start,idx);
|
||||
|
||||
len += result->type->put(result,ob+start+len);
|
||||
|
||||
ob += params->conn->write_header(eh,ob,len);
|
||||
|
||||
idx++;
|
||||
|
||||
}while(1);
|
||||
|
||||
return ob-dst;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static struct cw_ElemHandler handlers[] = {
|
||||
|
||||
@ -349,7 +404,7 @@ static struct cw_ElemHandler handlers[] = {
|
||||
,
|
||||
{
|
||||
"RAD Name -> CAPWAP WTP Name", /* name */
|
||||
CW_CISCO_RAD_NAME, /* Element ID */
|
||||
CISCO_ELEM_RAD_NAME, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
1,512, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
@ -794,6 +849,53 @@ static struct cw_ElemHandler handlers[] = {
|
||||
cw_in_generic_struct, /* get */
|
||||
cw_out_generic_struct /* put */
|
||||
},
|
||||
|
||||
{
|
||||
"Statitsics Timer", /* name */
|
||||
CISCO_ELEM_STATISTICS_TIMER, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
2,2, /* min/max length */
|
||||
CW_TYPE_WORD, /* type */
|
||||
"statistics-timer", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_generic /* put */
|
||||
}
|
||||
,
|
||||
|
||||
{
|
||||
"AC Name with Index", /* name */
|
||||
CISCO_ELEM_AC_NAME_WITH_INDEX, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
1,513, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/ac-name-with-index", /* Key */
|
||||
cisco_in_with_index, /* get */
|
||||
cisco_out_with_index /* put */
|
||||
}
|
||||
,
|
||||
|
||||
{
|
||||
"AC IP Address with Index", /* name */
|
||||
CISCO_LWELEM_AC_IP_ADDR_WITH_INDEX, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
5,5, /* min/max length */
|
||||
CW_TYPE_IPADDRESS, /* type */
|
||||
"cisco/ac-ip-addr-with-index", /* Key */
|
||||
cisco_in_with_index, /* get */
|
||||
cisco_out_with_index /* put */
|
||||
}
|
||||
,
|
||||
{
|
||||
"AP Failover Priority", /* name */
|
||||
CISCO_LWELEM_AP_FAILOVER_PRIORITY, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
1,1, /* min/max length */
|
||||
CW_TYPE_BYTE, /* type */
|
||||
"cisco/ap-failover-priority", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_generic /* put */
|
||||
}
|
||||
,
|
||||
|
||||
{0,0,0,0,0,0,0,0}
|
||||
|
||||
@ -804,7 +906,7 @@ static int discovery_request_states[] = {CAPWAP_STATE_DISCOVERY,0};
|
||||
static struct cw_ElemDef discovery_request_elements[] ={
|
||||
/* {0,0, CAPWAP_ELEM_WTP_DESCRIPTOR, 1, 0},*/
|
||||
{0,0, CAPWAP_ELEM_WTP_BOARD_DATA, 0, 0},
|
||||
{0,CW_VENDOR_ID_CISCO, CW_CISCO_RAD_NAME, 1, 0},
|
||||
{0,CW_VENDOR_ID_CISCO, CISCO_ELEM_RAD_NAME, 1, 0},
|
||||
{0,CW_VENDOR_ID_CISCO, CW_CISCO_BOARD_DATA_OPTIONS, 0, 0},
|
||||
{0,0,0,00}
|
||||
|
||||
@ -873,12 +975,16 @@ static struct cw_ElemDef configuration_status_request_elements[] ={
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_MODEL, 1, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_RESET_BUTTON_STATE, 1, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_WTP_RADIO_CONFIGURATION, 1, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AC_NAME_WITH_INDEX, 0, 0},
|
||||
|
||||
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_USERNAME_PASSWORD, 1, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_LOGHOST_CONFIG, 1, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_TELNET_SSH, 1, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_SUBMODE, 1, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_ETHERNET_PORT_SUBTYPE, 1, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AC_IP_ADDR_WITH_INDEX, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_FAILOVER_PRIORITY, 1, 0},
|
||||
|
||||
{0,0,0,00}
|
||||
|
||||
@ -927,13 +1033,18 @@ static struct cw_ElemDef configuration_update_request_elements[] ={
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_RESET_BUTTON_STATE, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_WTP_RADIO_CONFIGURATION, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_LOCATION_DATA, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_RAD_NAME, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_CORE_DUMP, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_STATISTICS_TIMER, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AC_NAME_WITH_INDEX, 0, 0},
|
||||
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_USERNAME_PASSWORD, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_LOGHOST_CONFIG, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_TELNET_SSH, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_SUBMODE, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_ETHERNET_PORT_SUBTYPE, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AC_IP_ADDR_WITH_INDEX, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_FAILOVER_PRIORITY, 0, 0},
|
||||
|
||||
{0,0,0,00}
|
||||
|
||||
|
@ -114,7 +114,7 @@ static cw_action_in_t actions_in[] = {
|
||||
.capwap_state = CW_STATE_RUN,
|
||||
.vendor_id = CW_VENDOR_ID_CISCO,
|
||||
.msg_id = CAPWAP_MSG_CONFIGURATION_UPDATE_REQUEST,
|
||||
.elem_id = CW_CISCO_RAD_NAME,
|
||||
.elem_id = CISCO_ELEM_RAD_NAME,
|
||||
.item_id = CW_ITEM_WTP_NAME,
|
||||
.start = cw_in_generic,
|
||||
.min_len = 0,
|
||||
@ -280,7 +280,7 @@ static cw_action_out_t actions_out[]={
|
||||
{
|
||||
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
|
||||
.vendor_id = CW_VENDOR_ID_CISCO,
|
||||
.elem_id = CW_CISCO_RAD_NAME,
|
||||
.elem_id = CISCO_ELEM_RAD_NAME,
|
||||
.item_id = CW_ITEM_WTP_NAME,
|
||||
.out = cw_out_generic,
|
||||
/* .get = cw_out_get_config,*/
|
||||
|
@ -31,7 +31,7 @@
|
||||
#define CISCO_LWELEM_AP_USERNAME_PASSWORD 18
|
||||
#define LW_CISCO_MANAGER_IP_ADDR 19
|
||||
#define LW_CISCO_RADIO_MODULE_INFO 21
|
||||
#define LW_CISCO_AC_IP_ADDR_WITH_INDEX 32
|
||||
#define CISCO_LWELEM_AC_IP_ADDR_WITH_INDEX 32
|
||||
#define CISCO_LWELEM_AP_ETHERNET_PORT_SUBTYPE 34
|
||||
#define CISCO_LWELEM_AP_LOGHOST_CONFIG 36
|
||||
#define LW_CISCO_MCAST_MGID_INFO 39
|
||||
@ -42,6 +42,7 @@
|
||||
|
||||
#define LW_CISCO_PRIMED_DISCOVERY_TIMEOUT 50
|
||||
#define LW_CISCO_DELETE_WLAN 52
|
||||
#define CISCO_LWELEM_AP_FAILOVER_PRIORITY 53
|
||||
#define CISCO_LWELEM_PATH_MTU 73
|
||||
#define LW_CISCO_PRIMED_JOIN_TIMEOUT 85
|
||||
#define LW_CISCO_AP_DTLS_DATA_CFG 74
|
||||
|
@ -61,7 +61,7 @@ static cw_action_in_t actions_in[] = {
|
||||
.capwap_state = CAPWAP_STATE_DISCOVERY,
|
||||
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
|
||||
.vendor_id = CW_VENDOR_ID_CISCO,
|
||||
.elem_id = CW_CISCO_RAD_NAME,
|
||||
.elem_id = CISCO_ELEM_RAD_NAME,
|
||||
.start=cw_in_generic2,
|
||||
.item_id = "wtp_name",
|
||||
.min_len=1,
|
||||
|
@ -109,7 +109,7 @@ static cw_action_in_t actions_in[] = {
|
||||
.capwap_state = CW_STATE_RUN,
|
||||
.vendor_id = CW_VENDOR_ID_CISCO,
|
||||
.msg_id = CAPWAP_MSG_CONFIGURATION_UPDATE_REQUEST,
|
||||
.elem_id = CW_CISCO_RAD_NAME,
|
||||
.elem_id = CISCO_ELEM_RAD_NAME,
|
||||
.item_id = CW_ITEM_WTP_NAME,
|
||||
.start = cw_in_generic2,
|
||||
.min_len = 0,
|
||||
@ -158,7 +158,7 @@ static cw_action_out_t actions_out[]={
|
||||
{
|
||||
.msg_id = CW_MSG_DISCOVERY_REQUEST,
|
||||
.vendor_id = CW_VENDOR_ID_CISCO,
|
||||
.elem_id = CW_CISCO_RAD_NAME,
|
||||
.elem_id = CISCO_ELEM_RAD_NAME,
|
||||
.item_id = CW_ITEM_WTP_NAME,
|
||||
.out = cw_out_generic,
|
||||
.get = cw_out_get_config,
|
||||
|
@ -1,28 +1,154 @@
|
||||
cisco/ssl-certfile:Str:"../../ssl/certs/wtpc.crt"
|
||||
cisco/ssl-keyfile:Str:"../../ssl/certs/wtpc.key"
|
||||
cisco/ssl-cipher:Str:ALL
|
||||
|
||||
|
||||
|
||||
discovery-type :Byte: 0
|
||||
|
||||
ac-descriptor/dtls-policy :Byte: 0
|
||||
ac-descriptor/hardware/vendor :Dword: 4232704
|
||||
ac-descriptor/hardware/version :Bstr16: .x01000001
|
||||
ac-descriptor/max-wtps :Word: 200
|
||||
ac-descriptor/r-mac-field :Byte: 1
|
||||
ac-descriptor/reserved1 :Byte: 0
|
||||
ac-descriptor/security :Byte: 2
|
||||
ac-descriptor/software/vendor :Dword: 4232704
|
||||
ac-descriptor/software/version :Bstr16: .x07036500
|
||||
ac-descriptor/station-limit :Word: 1000
|
||||
ac-descriptor/stations :Word: 0
|
||||
ac-name :Bstr16: CiscoAC73
|
||||
ac-name-with-priority/TubesAC :Byte: 3
|
||||
ac-name-with-priority/ac2 :Byte: 5
|
||||
capwap-control-ip-address/address.0 :IPAddress: 192.168.0.173
|
||||
capwap-control-ip-address/address.1 :IPAddress: d96c:4c0a:da6c:4c0a:db6c:4c0a:dc6c:4c0a
|
||||
capwap-control-ip-address/address.2 :IPAddress: 192.168.0.173
|
||||
capwap-control-ip-address/wtps.0 :Word: 0
|
||||
capwap-control-ip-address/wtps.1 :Word: 10
|
||||
capwap-control-ip-address/wtps.2 :Word: 1
|
||||
capwap-local-ip-address :IPAddress: 192.168.0.14
|
||||
capwap-timers/echo-interval :Byte: 30
|
||||
capwap-timers/max-discovery-interval :Byte: 10
|
||||
capwap-timers/min-discovery-interval :Byte: 0
|
||||
cisco/ac-ip-addr-with-index.0 :IPAddress: 0.0.0.0
|
||||
cisco/ac-ip-addr-with-index.1 :IPAddress: 9.9.9.9
|
||||
cisco/ac-ip-addr-with-index.2 :IPAddress: 8.8.8.8
|
||||
cisco/ac-name-with-index.0 :Bstr16: CiscoAC73
|
||||
cisco/ac-name-with-index.1 :Bstr16: nudelnudel
|
||||
cisco/ac-name-with-index.2 :Bstr16: nadelnalde
|
||||
cisco/ap-failover-priority :Byte: 4
|
||||
cisco/ap-group-name :Bstr16: default-group
|
||||
cisco/ap-led-state-config/led-state :Byte: 1
|
||||
cisco/ap-led-state-config/save-flag :Byte: 1
|
||||
cisco/ap-log-facility :Byte: 0
|
||||
cisco/ap-regulatory-domain.0/code0 :Byte: 0
|
||||
cisco/ap-regulatory-domain.0/code1 :Byte: 1
|
||||
cisco/ap-regulatory-domain.0/set :Bool: true
|
||||
cisco/ap-regulatory-domain.0/slot :Byte: 0
|
||||
cisco/ap-regulatory-domain.1/code0 :Byte: 0
|
||||
cisco/ap-regulatory-domain.1/code1 :Byte: 1
|
||||
cisco/ap-regulatory-domain.1/set :Bool: true
|
||||
cisco/ap-regulatory-domain.1/slot :Byte: 1
|
||||
cisco/ap-telnet-ssh/ssh :Bool: false
|
||||
cisco/ap-telnet-ssh/telnet :Bool: false
|
||||
cisco/ap-timesync/timestamp :Dword: 1524133283
|
||||
cisco/ap-timesync/type :Byte: 0
|
||||
cisco/board-data-options :Dword: 16777217
|
||||
cisco/lw_path_mtu/len :Word: 1095
|
||||
cisco/lw_path_mtu/max :Word: 1485
|
||||
cisco/mwar-addr/address :IPAddress: 192.168.0.180
|
||||
cisco/mwar-addr/mwar-type :Byte: 1
|
||||
cisco/mwar-addr/unknown :Word: 0
|
||||
|
||||
location-data :Bstr16: default location
|
||||
maximum-message-length :Word: 14000
|
||||
cisco/mwar-hash-value :Bstr16: 25f312452fcb0a908007304aa201d175d0516d7a
|
||||
cisco/mwar-type :Byte: 0
|
||||
cisco/ssl-certfile :Str: ../../ssl/certs/wtpc.crt
|
||||
cisco/ssl-cipher :Str: ALL
|
||||
cisco/ssl-keyfile :Str: ../../ssl/certs/wtpc.key
|
||||
discovery-type :Byte: 0
|
||||
idle-timeout :Dword: 300
|
||||
location-data :Bstr16: "superposition\"tobias"
|
||||
maximum-message-length :Word: 4096
|
||||
radio.0/admin-state :Byte: 1
|
||||
radio.0/cisco-multi-domain-capability/first-channel :Word: 1
|
||||
radio.0/cisco-multi-domain-capability/max-tx-power-level :Word: 65535
|
||||
radio.0/cisco-multi-domain-capability/number-of-channels :Word: 13
|
||||
radio.0/cisco-multi-domain-capability/reserved :Byte: 1
|
||||
radio.0/cisco/air-space-capability :Byte: 0
|
||||
radio.0/cisco/mac-operation/fragmentation-threshold :Word: 2346
|
||||
radio.0/cisco/mac-operation/long-retry :Byte: 4
|
||||
radio.0/cisco/mac-operation/reserved :Byte: 1
|
||||
radio.0/cisco/mac-operation/rts-threshold :Word: 2347
|
||||
radio.0/cisco/mac-operation/rx-msdu-lifetime :Dword: 512
|
||||
radio.0/cisco/mac-operation/short-retry :Byte: 7
|
||||
radio.0/cisco/mac-operation/tx-msdu-lifetime :Dword: 512
|
||||
radio.0/cisco/multi-domain-capability/first-channel :Word: 1
|
||||
radio.0/cisco/multi-domain-capability/max-tx-power-level :Word: 20
|
||||
radio.0/cisco/multi-domain-capability/number-of-channels :Word: 13
|
||||
radio.0/cisco/multi-domain-capability/reserved :Byte: 1
|
||||
radio.0/cisco/tx-power/current-tx-power :Word: 0
|
||||
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: .x04fe7f499b90
|
||||
radio.0/cisco/wtp-radio-config/cfg-period :Byte: 4
|
||||
radio.0/cisco/wtp-radio-config/cfg-type :Byte: 1
|
||||
radio.0/cisco/wtp-radio-config/cfp-maximum-duration :Word: 60
|
||||
radio.0/cisco/wtp-radio-config/country-str1 :Bstr16: .x444500
|
||||
radio.0/cisco/wtp-radio-config/country-str2 :Bstr16: DE
|
||||
radio.0/cisco/wtp-radio-config/gpr-period :Byte: 10
|
||||
radio.0/cisco/wtp-radio-config/max-stations :Byte: 200
|
||||
radio.0/cisco/wtp-radio-config/occupancy-limit :Word: 100
|
||||
radio.0/cisco/wtp-radio-config/reg :Dword: 65536
|
||||
radio.0/decryption-error-report-period :Word: 120
|
||||
radio.0/operational-state/cause :Byte: 0
|
||||
radio.0/operational-state/state :Byte: 2
|
||||
radio.0/rate_set :Bstr16: .x82848b960c1218243048606c
|
||||
radio.0/wtp-radio-information :Dword: 1
|
||||
radio.1/admin-state :Byte: 1
|
||||
radio.1/cisco-multi-domain-capability/first-channel :Word: 36
|
||||
radio.1/cisco-multi-domain-capability/max-tx-power-level :Word: 65535
|
||||
radio.1/cisco-multi-domain-capability/number-of-channels :Word: 16
|
||||
radio.1/cisco-multi-domain-capability/reserved :Byte: 1
|
||||
radio.1/cisco/air-space-capability :Byte: 0
|
||||
radio.1/cisco/mac-operation/fragmentation-threshold :Word: 2346
|
||||
radio.1/cisco/mac-operation/long-retry :Byte: 4
|
||||
radio.1/cisco/mac-operation/reserved :Byte: 1
|
||||
radio.1/cisco/mac-operation/rts-threshold :Word: 2347
|
||||
radio.1/cisco/mac-operation/rx-msdu-lifetime :Dword: 512
|
||||
radio.1/cisco/mac-operation/short-retry :Byte: 7
|
||||
radio.1/cisco/mac-operation/tx-msdu-lifetime :Dword: 512
|
||||
radio.1/cisco/multi-domain-capability/first-channel :Word: 36
|
||||
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/current-tx-power :Word: 0
|
||||
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
|
||||
radio.1/cisco/wtp-radio-config/cfg-period :Byte: 4
|
||||
radio.1/cisco/wtp-radio-config/cfg-type :Byte: 1
|
||||
radio.1/cisco/wtp-radio-config/cfp-maximum-duration :Word: 60
|
||||
radio.1/cisco/wtp-radio-config/country-str1 :Bstr16: .x444500
|
||||
radio.1/cisco/wtp-radio-config/country-str2 :Bstr16: DE
|
||||
radio.1/cisco/wtp-radio-config/gpr-period :Byte: 10
|
||||
radio.1/cisco/wtp-radio-config/max-stations :Byte: 200
|
||||
radio.1/cisco/wtp-radio-config/occupancy-limit :Word: 100
|
||||
radio.1/cisco/wtp-radio-config/reg :Dword: 65536
|
||||
radio.1/decryption-error-report-period :Word: 120
|
||||
radio.1/operational-state/cause :Byte: 0
|
||||
radio.1/operational-state/state :Byte: 2
|
||||
radio.1/rate_set :Bstr16: .x8c129824b048606c
|
||||
radio.1/wtp-radio-information :Dword: 2
|
||||
radio.255/admin-state :Byte: 1
|
||||
radio.255/operational-state/cause :Byte: 0
|
||||
radio.255/operational-state/state :Byte: 2
|
||||
radio/0/cisco/regulatory-domain/code0 :Byte: 0
|
||||
radio/0/cisco/regulatory-domain/code1 :Byte: 1
|
||||
radio/0/cisco/regulatory-domain/set :Bool: true
|
||||
radio/0/cisco/regulatory-domain/slot :Byte: 0
|
||||
radio/0/wtp-radio-information :Dword: 1
|
||||
radio/1/wtp-radio-information :Dword: 2
|
||||
result-code :Dword: 0
|
||||
session-id :Bstr16: .x00006215
|
||||
statistics-timer :Word: 180
|
||||
tube.0/main :Byte: 12
|
||||
tube.0/zumsel :Byte: 12
|
||||
tube.1/main :Byte: 12
|
||||
tube.1/zumsel :Byte: 12
|
||||
wtp-board-data/board-id :Bstr16: .x0000
|
||||
wtp-board-data/mac-address :Bstr16: .x902b34de9ef1
|
||||
wtp-board-data/model-no :Bstr16: AIR-LAP1142N-E-K9
|
||||
wtp-board-data/model-no :Bstr16: AIR-LAP1142N-E-K9
|
||||
wtp-board-data/serial-no :Bstr16: FCZ1406W232
|
||||
wtp-board-data/vendor :Dword: 4232704
|
||||
wtp-descriptor/bootloader/vendor :Dword: 4232704
|
||||
@ -33,17 +159,10 @@ wtp-descriptor/max-radios :Byte: 2
|
||||
wtp-descriptor/radios-in-use :Byte: 2
|
||||
wtp-descriptor/software/vendor :Dword: 4232704
|
||||
wtp-descriptor/software/version :Bstr16: .x06036500
|
||||
wtp-fallback :Byte: 1
|
||||
wtp-frame-tunnel-mode :Byte: 4
|
||||
wtp-mac-type :Byte: 1
|
||||
wtp-name :Bstr16: WFAT-01
|
||||
|
||||
|
||||
capwap-timers/max-discovery-interval:Byte:0
|
||||
capwap-timers/min-discovery-interval:Byte:0
|
||||
capwap-timers/echo-interval:Byte:3
|
||||
|
||||
ac-name-with-priority/TubesAC:Byte:3
|
||||
|
||||
wtp-name :Bstr16: Banane
|
||||
wtp-reboot-statistics/ac-initiated-count :Word: 2
|
||||
wtp-reboot-statistics/hw-failure-count :Word: 0
|
||||
wtp-reboot-statistics/last-failure-type :Byte: 0
|
||||
@ -52,64 +171,3 @@ wtp-reboot-statistics/other-failure-count :Word: 13
|
||||
wtp-reboot-statistics/reboot-count :Word: 0
|
||||
wtp-reboot-statistics/sw-failure-count :Word: 0
|
||||
wtp-reboot-statistics/unknown-failure-count :Word: 0
|
||||
|
||||
|
||||
|
||||
radio/0/cisco/regulatory-domain/code0 :Byte: 0
|
||||
radio/0/cisco/regulatory-domain/code1 :Byte: 1
|
||||
radio/0/cisco/regulatory-domain/set :Bool: true
|
||||
radio/0/cisco/regulatory-domain/slot :Byte: 0
|
||||
|
||||
|
||||
cisco/ap-regulatory-domain.0/code0 :Byte: 0
|
||||
cisco/ap-regulatory-domain.0/code1 :Byte: 1
|
||||
cisco/ap-regulatory-domain.0/set :Bool: true
|
||||
cisco/ap-regulatory-domain.0/slot :Byte: 0
|
||||
cisco/ap-regulatory-domain.1/code0 :Byte: 0
|
||||
cisco/ap-regulatory-domain.1/code1 :Byte: 1
|
||||
cisco/ap-regulatory-domain.1/set :Bool: true
|
||||
cisco/ap-regulatory-domain.1/slot :Byte: 1
|
||||
|
||||
|
||||
tube.0/main : Byte : 12
|
||||
tube.0/zumsel : Byte : 12
|
||||
tube.1/main : Byte : 12
|
||||
tube.1/zumsel : Byte : 12
|
||||
|
||||
|
||||
ac-name-with-priority/TubesAC:Byte:3
|
||||
ac-name-with-priority/"ac2":Byte:05
|
||||
|
||||
radio.0/cisco-multi-domain-capability/first-channel :Word: 1
|
||||
radio.0/cisco-multi-domain-capability/max-tx-power-level :Word: 65535
|
||||
radio.0/cisco-multi-domain-capability/number-of-channels :Word: 13
|
||||
radio.0/cisco-multi-domain-capability/reserved :Byte: 1
|
||||
radio.0/cisco/wtp-radio-config/beacon-period :Word: 0
|
||||
radio.0/cisco/wtp-radio-config/bss-id :Bstr16: .x04fe7f499b90
|
||||
radio.0/cisco/wtp-radio-config/cfg-period :Byte: 0
|
||||
radio.0/cisco/wtp-radio-config/cfg-type :Byte: 1
|
||||
radio.0/cisco/wtp-radio-config/cfp-maximum-duration :Word: 0
|
||||
radio.0/cisco/wtp-radio-config/country-str1 :Bstr16: "DE "
|
||||
radio.0/cisco/wtp-radio-config/country-str2 :Bstr16: "DE "
|
||||
radio.0/cisco/wtp-radio-config/gpr-period :Byte: 0
|
||||
radio.0/cisco/wtp-radio-config/max-stations :Byte: 0
|
||||
radio.0/cisco/wtp-radio-config/occupancy-limit :Word: 0
|
||||
radio.0/cisco/wtp-radio-config/reg :Dword: 65536
|
||||
radio.1/cisco-multi-domain-capability/first-channel :Word: 36
|
||||
radio.1/cisco-multi-domain-capability/max-tx-power-level :Word: 65535
|
||||
radio.1/cisco-multi-domain-capability/number-of-channels :Word: 16
|
||||
radio.1/cisco-multi-domain-capability/reserved :Byte: 1
|
||||
radio.1/cisco/wtp-radio-config/beacon-period :Word: 0
|
||||
radio.1/cisco/wtp-radio-config/bss-id :Bstr16: .x04fe7f499b90
|
||||
radio.1/cisco/wtp-radio-config/cfg-period :Byte: 0
|
||||
radio.1/cisco/wtp-radio-config/cfg-type :Byte: 1
|
||||
radio.1/cisco/wtp-radio-config/cfp-maximum-duration :Word: 0
|
||||
radio.1/cisco/wtp-radio-config/country-str1 :Bstr16: DE
|
||||
radio.1/cisco/wtp-radio-config/country-str2 :Bstr16: DE
|
||||
radio.1/cisco/wtp-radio-config/gpr-period :Byte: 0
|
||||
radio.1/cisco/wtp-radio-config/max-stations :Byte: 0
|
||||
radio.1/cisco/wtp-radio-config/occupancy-limit :Word: 0
|
||||
radio.1/cisco/wtp-radio-config/reg :Dword: 65536
|
||||
|
||||
radio.0/wtp-radio-information :Dword: 1
|
||||
radio.1/wtp-radio-information :Dword: 2
|
||||
|
@ -116,7 +116,23 @@ static void do_update(struct conn * conn)
|
||||
|
||||
}
|
||||
|
||||
void clean_cfg(mavl_t cfg)
|
||||
{
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
cw_KTV_t search;
|
||||
int i;
|
||||
int max;
|
||||
max = cw_ktv_idx_get(cfg,"radio");
|
||||
for (i=0;i<max+1;i++){
|
||||
sprintf(key,"radio.%d/wtp-radio-information",i);
|
||||
search.key = key;
|
||||
mavl_del(cfg,&search);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
int run(struct conn * conn)
|
||||
@ -147,9 +163,14 @@ int run(struct conn * conn)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( !cw_result_is_ok(rc))
|
||||
break;
|
||||
|
||||
clean_cfg(conn->remote_cfg);
|
||||
mavl_merge(conn->local_cfg,conn->remote_cfg);
|
||||
cw_ktv_save(conn->local_cfg,"cisco.ktv");
|
||||
|
||||
|
||||
/*cw_dbg(DBG_X,"We hav a message processed");*/
|
||||
|
||||
|
@ -142,6 +142,10 @@ int main (int argc, char **argv)
|
||||
|
||||
|
||||
cw_dbg_ktv_dump(global_cfg,DBG_CFG_DMP,"----- global cfg start -----","","----- global cfg end -----");
|
||||
|
||||
|
||||
/*clean_cfg(global_cfg);*/
|
||||
|
||||
|
||||
/* create a connection object */
|
||||
conn = conn_create_noq(-1, NULL);
|
||||
@ -216,11 +220,16 @@ exit(0);
|
||||
}
|
||||
}
|
||||
*/
|
||||
mavl_del_all(conn->remote_cfg);
|
||||
join(conn,&dis);
|
||||
clean_cfg(conn->remote_cfg);
|
||||
mavl_merge(conn->local_cfg,conn->remote_cfg);
|
||||
|
||||
|
||||
mavl_del_all(conn->remote_cfg);
|
||||
configure(conn);
|
||||
clean_cfg(conn->remote_cfg);
|
||||
mavl_merge(conn->local_cfg,conn->remote_cfg);
|
||||
|
||||
run(conn);
|
||||
|
||||
cw_discovery_free_results(&dis);
|
||||
|
Loading…
Reference in New Issue
Block a user