Work on join
FossilOrigin-Name: ecd57f521010c518e8f65a035772d34453de04ead23d85329b1afb8f886762db
This commit is contained in:
@ -15,7 +15,8 @@ OBJS=\
|
||||
capwap_in_vendor_specific_payload.o \
|
||||
capwap_in_mtu_discovery_padding.o \
|
||||
capwap_out_capwap_control_ip_address.o \
|
||||
capwap_in_capwap_control_ip_address.o
|
||||
capwap_in_capwap_control_ip_address.o \
|
||||
capwap_out_capwap_local_ip_address.o\
|
||||
|
||||
|
||||
LIBDIR := ../../../lib
|
||||
|
@ -215,7 +215,41 @@ static struct cw_ElemHandler handlers[] = {
|
||||
}
|
||||
,
|
||||
|
||||
{
|
||||
"Maximum Message Length", /* name */
|
||||
CAPWAP_ELEM_MAXIMUM_MESSAGE_LENGTH, /* Element ID */
|
||||
0,0, /* Vendor / Proto */
|
||||
2,2, /* min/max length */
|
||||
CW_TYPE_WORD, /* type */
|
||||
"maximum-message-length", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_generic /* put */
|
||||
}
|
||||
,
|
||||
|
||||
{
|
||||
"CAPWAP Local IPv4 Address", /* name */
|
||||
CAPWAP_ELEM_CAPWAP_LOCAL_IPV4_ADDRESS, /* Element ID */
|
||||
0,0, /* Vendor / Proto */
|
||||
4,4, /* min/max length */
|
||||
CW_TYPE_IPADDRESS, /* type */
|
||||
"capwap-local-ip-address", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
capwap_out_capwap_local_ip_address /* put */
|
||||
}
|
||||
,
|
||||
{
|
||||
"CAPWAP Local IPv6 Address", /* name */
|
||||
CAPWAP_ELEM_CAPWAP_LOCAL_IPV6_ADDRESS, /* Element ID */
|
||||
0,0, /* Vendor / Proto */
|
||||
16,16, /* min/max length */
|
||||
CW_TYPE_IPADDRESS, /* type */
|
||||
"capwap-local-ip-address", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
capwap_out_capwap_local_ip_address /* put */
|
||||
}
|
||||
|
||||
,
|
||||
{0,0,0,0,0,0,0,0}
|
||||
|
||||
};
|
||||
@ -254,6 +288,12 @@ static struct cw_ElemDef join_request_elements[] ={
|
||||
{0,0,CAPWAP_ELEM_SESSION_ID, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_WTP_FRAME_TUNNEL_MODE, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_WTP_MAC_TYPE, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_ECN_SUPPORT, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_CAPWAP_LOCAL_IPV4_ADDRESS, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_CAPWAP_LOCAL_IPV6_ADDRESS, 1, 0},
|
||||
|
||||
{0,0,CAPWAP_ELEM_MAXIMUM_MESSAGE_LENGTH, 0, 0},
|
||||
{0,0,CAPWAP_ELEM_VENDOR_SPECIFIC_PAYLOAD, 0, CW_IGNORE},
|
||||
|
||||
/* {0,0,CAPWAP_ELEM_DISCOVERY_TYPE, 1, 0},
|
||||
|
||||
|
@ -190,7 +190,7 @@ static cw_action_in_t actions_in[] = {
|
||||
{
|
||||
.capwap_state = CAPWAP_STATE_JOIN,
|
||||
.msg_id = CAPWAP_MSG_JOIN_RESPONSE,
|
||||
.elem_id = CW_ELEM_MAXIMUM_MESSAGE_LENGTH,
|
||||
.elem_id = CAPWAP_ELEM_MAXIMUM_MESSAGE_LENGTH,
|
||||
.start = cw_in_generic2,
|
||||
.item_id = CW_ITEM_MAXIMUM_MESSAGE_LENGTH,
|
||||
.min_len = 2,
|
||||
|
@ -101,7 +101,7 @@ static void readsubelems_wtp_board_data(mavl_t cfg, uint8_t * msgelem,
|
||||
}
|
||||
if (key != NULL){
|
||||
char add_key[256];
|
||||
sprintf(add_key,"wtp_board_data/%s",key);
|
||||
sprintf(add_key,"wtp-board-data/%s",key);
|
||||
cw_ktv_add(cfg,add_key,CW_TYPE_BSTR16,msgelem+i,sublen);
|
||||
|
||||
}
|
||||
|
@ -15,7 +15,6 @@
|
||||
static int put_ac_status(mavl_t global, mavl_t local, uint8_t *dst, const char * parent_key){
|
||||
|
||||
uint8_t *d = dst;
|
||||
uint8_t security;
|
||||
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
#include "mod_capwap.h"
|
||||
#include "cw/cw.h"
|
||||
|
||||
int capwap_out_capwap_local_ip_address(struct cw_ElemHandler * eh,
|
||||
struct cw_ElemHandlerParams * params, uint8_t * dst)
|
||||
{
|
||||
cw_KTV_t * ip;
|
||||
ip = cw_ktv_get(params->conn->local_cfg,eh->key,CW_TYPE_IPADDRESS);
|
||||
if (ip==NULL){
|
||||
return 0;
|
||||
}
|
||||
return cw_put_local_ip_address(dst,eh->id,
|
||||
CAPWAP_ELEM_CAPWAP_LOCAL_IPV4_ADDRESS,
|
||||
CAPWAP_ELEM_CAPWAP_LOCAL_IPV6_ADDRESS,
|
||||
ip->type->data(ip),ip->type->len(ip));
|
||||
}
|
||||
|
@ -31,6 +31,9 @@ int capwap_in_ac_descriptor(struct cw_ElemHandler *eh,
|
||||
struct cw_ElemHandlerParams *params,
|
||||
uint8_t * data, int len);
|
||||
|
||||
int capwap_out_capwap_local_ip_address(struct cw_ElemHandler * eh,
|
||||
struct cw_ElemHandlerParams * params, uint8_t * dst);
|
||||
|
||||
|
||||
/*
|
||||
extern int capwap_in_wtp_board_data(struct conn *conn, struct cw_ElemHandler *a,
|
||||
|
@ -29,13 +29,21 @@ static struct cw_ElemHandler handlers[] = {
|
||||
};
|
||||
|
||||
static int discovery_request_states[] = { CAPWAP_STATE_DISCOVERY, 0 };
|
||||
|
||||
static struct cw_ElemDef discovery_request_elements[] = {
|
||||
{0, 0, CAPWAP80211_ELEM_WTP_RADIO_INFORMATION, 1, 0},
|
||||
{0, 0, 0, 0, 0}
|
||||
|
||||
};
|
||||
|
||||
|
||||
static int join_request_states[] = { CAPWAP_STATE_JOIN, 0 };
|
||||
static struct cw_ElemDef join_request_elements[] = {
|
||||
{0, 0, CAPWAP80211_ELEM_WTP_RADIO_INFORMATION, 1, 0},
|
||||
{0, 0, 0, 0, 0}
|
||||
|
||||
};
|
||||
|
||||
|
||||
static struct cw_MsgDef messages[] = {
|
||||
{
|
||||
"Discovery Request",
|
||||
@ -45,6 +53,14 @@ static struct cw_MsgDef messages[] = {
|
||||
discovery_request_elements
|
||||
}
|
||||
,
|
||||
{
|
||||
"Join Request",
|
||||
CAPWAP_MSG_JOIN_REQUEST,
|
||||
CW_ROLE_AC,
|
||||
join_request_states,
|
||||
join_request_elements
|
||||
}
|
||||
,
|
||||
{0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
|
@ -195,7 +195,7 @@ static cw_action_out_t actions_out[]={
|
||||
{
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.vendor_id = CW_VENDOR_ID_CISCO,
|
||||
.elem_id = CW_CISCO_AP_GROUP_NAME,
|
||||
.elem_id = CISCO_ELEM_AP_GROUP_NAME,
|
||||
.item_id = CW_ITEM_WTP_GROUP_NAME,
|
||||
.out = cw_out_generic,
|
||||
.get = cw_out_get_config,
|
||||
|
Reference in New Issue
Block a user