Work on regulatory domains
FossilOrigin-Name: d4f75679142a708394989c19c5257a355f2a99e8e13c7e82d5f9677c8396485f
This commit is contained in:
parent
17e9f1636d
commit
2cc0ca6f17
@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CodeLite_Workspace Name="actube" Database="">
|
<CodeLite_Workspace Name="actube" Database="">
|
||||||
<Project Name="ac" Path="ac.project" Active="No"/>
|
<Project Name="ac" Path="ac.project" Active="No"/>
|
||||||
<Project Name="wtp" Path="wtp.project" Active="No"/>
|
<Project Name="wtp" Path="wtp.project" Active="Yes"/>
|
||||||
<Project Name="mod_cipwap" Path="mod_cipwap.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_capwap" Path="mod_capwap.project" Active="No"/>
|
||||||
<Project Name="mod_cisco" Path="mod_cisco.project" Active="No"/>
|
<Project Name="mod_cisco" Path="mod_cisco.project" Active="No"/>
|
||||||
<Project Name="libcw" Path="libcw.project" Active="Yes"/>
|
<Project Name="libcw" Path="libcw.project" Active="No"/>
|
||||||
<Project Name="mod_capwap80211" Path="mod_capwap80211.project" Active="No"/>
|
<Project Name="mod_capwap80211" Path="mod_capwap80211.project" Active="No"/>
|
||||||
<Project Name="mod_fortinet" Path="mod_fortinet.project" Active="No"/>
|
<Project Name="mod_fortinet" Path="mod_fortinet.project" Active="No"/>
|
||||||
<BuildMatrix>
|
<BuildMatrix>
|
||||||
|
@ -29,7 +29,6 @@ ac-descriptor/software/vendor :Dword: 4232704
|
|||||||
ac-descriptor/software/version :Bstr16: .x07036500
|
ac-descriptor/software/version :Bstr16: .x07036500
|
||||||
ac-descriptor/station-limit :Word: 1000
|
ac-descriptor/station-limit :Word: 1000
|
||||||
ac-descriptor/stations :Word: 0
|
ac-descriptor/stations :Word: 0
|
||||||
ac-name :Bstr16: CiscoAC73
|
|
||||||
capwap-control-ip-address/address.0 :IPAddress: 192.168.0.14
|
capwap-control-ip-address/address.0 :IPAddress: 192.168.0.14
|
||||||
capwap-control-ip-address/wtps.0 :Word: 2
|
capwap-control-ip-address/wtps.0 :Word: 2
|
||||||
cisco/mwar-type :Byte: 0
|
cisco/mwar-type :Byte: 0
|
||||||
|
@ -11,20 +11,24 @@ int cw_ktv_mavlcmp(const void *v1, const void *v2)
|
|||||||
char *d1,*d2;
|
char *d1,*d2;
|
||||||
int l1,l2,rc,i1,i2;
|
int l1,l2,rc,i1,i2;
|
||||||
|
|
||||||
|
/* Find dots in both keys */
|
||||||
d1 = strchr(((cw_KTV_t *) v1)->key,'.');
|
d1 = strchr(((cw_KTV_t *) v1)->key,'.');
|
||||||
d2 = strchr(((cw_KTV_t *) v2)->key,'.');
|
d2 = strchr(((cw_KTV_t *) v2)->key,'.');
|
||||||
|
|
||||||
|
/* if there are no dots, compare keys as normal */
|
||||||
if (d1==NULL || d2==NULL)
|
if (d1==NULL || d2==NULL)
|
||||||
return strcmp(((cw_KTV_t *) v1)->key, ((cw_KTV_t *) v2)->key);
|
return strcmp(((cw_KTV_t *) v1)->key, ((cw_KTV_t *) v2)->key);
|
||||||
|
|
||||||
|
/* calculate the length of the key till dots */
|
||||||
l1=d1-((cw_KTV_t *) v1)->key;
|
l1=d1-((cw_KTV_t *) v1)->key;
|
||||||
l2=d2-((cw_KTV_t *) v2)->key;
|
l2=d2-((cw_KTV_t *) v2)->key;
|
||||||
|
|
||||||
|
/* if length differs do a normal compare */
|
||||||
if (l1!=l2){
|
if (l1!=l2){
|
||||||
return strcmp(((cw_KTV_t *) v1)->key, ((cw_KTV_t *) v2)->key);
|
return strcmp(((cw_KTV_t *) v1)->key, ((cw_KTV_t *) v2)->key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rc = strncmp(((cw_KTV_t *) v1)->key,((cw_KTV_t *) v2)->key,l1);
|
rc = strncmp(((cw_KTV_t *) v1)->key,((cw_KTV_t *) v2)->key,l1);
|
||||||
if (rc!=0){
|
if (rc!=0){
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -8,28 +8,32 @@ int cw_out_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHandler
|
|||||||
, uint8_t * dst)
|
, uint8_t * dst)
|
||||||
{
|
{
|
||||||
int start;
|
int start;
|
||||||
int len,l;
|
int len;
|
||||||
|
cw_KTV_t search, *result;
|
||||||
|
|
||||||
|
|
||||||
if (!handler->type){
|
if (!handler->type){
|
||||||
cw_log(LOG_ERR,"Can't handle element: %s, no type defined",handler->name);
|
cw_log(LOG_ERR,"Can't handle element: %s, no type defined",handler->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
search.key = (char*)handler->key;
|
||||||
|
result = mavl_get_first(params->conn->local_cfg,&search);
|
||||||
|
if (result == NULL ){
|
||||||
|
if (params->elemdata->mand)
|
||||||
|
cw_log(LOG_ERR,"Can't put mandatory message element %s, no data available",handler->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strncmp(result->key,handler->key, strlen(handler->key))!=0){
|
||||||
|
if (params->elemdata->mand)
|
||||||
|
cw_log(LOG_ERR,"Can't put mandatory message element %s, no data available",handler->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
start = params->conn->header_len(handler);
|
start = params->conn->header_len(handler);
|
||||||
|
|
||||||
|
|
||||||
len = cw_ktv_write_struct(params->conn->local_cfg,handler->type,handler->key,dst+start);
|
len = cw_ktv_write_struct(params->conn->local_cfg,handler->type,handler->key,dst+start);
|
||||||
|
|
||||||
return params->conn->write_header(handler,dst,len);
|
return params->conn->write_header(handler,dst,len);
|
||||||
|
|
||||||
/* if (handler->vendor)
|
|
||||||
return len + cw_put_elem_vendor_hdr(dst, handler->vendor, handler->id, len);
|
|
||||||
|
|
||||||
l = len + cw_put_elem_hdr(dst, handler->id, len);
|
|
||||||
*/
|
|
||||||
return l;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,18 +7,15 @@ int cw_out_idx_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHan
|
|||||||
{
|
{
|
||||||
char key[CW_KTV_MAX_KEY_LEN];
|
char key[CW_KTV_MAX_KEY_LEN];
|
||||||
struct cw_KTV * elem, search;
|
struct cw_KTV * elem, search;
|
||||||
|
int i;
|
||||||
int len,i,l;
|
|
||||||
int radios;
|
|
||||||
int idx, sr;
|
int idx, sr;
|
||||||
int pos;
|
int len;
|
||||||
uint8_t * mdst;
|
uint8_t * mdst, *start;
|
||||||
|
|
||||||
|
|
||||||
len =0;
|
|
||||||
|
|
||||||
i=0;
|
i=0;
|
||||||
|
|
||||||
pos = 0;
|
len = 0;
|
||||||
mdst = dst;
|
mdst = dst;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@ -29,51 +26,42 @@ int cw_out_idx_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHan
|
|||||||
/*elem = mavl_get(params->conn->local_cfg, &search);*/
|
/*elem = mavl_get(params->conn->local_cfg, &search);*/
|
||||||
elem = mavl_get_first(params->conn->local_cfg,&search);
|
elem = mavl_get_first(params->conn->local_cfg,&search);
|
||||||
if(elem != NULL){
|
if(elem != NULL){
|
||||||
printf("Elem key: %s",elem->key);
|
printf("Elem key: %s\n",elem->key);
|
||||||
}
|
}
|
||||||
sr = sscanf(elem->key,handler->key,&idx);
|
sr = sscanf(elem->key,handler->key,&idx);
|
||||||
|
|
||||||
if (sr!=1)
|
if (sr!=1)
|
||||||
break;
|
break;
|
||||||
if (idx<=i)
|
if (idx<i)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
sprintf(key,handler->key,idx);
|
sprintf(key,handler->key,idx);
|
||||||
|
|
||||||
printf("Here we are '%s'! --> %d\n",key,idx);
|
printf("Here we are '%s'! --> %d\n",key,idx);
|
||||||
|
|
||||||
|
len =0;
|
||||||
pos = params->conn->header_len(handler);
|
start = mdst + params->conn->header_len(handler);
|
||||||
|
|
||||||
pos += cw_put_byte(mdst+pos,idx);
|
len += cw_put_byte(start+len,idx);
|
||||||
pos += cw_ktv_write_struct(params->conn->local_cfg,handler->type,key,mdst+pos);
|
len += cw_ktv_write_struct(params->conn->local_cfg,handler->type,key,start+len);
|
||||||
|
|
||||||
mdst += params->conn->write_header(handler,mdst,pos);
|
mdst += params->conn->write_header(handler,mdst,len);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
i=idx+1;
|
i=idx+1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}while(1);
|
}while(1);
|
||||||
|
|
||||||
exit(0);
|
|
||||||
|
|
||||||
radios = cw_ktv_get_byte(params->conn->local_cfg,"wtp-descriptor/max-radios",0);
|
/* radios = cw_ktv_get_byte(params->conn->local_cfg,"wtp-descriptor/max-radios",0);
|
||||||
|
|
||||||
for(i=1;i<radios+1;i++){
|
for(i=1;i<radios+1;i++){
|
||||||
l = cw_write_radio_element(handler,params,i,dst+len);
|
l = cw_write_radio_element(handler,params,i,dst+len);
|
||||||
cw_dbg_elem(DBG_ELEM_OUT,params->conn,params->msgdata->type,handler,dst,l);
|
cw_dbg_elem(DBG_ELEM_OUT,params->conn,params->msgdata->type,handler,dst,l);
|
||||||
len+=l;
|
len+=l;
|
||||||
}
|
}
|
||||||
return len;
|
*/
|
||||||
|
return mdst-dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ wtp-descriptor/software/vendor :Dword: 4232704
|
|||||||
wtp-descriptor/software/version :Bstr16: .x06036500
|
wtp-descriptor/software/version :Bstr16: .x06036500
|
||||||
wtp-frame-tunnel-mode :Byte: 4
|
wtp-frame-tunnel-mode :Byte: 4
|
||||||
wtp-mac-type :Byte: 1
|
wtp-mac-type :Byte: 1
|
||||||
wtp-name :Bstr16: APc47d.4f3a.f8a6
|
wtp-name :Bstr16: WFAT-01
|
||||||
|
|
||||||
|
|
||||||
capwap-timers/max-discovery-interval:Byte:0
|
capwap-timers/max-discovery-interval:Byte:0
|
||||||
@ -61,10 +61,10 @@ radio/0/cisco/regulatory-domain/set :Bool: true
|
|||||||
radio/0/cisco/regulatory-domain/slot :Byte: 0
|
radio/0/cisco/regulatory-domain/slot :Byte: 0
|
||||||
|
|
||||||
|
|
||||||
cisco/regulatory-domain/019/code0 :Byte: 0
|
cisco/regulatory-domain/000/code0 :Byte: 0
|
||||||
cisco/regulatory-domain/019/code1 :Byte: 1
|
cisco/regulatory-domain/000/code1 :Byte: 1
|
||||||
cisco/regulatory-domain/019/set :Bool: true
|
cisco/regulatory-domain/000/set :Bool: true
|
||||||
cisco/regulatory-domain/019/slot :Byte: 0
|
cisco/regulatory-domain/000/slot :Byte: 0
|
||||||
cisco/regulatory-domain/001/code0 :Byte: 0
|
cisco/regulatory-domain/001/code0 :Byte: 0
|
||||||
cisco/regulatory-domain/001/code1 :Byte: 1
|
cisco/regulatory-domain/001/code1 :Byte: 1
|
||||||
cisco/regulatory-domain/001/set :Bool: true
|
cisco/regulatory-domain/001/set :Bool: true
|
||||||
|
Loading…
Reference in New Issue
Block a user