Lots done in move to typeless
This commit is contained in:
@ -354,7 +354,7 @@ static struct cw_ElemHandler handlers[] = {
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"admin-state", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic_struct, /* put */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
radio_admin_state, /* type */
|
||||
@ -365,12 +365,16 @@ static struct cw_ElemHandler handlers[] = {
|
||||
{
|
||||
"CAPWAP Timers", /* name */
|
||||
CAPWAP_ELEM_CAPWAP_TIMERS, /* Element ID */
|
||||
0, 0, /* Vendor / Proto */
|
||||
2, 2, /* min/max length */
|
||||
capwap_timers, /* type */
|
||||
"capwap-timers", /* Key */
|
||||
cw_in_generic_struct, /* get */
|
||||
cw_out_generic_struct /* put */
|
||||
0, 0, /* Vendor / Proto */
|
||||
2, 2, /* min/max length */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"capwap-timers", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
capwap_timers,
|
||||
|
||||
}
|
||||
,
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ static int put_ac_status(mavl_t global, mavl_t local, uint8_t *dst, const char *
|
||||
|
||||
uint8_t *d = dst;
|
||||
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
|
||||
|
||||
d += cw_put_word(d,cw_ktv_get_word(global,"ac-descriptor/stations",0));
|
||||
@ -56,12 +56,13 @@ static int put_ac_status(mavl_t global, mavl_t local, uint8_t *dst, const char *
|
||||
int capwap_out_ac_descriptor(struct cw_ElemHandler * eh,
|
||||
struct cw_ElemHandlerParams * params, uint8_t * dst)
|
||||
{
|
||||
int len,l;
|
||||
stop();
|
||||
/* int len,l;
|
||||
uint8_t *d = dst+4;
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
|
||||
d+=put_ac_status(params->cfg,
|
||||
params->default_cfg,
|
||||
params->global_cfg,
|
||||
d, eh->key);
|
||||
|
||||
sprintf(key,"%s/%s",eh->key,CW_SKEY_HARDWARE);
|
||||
@ -76,7 +77,7 @@ int capwap_out_ac_descriptor(struct cw_ElemHandler * eh,
|
||||
|
||||
l = len + cw_put_elem_hdr(dst,eh->id,len);
|
||||
cw_dbg_elem(DBG_ELEM_OUT,NULL,params->msgdata->type,eh,dst,l);
|
||||
|
||||
return l;
|
||||
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ static int cw_put_encryption_subelems(uint8_t *dst,int capwap_mode)
|
||||
int capwap_out_wtp_descriptor(struct cw_ElemHandler * eh,
|
||||
struct cw_ElemHandlerParams * params, uint8_t * dst)
|
||||
{
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
int len,l;
|
||||
/* // XXX Dummy WTP Descriptor Header */
|
||||
uint8_t *d;
|
||||
|
@ -218,7 +218,7 @@ static cw_ValStruct_t cisco_mac_operation75[]={
|
||||
static cw_ValStruct_t cisco_ap_power_injector_config[]={
|
||||
{CW_TYPE_BYTE,"state",1,-1},
|
||||
{CW_TYPE_BYTE,"selection",1,-1},
|
||||
{CW_TYPE_BSTR16,"sitch-mac-address",6,-1},
|
||||
{CW_TYPE_BSTR16,"switch-mac-address",6,-1},
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
@ -250,8 +250,8 @@ int cisco_out_ap_regulatory_domain(struct cw_ElemHandler * eh,
|
||||
struct cw_ElemHandlerParams * params, uint8_t * dst)
|
||||
|
||||
{
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
char testkey[CW_KTV_MAX_KEY_LEN];
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
char testkey[CW_CFG_MAX_KEY_LEN];
|
||||
int idx;
|
||||
void * type;
|
||||
cw_Val_t * result, search;
|
||||
@ -336,7 +336,6 @@ static cw_ValStruct_t cisco_direct_sequence_control70[]={
|
||||
};
|
||||
|
||||
static cw_ValStruct_t cisco_antenna_payload70[]={
|
||||
{CW_TYPE_BYTE,"radio-id",1,-1},
|
||||
{CW_TYPE_BYTE,"diversity-selection",1,-1},
|
||||
{CW_TYPE_BYTE,"antenna-mode",1,-1},
|
||||
{CW_TYPE_BYTE,"number-of-antennas",1,-1},
|
||||
@ -402,6 +401,7 @@ static cw_ValStruct_t cisco_wtp_radio_config75[]={
|
||||
|
||||
|
||||
static cw_ValStruct_t cisco_tx_power[]={
|
||||
{CW_TYPE_BYTE,"radio-id",1,-1},
|
||||
{CW_TYPE_BYTE,"reserved",1,-1},
|
||||
{CW_TYPE_WORD,"current-tx-power",2,-1},
|
||||
{NULL,NULL,0,0}
|
||||
@ -558,7 +558,7 @@ static int cisco_in_lw_del_wlan(struct cw_ElemHandler *eh,
|
||||
stop();
|
||||
|
||||
int wlan_id, radio_id;
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
|
||||
radio_id=cw_get_byte(data);
|
||||
wlan_id=cw_get_word(data+1);
|
||||
@ -633,7 +633,7 @@ static cw_ValValRange_t oper_val_cause[]={
|
||||
|
||||
static cw_ValStruct_t cisco_radio_oper_state[]={
|
||||
{CW_TYPE_BYTE, "state", 1, -1, oper_val_state},
|
||||
{CW_TYPE_BYTE, "cause", 1, -1,oper_val_cause},
|
||||
{CW_TYPE_BYTE, "cause", 1, -1, oper_val_cause},
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
@ -720,7 +720,7 @@ static int cisco_data(struct cw_ElemHandler *eh,
|
||||
uint8_t * data, int len)
|
||||
{
|
||||
int wlan_id, radio_id;
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
|
||||
radio_id=cw_get_byte(data);
|
||||
wlan_id=cw_get_word(data+1);
|
||||
@ -1206,10 +1206,14 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
CW_CISCO_DIRECT_SEQUENCE_CONTROL, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
9,9, /* min/max length */
|
||||
cisco_direct_sequence_control70, /* type */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/direct-sequence-control", /* Key */
|
||||
cw_in_radio_generic_struct, /* get */
|
||||
cw_out_radio_generic_struct /* put */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL, /* mkkey */
|
||||
NULL,
|
||||
cisco_direct_sequence_control70, /* param */
|
||||
|
||||
}
|
||||
,
|
||||
|
||||
@ -1221,9 +1225,9 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
9,9, /* min/max length */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/antenna-payload", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_radio_generic_struct, /* put */
|
||||
cw_mkradiokey,
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL, /* mkkey */
|
||||
NULL,
|
||||
cisco_antenna_payload70,
|
||||
|
||||
@ -1622,11 +1626,14 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
CAPWAP_ELEM_RADIO_OPERATIONAL_STATE, /* Element ID */
|
||||
0,0, /* Vendor / Proto */
|
||||
3,3, /* min/max length */
|
||||
cisco_radio_oper_state, /* type */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"operational-state", /* Key */
|
||||
cw_in_radio_generic_struct, /* get */
|
||||
cw_out_radio_generic_struct, /* put */
|
||||
NULL /* mkkey */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL, /* mkkey */
|
||||
NULL,
|
||||
cisco_radio_oper_state /* paam */
|
||||
|
||||
}
|
||||
,
|
||||
|
||||
@ -1669,7 +1676,7 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
},
|
||||
|
||||
{
|
||||
"CAPWAP Timers", /* name */
|
||||
"CAPWAP Timers (Cisco)", /* name */
|
||||
CISCO_ELEM_CAPWAP_TIMERS, /* Element ID */
|
||||
0, 0, /* Vendor / Proto */
|
||||
2, 2, /* min/max length */
|
||||
|
@ -15,8 +15,8 @@ int cisco_out_radio_generic(struct cw_ElemHandler * handler, struct cw_ElemHandl
|
||||
int radios;
|
||||
len =0;
|
||||
|
||||
radios = cw_cfg_get_byte(params->cfg,"wtp-descriptor/max-radios","0");
|
||||
|
||||
radios = cw_cfg_get_byte(params->cfg,"wtp-descriptor/max-radios",0);
|
||||
cw_dbg(DBG_X,"NUM RADIOS: %d",radios);
|
||||
for(i=0;i<radios+0;i++){
|
||||
l = cw_write_radio_element(handler,params,i,dst+len);
|
||||
// cw_dbg_elem(DBG_ELEM_OUT,NULL,params->msgdata->type,handler,dst+len,l);
|
||||
|
@ -10,7 +10,7 @@ int cisco_out_wtp_descriptor(struct cw_ElemHandler * eh,
|
||||
|
||||
stop();
|
||||
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
int len;
|
||||
/* // XXX Dummy WTP Descriptor Header */
|
||||
uint8_t *d;
|
||||
|
Reference in New Issue
Block a user