Work on mods....
FossilOrigin-Name: 3545862687f1b4dbd6ab4a26fa5c889333a0f4c33c89e02e6b69f21194305219
This commit is contained in:
parent
64866cee4b
commit
ec5f756be3
@ -110,6 +110,7 @@ struct cw_itemdef capwap_itemdefs[] = {
|
||||
|
||||
{CW_ITEM_AC_NAME_WITH_PRIORITY,CW_ITEM_ANY,MBAG_STR},
|
||||
{CW_ITEM_AC_NAME,CW_ITEM_NONE,MBAG_STR},
|
||||
{CW_ITEM_RESULT_CODE,CW_ITEM_NONE,MBAG_DWORD},
|
||||
|
||||
|
||||
{CW_ITEM_AP_MODE_AND_TYPE,CW_ITEM_NONE,MBAG_WORD},
|
||||
|
@ -120,6 +120,9 @@ static inline int lw_put_elem_hdr(uint8_t *dst,uint8_t type,uint16_t len)
|
||||
|
||||
|
||||
|
||||
extern uint16_t lw_checksum(uint8_t *d,int len);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -19,7 +19,7 @@
|
||||
/**
|
||||
*@file
|
||||
*@brief Implements lw_checksum.
|
||||
*@addtogroup LWAPPFunctions
|
||||
*@addtogroup LW
|
||||
*@{
|
||||
*/
|
||||
|
||||
|
@ -272,7 +272,7 @@ extern int lw_put_cisco_path_mtu(uint8_t *dst, uint16_t max, uint16_t padding);
|
||||
|
||||
/* function proto types */
|
||||
|
||||
extern uint16_t lw_checksum(uint8_t *d,int len);
|
||||
//extern uint16_t lw_checksum(uint8_t *d,int len);
|
||||
//extern int lw_readelem_wtp_board_data(struct wtpinfo *wtpinfo, int type, uint8_t *msgelem, int len);
|
||||
extern int lw_readelem_wtp_name(bstr_t * dst, int type, uint8_t * msgelem, int len);
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#ifndef __CW_RAND_H
|
||||
#define __CW_RAND_H
|
||||
|
||||
|
||||
extern int cw_rand(uint8_t*dst, int len);
|
||||
|
||||
#endif
|
||||
|
@ -7,7 +7,8 @@ OBJS=\
|
||||
capwap_in_wtp_descriptor.o \
|
||||
capwap_in_wtp_board_data.o \
|
||||
capwap_out_wtp_descriptor.o \
|
||||
capwap_out_ac_descriptor.o
|
||||
capwap_out_ac_descriptor.o \
|
||||
capwap_out_get_session_id.o
|
||||
|
||||
|
||||
NAME=libcapwap.a
|
||||
|
@ -79,13 +79,35 @@ static cw_action_in_t actions_in[] = {
|
||||
,
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
* Message Join Response
|
||||
*/
|
||||
{
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id = CW_MSG_JOIN_RESPONSE,
|
||||
.end = cw_in_check_join_resp
|
||||
}
|
||||
,
|
||||
/* Result Code - Join Response */
|
||||
{
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id = CW_MSG_JOIN_RESPONSE,
|
||||
.elem_id = CW_ELEM_RESULT_CODE,
|
||||
.item_id = CW_ITEM_RESULT_CODE,
|
||||
.start = cw_in_generic2,
|
||||
.min_len = 4,
|
||||
.max_len = 4,
|
||||
.mand = 1
|
||||
}
|
||||
,
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
static cw_action_out_t actions_out[] = {
|
||||
/* ---------------------------------------------------------------
|
||||
* Discovery Request
|
||||
* Discovery Request - Out
|
||||
*/
|
||||
|
||||
/* Discovery Type - Discovery Request */
|
||||
@ -147,27 +169,95 @@ static cw_action_out_t actions_out[] = {
|
||||
,
|
||||
|
||||
/* ---------------------------------------------------------------
|
||||
* Join Request
|
||||
* Join Request - Out
|
||||
*/
|
||||
|
||||
/* Discovery Type - Discovery Request */
|
||||
/* Location Data - Join Request */
|
||||
{
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_LOCATION_DATA,
|
||||
.item_id = CW_ITEM_LOCATION_DATA,
|
||||
.out = cw_out_generic,
|
||||
.get = cw_out_get_config,
|
||||
.mand = 1
|
||||
}
|
||||
,
|
||||
|
||||
/* WTP Board Data - Join Request */
|
||||
{
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_WTP_BOARD_DATA,
|
||||
.item_id = CW_ITEM_WTP_BOARD_DATA,
|
||||
.out = cw_out_wtp_board_data,
|
||||
.get = cw_out_get_outgoing,
|
||||
.mand = 1
|
||||
}
|
||||
,
|
||||
|
||||
/* WTP Descriptor - Join Request */
|
||||
{
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_WTP_DESCRIPTOR,
|
||||
.item_id = CW_ITEM_WTP_DESCRIPTOR,
|
||||
.out = cw_out_wtp_descriptor,
|
||||
.mand = 1
|
||||
}
|
||||
,
|
||||
|
||||
/* WTP Name - Join Request */
|
||||
{
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_WTP_NAME,
|
||||
.item_id = CW_ITEM_WTP_NAME,
|
||||
.out = cw_out_generic,
|
||||
.get = cw_out_get_config,
|
||||
.mand = 1
|
||||
}
|
||||
,
|
||||
|
||||
/* WTP MAC Type - Join Request */
|
||||
{
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_WTP_MAC_TYPE,
|
||||
.item_id = CW_ITEM_WTP_MAC_TYPE,
|
||||
.out = cw_out_generic,
|
||||
.get = cw_out_get_local,
|
||||
.mand = 1
|
||||
}
|
||||
,
|
||||
|
||||
/* WTP Frame Tunnel Mode - Join Request */
|
||||
{
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_WTP_FRAME_TUNNEL_MODE,
|
||||
.item_id = CW_ITEM_WTP_FRAME_TUNNEL_MODE,
|
||||
.out = cw_out_generic,
|
||||
.get = cw_out_get_local,
|
||||
.mand = 1
|
||||
}
|
||||
,
|
||||
|
||||
/* Session ID - Join Request */
|
||||
{
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM_SESSION_ID,
|
||||
.item_id = CW_ITEM_SESSION_ID,
|
||||
.out = cw_out_generic,
|
||||
.get = cw_out_get_session_id,
|
||||
.mand = 1
|
||||
}
|
||||
,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// {CW_MSG_DISCOVERY_REQUEST, CW_ITEM_DISCOVERY_TYPE, 0,
|
||||
// CW_ELEM_DISCOVERY_TYPE, NULL,cw_out_generic, cw_out_get_outgoing}
|
||||
|
||||
/* WTP Descriptor */
|
||||
// {CW_MSG_JOIN_REQUEST, CW_ITEM_WTP_DESCRIPTOR, 0,
|
||||
// CW_ELEM_WTP_DESCRIPTOR, NULL,cw_out_wtp_descriptor, NULL,1}
|
||||
// ,
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -16,5 +16,7 @@ extern int capwap_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a,
|
||||
|
||||
extern int capwap_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t *dst);
|
||||
|
||||
extern struct mbag_item * capwap_out_get_session_id(struct conn *conn,struct cw_action_out * a);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -203,8 +203,8 @@ mavl_destroy(b);
|
||||
cw_acpriolist_set(acprios, "AC8new", strlen("AC8new"), 12);
|
||||
|
||||
|
||||
// mbag_set_str(conn->local,CW_ITEM_LOCATION_DATA,"Berlin");
|
||||
// mbag_set_str(conn->local,CW_ITEM_WTP_NAME,"WTP Tube");
|
||||
mbag_set_str(conn->config,CW_ITEM_LOCATION_DATA,"Berlin");
|
||||
mbag_set_str(conn->config,CW_ITEM_WTP_NAME,"WTP Tube");
|
||||
|
||||
mbag_set_byte(conn->local, CW_ITEM_WTP_MAC_TYPE, 0);
|
||||
mbag_set_byte(conn->local, CW_ITEM_WTP_FRAME_TUNNEL_MODE, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user