Added som docs and some messages.
FossilOrigin-Name: 023b3d3c1254cb814383d73b5f6dd36e983117b45675caa1626fc9fccfecbee9
This commit is contained in:
parent
ea80dfc883
commit
c4f9bca1e6
@ -131,6 +131,7 @@ CAPWAPOBJS= \
|
||||
capwap_strings_vendor.o \
|
||||
capwap_strings_elem.o \
|
||||
cw_in_vendor_specific_payload.o \
|
||||
cw_in_mtu_discovery_padding.o\
|
||||
cw_in_wtp_board_data.o \
|
||||
cw_in_check_disc_req.o \
|
||||
cw_in_check_chng_state_evnt_req.o\
|
||||
|
@ -254,7 +254,7 @@ CW_MSG_MAXMSG = 26
|
||||
#define CW_ELEM_INITIATE_DOWNLOAD 27
|
||||
#define CW_ELEM_LOCATION_DATA 28
|
||||
#define CW_ELEM_MAXIMUM_MESSAGE_LENGTH 29
|
||||
#define CWMSGELEM_MTU_DISCOVERY_PADDING 52
|
||||
#define CW_ELEM_MTU_DISCOVERY_PADDING 52
|
||||
#define CW_ELEM_RADIO_ADMINISTRATIVE_STATE 31
|
||||
#define CW_ELEM_RADIO_OPERATIONAL_STATE 32
|
||||
#define CW_ELEM_RESULT_CODE 33
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
#define CW80211IANA_ENTERPRISE_NUMBER 13277
|
||||
|
||||
#define CWMSG_80211_WLAN_CONFIGURATION_REQUEST 3398913
|
||||
#define CWMSG_80211_WLAN_CONFIGURATION_REPONSE 3398914
|
||||
#define CW_MSG80211_WLAN_CONFIGURATION_REQUEST 3398913
|
||||
#define CW_MSG80211_WLAN_CONFIGURATION_REPONSE 3398914
|
||||
|
||||
/**
|
||||
*@defgroup Msg Elements
|
||||
@ -52,13 +52,16 @@ enum radioelems {
|
||||
CW_ELEM80211_RSNA_ERROR_REPORT_FROM_STATION=1035,
|
||||
/** IEEE 802.11 Station */
|
||||
CW_ELEM80211_STATION=1036,
|
||||
/** IEEE 802.11 Station QoS Profile */
|
||||
CW_ELEM80211_STATION_QOS_PROFILE=1037,
|
||||
/** IEEE 802.11 Station Session Key */
|
||||
CW_ELEM80211_STATIONN_SESSION_KEY=1038,
|
||||
/** IEEE 802.11 Statistics */
|
||||
CW_ELEM80211_STATISTICS=1039,
|
||||
/** IEEE 802.11 Supported Rates */
|
||||
CW_ELEM80211_SUPORTED_RATES=1040,
|
||||
|
||||
/*
|
||||
IEEE 802.11 Station 1036
|
||||
IEEE 802.11 Station QoS Profile 1037
|
||||
IEEE 802.11 Station Session Key 1038
|
||||
IEEE 802.11 Statistics 1039
|
||||
IEEE 802.11 Supported Rates 1040
|
||||
IEEE 802.11 Tx Power 1041
|
||||
IEEE 802.11 Tx Power Level 1042
|
||||
IEEE 802.11 Update Station QoS 1043
|
||||
|
@ -36,7 +36,7 @@ struct cw_strlist_elem capwap_strings_elem[] = {
|
||||
{CW_ELEM_INITIATE_DOWNLOAD, "Initiate Download"},
|
||||
{CW_ELEM_LOCATION_DATA, "Location Data"},
|
||||
{CW_ELEM_MAXIMUM_MESSAGE_LENGTH, "Maximum Message Length"},
|
||||
{CWMSGELEM_MTU_DISCOVERY_PADDING, "MTU Discovery Padding"},
|
||||
{CW_ELEM_MTU_DISCOVERY_PADDING, "MTU Discovery Padding"},
|
||||
{CW_ELEM_RADIO_ADMINISTRATIVE_STATE, "Radio Administrative State"},
|
||||
{CW_ELEM_RADIO_OPERATIONAL_STATE, "Radio Operational State"},
|
||||
{CW_ELEM_RESULT_CODE, "Result Code"},
|
||||
|
@ -91,6 +91,9 @@ extern int cw_in_check_generic_resp(struct conn *conn, struct cw_action_in *a,
|
||||
extern int cw_in_check_generic_req(struct conn *conn, struct cw_action_in *a,
|
||||
uint8_t * data, int len, struct sockaddr *from);
|
||||
|
||||
extern int cw_in_mtu_discovery_padding(struct conn *conn, struct cw_action_in *a,
|
||||
uint8_t * data, int len,struct sockaddr *from);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -17,24 +17,25 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "capwap.h"
|
||||
#include "cw_log.h"
|
||||
#include "cw.h"
|
||||
#include "dbg.h"
|
||||
|
||||
|
||||
int cw_in_mtu_discovery_padding(struct conn *conn, struct cw_action_in *a,
|
||||
uint8_t * data, int len,struct sockaddr *from)
|
||||
|
||||
int cw_readelem_mtu_discovery_padding(int type, uint8_t * msgelem, int len)
|
||||
{
|
||||
if (type != CWMSGELEM_MTU_DISCOVERY_PADDING)
|
||||
return 0;
|
||||
if (!cw_dbg_is_level(DBG_CW_RFC))
|
||||
return 1;
|
||||
|
||||
int i, n = 0;
|
||||
for (i = 0; i < len; i++) {
|
||||
if (msgelem[i] != 0xff)
|
||||
if (data[i] != 0xff)
|
||||
n++;
|
||||
}
|
||||
if (n)
|
||||
cw_dbg(DBG_CW_RFC,
|
||||
"MTU discovery padding msgelem contains %d non-0xFF byte(s) out of %d, See RFC 5415.",
|
||||
if (n){
|
||||
cw_dbg(DBG_RFC,
|
||||
"MTU discovery padding msg elem contains %d non-0xFF byte(s) out of %d, See RFC 5415.",
|
||||
n, len);
|
||||
if (conn->strict_capwap)
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
@ -107,10 +107,20 @@ static cw_action_in_t actions_in[] = {
|
||||
.capwap_state = CW_STATE_DISCOVERY,
|
||||
.msg_id = CW_MSG_DISCOVERY_REQUEST,
|
||||
.elem_id = CW_ELEM_VENDOR_SPECIFIC_PAYLOAD,
|
||||
.start = cw_in_vendor_specific_payload
|
||||
.start = cw_in_vendor_specific_payload,
|
||||
.min_len=7
|
||||
}
|
||||
,
|
||||
|
||||
/* MTU Discovery Padding */
|
||||
{
|
||||
.capwap_state = CW_STATE_DISCOVERY,
|
||||
.msg_id = CW_MSG_DISCOVERY_REQUEST,
|
||||
.elem_id = CW_ELEM_MTU_DISCOVERY_PADDING,
|
||||
.start = cw_in_mtu_discovery_padding,
|
||||
}
|
||||
,
|
||||
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
@ -249,13 +259,13 @@ static cw_action_in_t actions_in[] = {
|
||||
}
|
||||
,
|
||||
|
||||
|
||||
/* 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
|
||||
.start = cw_in_vendor_specific_payload,
|
||||
.min_len=7
|
||||
}
|
||||
,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user