Added some messages to mod capwap and cisco
FossilOrigin-Name: c23d2f78a03f983e68256d3b3c99141fbcbcf67774070d3964773abe1e1fe333
This commit is contained in:
parent
f84cbc22af
commit
0ca7567d6d
@ -32,11 +32,12 @@ static int put_ip(uint8_t *dst /*void *priv*/, cw_acip_t * acip /*void *data*/)
|
||||
break;
|
||||
}
|
||||
|
||||
if (elem_id != -1 ) {
|
||||
d+=cw_put_elem_hdr(dst,elem_id,d-dst-4);
|
||||
if (elem_id ==-1)
|
||||
return 0;
|
||||
|
||||
d+=cw_put_elem_hdr(dst,elem_id,d-dst-4);
|
||||
// return 0;
|
||||
// *dptr = d-4;
|
||||
}
|
||||
|
||||
|
||||
return d-4-dst;
|
||||
|
@ -51,7 +51,7 @@ static cw_action_in_t actions_in[] = {
|
||||
}
|
||||
,
|
||||
|
||||
/* Element WTP Board Data */
|
||||
/* Element WTP Board Data - Discovery Request */
|
||||
{
|
||||
.capwap_state = CW_STATE_DISCOVERY,
|
||||
.msg_id = CW_MSG_DISCOVERY_REQUEST,
|
||||
@ -62,7 +62,7 @@ static cw_action_in_t actions_in[] = {
|
||||
}
|
||||
,
|
||||
|
||||
/* Element WTP Descriptor */
|
||||
/* Element WTP Descriptor - Discovery */
|
||||
{
|
||||
.capwap_state = CW_STATE_DISCOVERY,
|
||||
.msg_id = CW_MSG_DISCOVERY_REQUEST,
|
||||
@ -111,20 +111,6 @@ static cw_action_in_t actions_in[] = {
|
||||
,
|
||||
|
||||
|
||||
/* Element WTP Name */
|
||||
/* {
|
||||
.capwap_state = CW_STATE_DISCOVERY,
|
||||
.msg_id = CW_MSG_DISCOVERY_REQUEST,
|
||||
.elem_id = CW_ELEM_WTP_NAME,
|
||||
.start = cw_in_generic2,
|
||||
.item_id = "wtp_name",
|
||||
.mand = 0,
|
||||
.min_len = 1,
|
||||
.max_len = 1024
|
||||
}
|
||||
,
|
||||
*/
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Join Request
|
||||
@ -143,13 +129,99 @@ static cw_action_in_t actions_in[] = {
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id =CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_LOCATION_DATA,
|
||||
.item_id = "location_data",
|
||||
.start = cw_in_generic,
|
||||
.item_id = CW_ITEM_LOCATION_DATA,
|
||||
.start = cw_in_generic2,
|
||||
.max_len = 1024,
|
||||
.min_len = 1
|
||||
}
|
||||
,
|
||||
|
||||
/* Element WTP Board Data - Join Request */
|
||||
{
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_WTP_BOARD_DATA,
|
||||
.start = capwap_in_wtp_board_data,
|
||||
.item_id = "wtp_board_data",
|
||||
.mand = 1,
|
||||
}
|
||||
,
|
||||
|
||||
/* Element WTP Descriptor - Join Request */
|
||||
{
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_WTP_DESCRIPTOR,
|
||||
.start = capwap_in_wtp_descriptor,
|
||||
.item_id = "wtp_descriptor",
|
||||
.mand = 1,
|
||||
}
|
||||
,
|
||||
|
||||
/* Element WTP Name - Join Request */
|
||||
{
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_WTP_NAME,
|
||||
.start = cw_in_generic2,
|
||||
.item_id = "wtp_name",
|
||||
.mand = 1,
|
||||
.min_len = 1,
|
||||
.max_len = 1024
|
||||
}
|
||||
,
|
||||
|
||||
/* Element Session ID - Join Request */
|
||||
{
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_SESSION_ID,
|
||||
.start = cw_in_generic2,
|
||||
.item_id = CW_ITEM_SESSION_ID,
|
||||
.mand = 1,
|
||||
.min_len = 16,
|
||||
.max_len = 16
|
||||
}
|
||||
,
|
||||
|
||||
/* WTP Frame Tunnel Mode - Join Request */
|
||||
{
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_WTP_FRAME_TUNNEL_MODE,
|
||||
.start = cw_in_generic2,
|
||||
.item_id = CW_ITEM_WTP_FRAME_TUNNEL_MODE,
|
||||
.mand = 1,
|
||||
.min_len = 1,
|
||||
.max_len = 1
|
||||
}
|
||||
,
|
||||
|
||||
/* WTP Frame Tunnel Mode - Join Request */
|
||||
{
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_WTP_MAC_TYPE,
|
||||
.start = cw_in_generic2,
|
||||
.item_id = CW_ITEM_WTP_MAC_TYPE,
|
||||
.mand = 1,
|
||||
.min_len = 1,
|
||||
.max_len = 1
|
||||
}
|
||||
,
|
||||
|
||||
|
||||
|
||||
/* Vendor Specific Payload - Join Request*/
|
||||
{
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_VENDOR_SPECIFIC_PAYLOAD,
|
||||
.start = cw_in_vendor_specific_payload
|
||||
}
|
||||
,
|
||||
|
||||
|
||||
|
||||
/* End of list */
|
||||
{0, 0}
|
||||
@ -204,6 +276,8 @@ static struct cw_itemdef _capwap_itemdefs[] = {
|
||||
{"wtp_mac_type",CW_ITEM_NONE,MBAG_BYTE},
|
||||
{"discovery_type",CW_ITEM_NONE,MBAG_BYTE},
|
||||
{"wtp_frame_tunnel_mode",CW_ITEM_NONE,MBAG_BYTE},
|
||||
{ CW_ITEM_LOCATION_DATA, CW_ITEM_NONE,MBAG_STR},
|
||||
{ CW_ITEM_SESSION_ID,CW_ITEM_NONE,MBAG_BSTR},
|
||||
{CW_ITEM_NONE}
|
||||
|
||||
};
|
||||
|
@ -65,6 +65,38 @@ static cw_action_in_t actions_in[] = {
|
||||
}
|
||||
,
|
||||
|
||||
/* ----------------------------------
|
||||
* Join Request
|
||||
*/
|
||||
|
||||
/* Element WTP Descriptor - Join Request */
|
||||
{
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_WTP_DESCRIPTOR,
|
||||
.start = cisco_in_wtp_descriptor,
|
||||
.item_id = "wtp_descriptor",
|
||||
.mand = 1,
|
||||
}
|
||||
,
|
||||
|
||||
/* Element Session ID - Join Request */
|
||||
{
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_SESSION_ID,
|
||||
.start = cw_in_generic2,
|
||||
.item_id = CW_ITEM_SESSION_ID,
|
||||
.mand = 1,
|
||||
.min_len = 4,
|
||||
.max_len = 16
|
||||
}
|
||||
,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* End of list */
|
||||
{0, 0}
|
||||
};
|
||||
@ -95,6 +127,8 @@ static cw_action_out_t actions_out[]={
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
,
|
||||
|
||||
{0,0}
|
||||
|
Loading…
Reference in New Issue
Block a user