ap mode and type

FossilOrigin-Name: 2af164df0a3ba77f954d8e5f30fbf3f7c7adcea71899bcc42111553005872297
This commit is contained in:
7u83@mail.ru 2018-04-22 08:01:54 +00:00
parent d1363a2e14
commit 03fe8d0da5
3 changed files with 16 additions and 57 deletions

View File

@ -4,8 +4,8 @@
<Project Name="wtp" Path="wtp.project" Active="No"/>
<Project Name="mod_cipwap" Path="mod_cipwap.project" Active="No"/>
<Project Name="mod_capwap" Path="mod_capwap.project" Active="No"/>
<Project Name="mod_cisco" Path="mod_cisco.project" Active="No"/>
<Project Name="libcw" Path="libcw.project" Active="Yes"/>
<Project Name="mod_cisco" Path="mod_cisco.project" Active="Yes"/>
<Project Name="libcw" Path="libcw.project" Active="No"/>
<Project Name="mod_capwap80211" Path="mod_capwap80211.project" Active="No"/>
<Project Name="mod_fortinet" Path="mod_fortinet.project" Active="No"/>
<BuildMatrix>

View File

@ -380,59 +380,13 @@ static cw_KTVStruct_t cisco_ap_venue_settings[]={
{NULL,NULL,0,0}
};
/*
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;
}
static cw_KTVStruct_t cisco_ap_mode_and_type[]={
{CW_TYPE_BYTE,"mode",1,-1},
{CW_TYPE_BYTE,"type",1,-1},
{NULL,NULL,0,0}
};
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;
}
*/
@ -738,10 +692,10 @@ static struct cw_ElemHandler handlers[] = {
CISCO_ELEM_AP_MODE_AND_TYPE, /* Element ID */
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
2,2, /* min/max length */
CW_TYPE_WORD, /* type */
cisco_ap_mode_and_type, /* type */
"cisco/ap-mode-and-type", /* Key */
cw_in_generic, /* get */
cw_out_generic /* put */
cw_in_generic_struct, /* get */
cw_out_generic_struct /* put */
},
{

View File

@ -96,7 +96,7 @@ cisco/wtp-board-data/failover-priority :Bstr16: .x01010003
cisco/wtp-board-data/options/ant-type :Byte: 1
cisco/wtp-board-data/options/ap-type :Byte: 0
cisco/wtp-board-data/options/failover-priority :Byte: 2
cisco/wtp-board-data/options/flex-connect :Byte: 0
cisco/wtp-board-data/options/flex-connect :Byte: 1
cisco/wtp-board-data/wtp-model-hi :Dword: 0
cisco/wtp-board-data/wtp-model-lo :Dword: 0
cisco/wtp-board-data/wtp-serial-number :Str: FCZ1406W232
@ -216,3 +216,8 @@ 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
cisco/ap-mode-and-type/mode :Byte: 0
cisco/ap-mode-and-type/type :Byte: 15
cisco/ap-model/model :Str: AIR-LAP1142N-E-K9