ac descriptor, struct reader
FossilOrigin-Name: 3b8718025cc9d01c66afddbc09fda047e4c78427fe342d8a800ba066eae62270
This commit is contained in:
@ -5,6 +5,7 @@ OBJS=\
|
||||
mod_capwap_ac.o \
|
||||
capwap_actions_ac.o \
|
||||
capwap_in_wtp_board_data.o \
|
||||
capwap_in_ac_descriptor.o \
|
||||
capwap_out_wtp_board_data.o \
|
||||
capwap_out_ac_descriptor.o \
|
||||
capwap_out_get_session_id.o \
|
||||
|
@ -115,7 +115,7 @@ static struct cw_ElemHandler handlers[] = {
|
||||
0,0, /* min/max length */
|
||||
NULL, /* type */
|
||||
CW_KEY_AC_DESCRIPTOR, /* Key */
|
||||
NULL, /* get */
|
||||
capwap_in_ac_descriptor, /* get */
|
||||
capwap_out_ac_descriptor /* put */
|
||||
}
|
||||
,
|
||||
|
21
src/mod/capwap/capwap_in_ac_descriptor.c
Normal file
21
src/mod/capwap/capwap_in_ac_descriptor.c
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
#include "cw/cw.h"
|
||||
|
||||
#include "cw/dbg.h"
|
||||
|
||||
#include "cw/vendors.h"
|
||||
|
||||
int capwap_in_ac_descriptor(struct cw_ElemHandler *eh,
|
||||
struct cw_ElemHandlerParams *params,
|
||||
uint8_t * data, int len)
|
||||
{
|
||||
static struct cw_DescriptorSubelemDef allowed[] = {
|
||||
{0,CAPWAP_SUBELEM_AC_HARDWARE_VERSION, "hardware", 1024,1},
|
||||
{0,CAPWAP_SUBELEM_AC_SOFTWARE_VERSION, "software", 1024,1},
|
||||
{0,0, NULL,0, 0}
|
||||
};
|
||||
|
||||
|
||||
return cw_read_ac_descriptor(params->conn->remote_cfg,eh,params,data,len,allowed);
|
||||
|
||||
}
|
@ -1,12 +1,11 @@
|
||||
|
||||
#include "cw/log.h"
|
||||
#include "cw/dbg.h"
|
||||
#include "cw/conn.h"
|
||||
|
||||
|
||||
|
||||
#include "cw/capwap.h"
|
||||
|
||||
|
||||
#include "cw/cw.h"
|
||||
#include "cw/ktv.h"
|
||||
#include "cw/keys.h"
|
||||
@ -54,7 +53,7 @@ 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;
|
||||
int len,l;
|
||||
uint8_t *d = dst+4;
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
|
||||
@ -64,14 +63,17 @@ int capwap_out_ac_descriptor(struct cw_ElemHandler * eh,
|
||||
|
||||
sprintf(key,"%s/%s",eh->key,CW_SKEY_HARDWARE);
|
||||
d+=cw_write_descriptor_subelem (d, params->conn->local_cfg,
|
||||
CW_SUBELEM_AC_HARDWARE_VERSION, key);
|
||||
CAPWAP_SUBELEM_AC_HARDWARE_VERSION, key);
|
||||
|
||||
sprintf(key,"%s/%s",eh->key,CW_SKEY_SOFTWARE);
|
||||
d+=cw_write_descriptor_subelem (d, params->conn->local_cfg,
|
||||
CW_SUBELEM_AC_HARDWARE_VERSION, key);
|
||||
CAPWAP_SUBELEM_AC_SOFTWARE_VERSION, key);
|
||||
|
||||
len = d-dst-4;
|
||||
|
||||
return len + cw_put_elem_hdr(dst,eh->id,len);
|
||||
l = len + cw_put_elem_hdr(dst,eh->id,len);
|
||||
cw_dbg_elem(DBG_ELEM_OUT,params->conn,params->msgdata->type,eh,dst,l);
|
||||
|
||||
return l;
|
||||
|
||||
}
|
||||
|
@ -27,7 +27,9 @@ int capwap_in_capwap_control_ip_address(struct cw_ElemHandler *eh,
|
||||
struct cw_ElemHandlerParams *params,
|
||||
uint8_t * data, int len);
|
||||
|
||||
|
||||
int capwap_in_ac_descriptor(struct cw_ElemHandler *eh,
|
||||
struct cw_ElemHandlerParams *params,
|
||||
uint8_t * data, int len);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -34,7 +34,7 @@
|
||||
#define CW_CISCO_MWAR_ADDR LW_ELEM_AC_ADDRESS /* 2 */
|
||||
#define CW_CISCO_RAD 3
|
||||
#define CW_CISCO_RAD_SLOT 4
|
||||
#define CW_CISCO_RAD_NAME LW_ELEM_WTP_NAME /* 5 */
|
||||
#define CW_CISCO_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 CW_CISCO_WTP_RADIO_CFG 8
|
||||
|
Reference in New Issue
Block a user