Refactoring ...
FossilOrigin-Name: 7faf45e97aeda89003a2264ca0cea26558910784069b024d8417ce0e5619e746
This commit is contained in:
parent
60a123883d
commit
8afa8a1c87
139
src/cw/capwap.h
139
src/cw/capwap.h
@ -41,7 +41,14 @@
|
||||
/* capwap version and iana number */
|
||||
|
||||
/**
|
||||
*@defgroup CAPWAPConstants CAPWAP Constants
|
||||
*@defgroup CAPWAP CAPWAP Defintions from RFC5415
|
||||
*@{
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*@defgroup CAPWAPConstants CAPWAP General Constants
|
||||
*@{
|
||||
*/
|
||||
|
||||
@ -61,14 +68,14 @@
|
||||
/** CAWPAP DataPort as String */
|
||||
#define CAPWAP_DATA_PORT_STR "5247"
|
||||
|
||||
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* CAPWAP header flags.
|
||||
*@defgroup CAPWAPHeaderFlags CAPWAP Header Flags
|
||||
*@brief Alles ist schoen
|
||||
*@{
|
||||
*/
|
||||
#define CAPWAP_FLAG_HDR_R1 0x01 /**< bit 0 reserved 1 */
|
||||
#define CAPWAP_FLAG_HDR_R2 0x02 /**< bit 1 reserved 2 */
|
||||
@ -79,13 +86,13 @@
|
||||
#define CAPWAP_FLAG_HDR_L 0x40 /**< bit 6 last fragment */
|
||||
#define CAPWAP_FLAG_HDR_F 0x80 /**< bit 7 fragment */
|
||||
#define CAPWAP_FLAG_HDR_T 0x100 /**< bit 8 type of payload frame */
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup CAPWAPWBIDS Wireless binding IDs
|
||||
* @defgroup CAPWAPWBIDS CAPWAP Wireless binding IDs
|
||||
* @{
|
||||
*/
|
||||
#define CW_WBID_RESERVED1 0
|
||||
@ -97,74 +104,13 @@
|
||||
#define CAPWAP_PACKET_PREAMBLE (CAPWAP_VERSION<<4)
|
||||
#define CAPWAP_DTLS_PACKET_PREAMBLE (CAPWAP_VERSION<<4|1)
|
||||
|
||||
/*
|
||||
* control header stuff
|
||||
*/
|
||||
|
||||
/**
|
||||
*@addtogroup CAPWAPConstants
|
||||
*@{
|
||||
*/
|
||||
|
||||
/**
|
||||
* CAPWAP message types as defined in RFC 5416
|
||||
*/
|
||||
enum cw_message_types{
|
||||
|
||||
/**Discovery Request = 1*/
|
||||
CW_MSG_DISCOVERY_REQUEST = 1,
|
||||
/** Discovery Response = 2 */
|
||||
CW_MSG_DISCOVERY_RESPONSE = 2,
|
||||
/** Join Request = 3 */
|
||||
CW_MSG_JOIN_REQUEST = 3,
|
||||
/** Join Response = 4 */
|
||||
CW_MSG_JOIN_RESPONSE = 4,
|
||||
/** Config. Status Request = 5*/
|
||||
CW_MSG_CONFIGURATION_STATUS_REQUEST = 5,
|
||||
/** Config. Status Response = 6 */
|
||||
CW_MSG_CONFIGURATION_STATUS_RESPONSE = 6,
|
||||
/** Config. Update Request = 7 */
|
||||
CW_MSG_CONFIGURATION_UPDATE_REQUEST = 7,
|
||||
CW_MSG_CONFIGURATION_UPDATE_RESPONSE = 8,
|
||||
|
||||
CW_MSG_WTP_EVENT_REQUEST = 9,
|
||||
CW_MSG_WTP_EVENT_RESPONSE = 10,
|
||||
|
||||
CW_MSG_CHANGE_STATE_EVENT_REQUEST = 11,
|
||||
CW_MSG_CHANGE_STATE_EVENT_RESPONSE = 12,
|
||||
|
||||
CW_MSG_ECHO_REQUEST = 13,
|
||||
CW_MSG_ECHO_RESPONSE = 14,
|
||||
|
||||
CW_MSG_IMAGE_DATA_REQUEST = 15,
|
||||
CW_MSG_IMAGE_DATA_RESPONSE = 16,
|
||||
|
||||
CW_MSG_RESET_REQUEST = 17,
|
||||
CW_MSG_RESET_RESPONSE = 18,
|
||||
|
||||
CW_MSG_PRIMARY_DISCOVERY_REQUEST = 19,
|
||||
CW_MSG_PRIMARY_DISCOVERY_RESPONSE = 20,
|
||||
|
||||
CW_MSG_DATA_TRANSFER_REQUEST = 21,
|
||||
CW_MSG_DATA_TRANSFER_RESPONSE = 22,
|
||||
|
||||
CW_MSG_CLEAR_CONFIGURATION_REQUEST = 23,
|
||||
CW_MSG_CLEAR_CONFIGURATION_RESPONSE = 24,
|
||||
|
||||
CW_STATION_CONFIGURATION_REQUEST = 25,
|
||||
CW_STATION_CONFIGURATION_RESPONSE = 26,
|
||||
|
||||
CW_MSG_MAXMSG = 26
|
||||
|
||||
};
|
||||
|
||||
//cw_msg_t;
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* CAPWAP message types as defined in RFC 5416
|
||||
*/
|
||||
|
||||
|
||||
#define CW_MSG_DISCOVERY_REQUEST 1
|
||||
#define CW_MSG_DISCOVERY_RESPONSE 2
|
||||
#define CW_MSG_JOIN_REQUEST 3
|
||||
@ -204,25 +150,31 @@ CW_MSG_MAXMSG = 26
|
||||
#define CW_STATION_CONFIGURATION_RESPONSE 26
|
||||
|
||||
#define CW_MSG_MAXMSG 26
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* CAPWAP message elements as defined in RFC 5415
|
||||
*/
|
||||
* @defgroup CAPWAPMsgElems CAPWAP Message Elements
|
||||
* @brief CAPWAP message elements as defined in RFC 5415
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
#define CW_ELEM_AC_DESCRIPTOR 1
|
||||
#define CW_ELEM_AC_IPV4_LIST 2
|
||||
#define CW_ELEM_AC_IPV6_LIST 3
|
||||
#define CW_ELEM_AC_DESCRIPTOR 1 /**< AC Descriptor */
|
||||
#define CW_ELEM_AC_IPV4_LIST 2 /**< AC IP V4 List */
|
||||
#define CW_ELEM_AC_IPV6_LIST 3 /**< AC IP V6 List */
|
||||
#define CW_ELEM_AC_NAME 4
|
||||
#define CW_ELEM_AC_NAME_WITH_PRIORITY 5
|
||||
#define CW_ELEM_AC_NAME_WITH_INDEX CW_ELEM_AC_NAME_WITH_PRIORITY /* Draft 7 naming */
|
||||
#define CW_ELEM_AC_NAME_WITH_INDEX CW_ELEM_AC_NAME_WITH_PRIORITY /**< Draft 7 naming */
|
||||
#define CW_ELEM_AC_TIMESTAMP 6
|
||||
/**@{
|
||||
* one for all
|
||||
*/
|
||||
#define CW_ELEM_ADD_MAC_ACL_ENTRY 7
|
||||
#define CW_ELEM_ADD_STATION 8
|
||||
#define CW_ELEM_RESERVED_9 9
|
||||
#define CW_ELEM_CAPWAP_CONTROL_IPV4_ADDRESS 10
|
||||
#define CW_ELEM_CAPWAP_CONTROL_IPV6_ADDRESS 11
|
||||
/**@}*/
|
||||
#define CW_ELEM_CAPWAP_LOCAL_IPV4_ADDRESS 30
|
||||
#define CW_ELEM_CAPWAP_LOCAL_IPV6_ADDRESS 50
|
||||
#define CW_ELEM_CAPWAP_TIMERS 12
|
||||
@ -272,7 +224,7 @@ CW_MSG_MAXMSG = 26
|
||||
#define CW_ELEM_WTP_IPV4_IP_ADDRESS 42
|
||||
#define CW_ELEM_WTP_IPV6_IP_ADDRESS 43
|
||||
|
||||
|
||||
/**@}*/
|
||||
|
||||
/**
|
||||
* @defgrpup BOARD_SUBELEMS Board Data Sub-Elements
|
||||
@ -310,12 +262,23 @@ CW_MSG_MAXMSG = 26
|
||||
#define CW_WTP_FRAME_TUNNEL_MODE_N 8 /* native mode */
|
||||
|
||||
|
||||
/* Discovery Types */
|
||||
#define CW_DISCOVERY_TYPE_UNKNOWN 0
|
||||
#define CW_DISCOVERY_TYPE_STATIC 1
|
||||
#define CW_DISCOVERY_TYPE_DHCP 2
|
||||
#define CW_DISCOVERY_TYPE_DNS 3
|
||||
#define CW_DISCOVERY_TYPE_AC_REFERRAL 4
|
||||
|
||||
/**
|
||||
* @defgroup CAPWAPDiscoveryTypes CAPWAP Discovery Types
|
||||
* @brief CAPWAP Discovery Types defined in RFC5415
|
||||
* @{
|
||||
*/
|
||||
/** Discovery Type is unknown */
|
||||
#define CAPWAP_DISCOVERY_TYPE_UNKNOWN 0
|
||||
/** AC was discoverd by a static IP address stored in AP's config */
|
||||
#define CAPWAP_DISCOVERY_TYPE_STATIC 1
|
||||
/** AC was discovered by DHCP option 43 returned from a DHCP server */
|
||||
#define CAPWAP_DISCOVERY_TYPE_DHCP 2
|
||||
/** AC was discovered by DNS lookup */
|
||||
#define CAPWAP_DISCOVERY_TYPE_DNS 3
|
||||
/** AC was discovered by referral */
|
||||
#define CAPWAP_DISCOVERY_TYPE_AC_REFERRAL 4
|
||||
/**@}*/
|
||||
|
||||
|
||||
/* WTP mac types */
|
||||
@ -759,3 +722,7 @@ int cw_in_radio_administrative_state_wtp(struct conn *conn, struct cw_action_in
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
*@}
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user