in progress...

FossilOrigin-Name: b2b7ebf765e5b3698de09aa36f54e1de5dfc58b97bb8ba607196262357249fb0
This commit is contained in:
7u83@mail.ru 2015-03-31 18:39:50 +00:00
parent 6e5c4c2e5f
commit edd42dd625
4 changed files with 13 additions and 7 deletions

View File

@ -135,8 +135,11 @@ cw_action_t discovery_actions[] = {
{ CW_VENDOR_ID_CISCO,0,CW_STATE_DISCOVERY,CW_MSG_DISCOVERY_REQUEST, CW_CISCO_RAD_NAME, { CW_VENDOR_ID_CISCO,0,CW_STATE_DISCOVERY,CW_MSG_DISCOVERY_REQUEST, CW_CISCO_RAD_NAME,
cw_in_wtp_name,0 }, cw_in_wtp_name,0 },
{ 0,0,CW_STATE_DISCOVERY,CW_MSG_DISCOVERY_REQUEST, CW_ELEM_WTP_BOARD_DATA,
cw_in_wtp_board_data,0 },
/* /*
{ 0,0,CW_STATE_DISCOVERY,CW_MSG_DISCOVERY_REQUEST, CW_ELEM_WTP_BOARD_DATA},
{ 0,0,CW_STATE_DISCOVERY,CW_MSG_DISCOVERY_REQUEST, CW_ELEM_WTP_DESCRIPTOR}, { 0,0,CW_STATE_DISCOVERY,CW_MSG_DISCOVERY_REQUEST, CW_ELEM_WTP_DESCRIPTOR},
{ 0,0,CW_STATE_DISCOVERY,CW_MSG_DISCOVERY_REQUEST, CW_ELEM_WTP_FRAME_TUNNEL_MODE}, { 0,0,CW_STATE_DISCOVERY,CW_MSG_DISCOVERY_REQUEST, CW_ELEM_WTP_FRAME_TUNNEL_MODE},
{ 0,0,CW_STATE_DISCOVERY,CW_MSG_DISCOVERY_REQUEST, CW_ELEM_WTP_MAC_TYPE}, { 0,0,CW_STATE_DISCOVERY,CW_MSG_DISCOVERY_REQUEST, CW_ELEM_WTP_MAC_TYPE},

View File

@ -163,7 +163,7 @@ struct capwap_ctrlhdr
#define CW_ELEM_AC_IPV6_LIST 3 #define CW_ELEM_AC_IPV6_LIST 3
#define CW_ELEM_AC_NAME 4 #define CW_ELEM_AC_NAME 4
#define CW_ELEM_AC_NAME_WITH_PRIORITY 5 #define CW_ELEM_AC_NAME_WITH_PRIORITY 5
#define CW_ELEM_AC_NAME_WITH_INDEX 5 /* Draft 7 inaming */ #define CW_ELEM_AC_NAME_WITH_INDEX 5 /* Draft 7 naming */
#define CW_ELEM_AC_TIMESTAMP 6 #define CW_ELEM_AC_TIMESTAMP 6
#define CW_ELEM_ADD_MAC_ACL_ENTRY 7 #define CW_ELEM_ADD_MAC_ACL_ENTRY 7
#define CW_ELEM_ADD_STATION 8 #define CW_ELEM_ADD_STATION 8
@ -717,7 +717,7 @@ extern struct cw_strlist capwap_strings_vendor[];
#define cw_strmsg(id) cw_strlist_get_str(capwap_strings_msg,id) #define cw_strmsg(id) cw_strlist_get_str(capwap_strings_msg,id)
#define cw_strstate(id) cw_strlist_get_str(capwap_strings_state,id) #define cw_strstate(id) cw_strlist_get_str(capwap_strings_state,id)
#define cw_strvendor(id) cw_strlist_get_str(cawpap_strings_vendor,id) #define cw_strvendor(id) cw_strlist_get_str(capwap_strings_vendor,id)
int cw_process_msg(struct conn * conn,uint8_t * rawmsg,int len); int cw_process_msg(struct conn * conn,uint8_t * rawmsg,int len);
@ -725,6 +725,7 @@ int cw_process_msg(struct conn * conn,uint8_t * rawmsg,int len);
extern int cw_in_vendor_specific_payload(struct conn *conn,struct cw_action * a,uint8_t *data,int len); extern int cw_in_vendor_specific_payload(struct conn *conn,struct cw_action * a,uint8_t *data,int len);
extern int cw_in_wtp_name(struct conn *conn,struct cw_action * a,uint8_t *data,int len); extern int cw_in_wtp_name(struct conn *conn,struct cw_action * a,uint8_t *data,int len);
extern int cw_in_wtp_board_data(struct conn *conn, struct cw_action *a, uint8_t * data, int len);
#endif #endif

View File

@ -1,5 +1,6 @@
#include "capwap.h" #include "capwap.h"
#include "cw_log.h"
/** /**
* @file * @file
* @brief Implementation of Vendor Specific Payload * @brief Implementation of Vendor Specific Payload
@ -19,10 +20,10 @@ int cw_in_vendor_specific_payload(struct conn *conn,struct cw_action * a,uint8_t
af = cw_actionlist_get(conn->msgtr,&as); af = cw_actionlist_get(conn->msgtr,&as);
if (!af) { if (!af) {
printf("Msg unknown\n"); cw_log(DBG_ELEM,"Can't handle Vendor Specific Payload %s/%d, in msg %d (%s) in %s state.",
cw_strvendor(as.vendor_id),
as.elem_id,as.msg_id,cw_strmsg(as.msg_id),cw_strstate(as.capwap_state));
return 0; return 0;
} }

View File

@ -71,6 +71,7 @@ static void readsubelems_wtp_board_data(cw_itemstore_t itemstore, uint8_t * msge
*/ */
int cw_in_wtp_board_data(struct conn *conn, struct cw_action *a, uint8_t * data, int len) int cw_in_wtp_board_data(struct conn *conn, struct cw_action *a, uint8_t * data, int len)
{ {
printf("Jau Board Data\n");
if (len < 4) { if (len < 4) {
cw_dbg(DBG_ELEM_ERR, cw_dbg(DBG_ELEM_ERR,
"Discarding WTP_BOARD_DATA msgelem, wrong size, type=%d, len=%d", a->elem_id, "Discarding WTP_BOARD_DATA msgelem, wrong size, type=%d, len=%d", a->elem_id,