Ren CW_DISCOVERY_RESPONSE to CAWPAP_DISCOVERY_REs...

FossilOrigin-Name: ccfb2274ae3f81d79e3264d67238822faa5df55df8c239f9ddb1b02762d8af39
This commit is contained in:
7u83@mail.ru 2018-02-23 13:18:22 +00:00
parent 106a1a451c
commit 0733403182
10 changed files with 31 additions and 24 deletions

View File

@ -25,8 +25,6 @@
#ifndef __CAPWAP_H #ifndef __CAPWAP_H
#define __CAPWAP_H #define __CAPWAP_H
//#include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
@ -49,6 +47,7 @@
/** /**
*@defgroup CAPWAPConstants CAPWAP General Constants *@defgroup CAPWAPConstants CAPWAP General Constants
*@brief General constants as defined in RFC5415
*@{ *@{
*/ */
@ -56,7 +55,7 @@
#define CAPWAP_VERSION (0) #define CAPWAP_VERSION (0)
#define CAPWAP_IANA_ENTERPRISE_NUMBER 0 #define CAPWAP_IANA_ENTERPRISE_NUMBER 0
*
/** CAPWAP Control Port*/ /** CAPWAP Control Port*/
#define CAPWAP_CONTROL_PORT 5246 #define CAPWAP_CONTROL_PORT 5246
/** CAPWAP Control Port as String */ /** CAPWAP Control Port as String */
@ -74,7 +73,8 @@
/** /**
*@defgroup CAPWAPHeaderFlags CAPWAP Header Flags *@defgroup CAPWAPHeaderFlags CAPWAP Header Flags
*@brief Alles ist schoen *@brief The CAPWAP control header flags
*
*@{ *@{
*/ */
#define CAPWAP_FLAG_HDR_R1 0x01 /**< bit 0 reserved 1 */ #define CAPWAP_FLAG_HDR_R1 0x01 /**< bit 0 reserved 1 */
@ -111,8 +111,15 @@
* @defgroup CAPWAPMessages CAPWAP message types as defined in RFC 5416 * @defgroup CAPWAPMessages CAPWAP message types as defined in RFC 5416
* @{ * @{
*/ */
/**
* The Discovery Request message is sent by the WTP to
* find an AC on the network and inform the AC about some
* basic capabillities of the WTP. */
#define CAPWAP_MSG_DISCOVERY_REQUEST 1 #define CAPWAP_MSG_DISCOVERY_REQUEST 1
#define CW_MSG_DISCOVERY_RESPONSE 2 /**
* A Discovery Response message is send by the AP to
* the WTP after receiving a Discovery Request message. */
#define CAPWAP_MSG_DISCOVERY_RESPONSE 2
#define CW_MSG_JOIN_REQUEST 3 #define CW_MSG_JOIN_REQUEST 3
#define CW_MSG_JOIN_RESPONSE 4 #define CW_MSG_JOIN_RESPONSE 4
@ -158,7 +165,7 @@
* @defgroup CAPWAPMsgElems CAPWAP Message Elements * @defgroup CAPWAPMsgElems CAPWAP Message Elements
* @brief CAPWAP message elements as defined in RFC 5415 * @brief CAPWAP message elements as defined in RFC 5415
* @{ * @{
*/ */namin
#define CW_ELEM_AC_DESCRIPTOR 1 /**< AC Descriptor */ #define CW_ELEM_AC_DESCRIPTOR 1 /**< AC Descriptor */
#define CW_ELEM_AC_IPV4_LIST 2 /**< AC IP V4 List */ #define CW_ELEM_AC_IPV4_LIST 2 /**< AC IP V4 List */

View File

@ -35,7 +35,7 @@ cw_action_in_t capwap_80211_actions_ac_in[] = {
cw_action_out_t capwap_80211_actions_ac_out[]={ cw_action_out_t capwap_80211_actions_ac_out[]={
/* Radio Infos */ /* Radio Infos */
{CW_MSG_DISCOVERY_RESPONSE, NULL /*CW_ELEM80211_WTP_RADIO_INFORMATION*/, 0, {CAPWAP_MSG_DISCOVERY_RESPONSE, NULL /*CW_ELEM80211_WTP_RADIO_INFORMATION*/, 0,
CW_ELEM80211_WTP_RADIO_INFORMATION, NULL,cw_out_radio_infos, NULL,1} CW_ELEM80211_WTP_RADIO_INFORMATION, NULL,cw_out_radio_infos, NULL,1}
, ,

View File

@ -13,7 +13,7 @@
cw_action_in_t capwap_80211_actions_wtp_in[] = { cw_action_in_t capwap_80211_actions_wtp_in[] = {
/* Discovery Response */ /* Discovery Response */
{0, 0, CW_STATE_DISCOVERY, CW_MSG_DISCOVERY_RESPONSE, {0, 0, CW_STATE_DISCOVERY, CAPWAP_MSG_DISCOVERY_RESPONSE,
CW_ACTION_IN_80211_WTP_RADIO_INFORMATION, 1} CW_ACTION_IN_80211_WTP_RADIO_INFORMATION, 1}
, ,

View File

@ -27,7 +27,7 @@
*/ */
struct cw_strlist_elem capwap_strings_msg[] = { struct cw_strlist_elem capwap_strings_msg[] = {
{ CAPWAP_MSG_DISCOVERY_REQUEST, "Discovery Request" }, { CAPWAP_MSG_DISCOVERY_REQUEST, "Discovery Request" },
{ CW_MSG_DISCOVERY_RESPONSE,"Discovery Response" }, { CAPWAP_MSG_DISCOVERY_RESPONSE,"Discovery Response" },
{ CW_MSG_JOIN_REQUEST, "Join Request"}, { CW_MSG_JOIN_REQUEST, "Join Request"},
{ CW_MSG_JOIN_RESPONSE,"Join Response"}, { CW_MSG_JOIN_RESPONSE,"Join Response"},
{ CW_MSG_CONFIGURATION_STATUS_REQUEST,"Configuration Status Request"}, { CW_MSG_CONFIGURATION_STATUS_REQUEST,"Configuration Status Request"},

View File

@ -550,7 +550,7 @@ static cw_action_out_t actions_out[]={
/* AC Descriptor - Discovery Response */ /* AC Descriptor - Discovery Response */
{ {
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.item_id = CW_ITEM_AC_DESCRIPTOR, .item_id = CW_ITEM_AC_DESCRIPTOR,
.elem_id = CW_ELEM_AC_DESCRIPTOR, .elem_id = CW_ELEM_AC_DESCRIPTOR,
.out = capwap_out_ac_descriptor, .out = capwap_out_ac_descriptor,
@ -560,7 +560,7 @@ static cw_action_out_t actions_out[]={
/* AC Name - Discovery Response */ /* AC Name - Discovery Response */
{ {
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_AC_NAME, .elem_id = CW_ELEM_AC_NAME,
.item_id = CW_ITEM_AC_NAME, .item_id = CW_ITEM_AC_NAME,
.out = cw_out_generic, .out = cw_out_generic,
@ -575,7 +575,7 @@ static cw_action_out_t actions_out[]={
* of .elem_id isn't needed. * of .elem_id isn't needed.
*/ */
{ {
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST, .item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST,
.out = cw_out_capwap_control_ip_addr_list, .out = cw_out_capwap_control_ip_addr_list,
.get = cw_out_get_outgoing, .get = cw_out_get_outgoing,

View File

@ -11,7 +11,7 @@ static cw_action_in_t actions_in[] = {
/* Message Discovery Response */ /* Message Discovery Response */
{ {
.capwap_state = CW_STATE_DISCOVERY, .capwap_state = CW_STATE_DISCOVERY,
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.end = cw_in_check_disc_resp .end = cw_in_check_disc_resp
} }
, ,
@ -19,7 +19,7 @@ static cw_action_in_t actions_in[] = {
/* AC Descriptor - Discovery Response */ /* AC Descriptor - Discovery Response */
{ {
.capwap_state = CW_STATE_DISCOVERY, .capwap_state = CW_STATE_DISCOVERY,
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_AC_DESCRIPTOR, .elem_id = CW_ELEM_AC_DESCRIPTOR,
.item_id = CW_ITEM_AC_DESCRIPTOR, .item_id = CW_ITEM_AC_DESCRIPTOR,
.start = cw_in_ac_descriptor, .start = cw_in_ac_descriptor,
@ -32,7 +32,7 @@ static cw_action_in_t actions_in[] = {
/* AC Name - Discovery Response */ /* AC Name - Discovery Response */
{ {
.capwap_state = CW_STATE_DISCOVERY, .capwap_state = CW_STATE_DISCOVERY,
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_AC_NAME, .elem_id = CW_ELEM_AC_NAME,
.item_id = CW_ITEM_AC_NAME, .item_id = CW_ITEM_AC_NAME,
.start = cw_in_generic2, .start = cw_in_generic2,
@ -45,7 +45,7 @@ static cw_action_in_t actions_in[] = {
/* CAPWAP Control IPv4 Address - Discovery Response*/ /* CAPWAP Control IPv4 Address - Discovery Response*/
{ {
.capwap_state = CW_STATE_DISCOVERY, .capwap_state = CW_STATE_DISCOVERY,
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_CAPWAP_CONTROL_IPV4_ADDRESS, .elem_id = CW_ELEM_CAPWAP_CONTROL_IPV4_ADDRESS,
.item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST, .item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST,
.start = cw_in_capwap_control_ip_address, .start = cw_in_capwap_control_ip_address,
@ -59,7 +59,7 @@ static cw_action_in_t actions_in[] = {
/* CAPWAP Control IPv6 Address - Discovery Response*/ /* CAPWAP Control IPv6 Address - Discovery Response*/
{ {
.capwap_state = CW_STATE_DISCOVERY, .capwap_state = CW_STATE_DISCOVERY,
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_CAPWAP_CONTROL_IPV6_ADDRESS, .elem_id = CW_ELEM_CAPWAP_CONTROL_IPV6_ADDRESS,
.item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST, .item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST,
.start = cw_in_capwap_control_ip_address, // Change to v6 handler .start = cw_in_capwap_control_ip_address, // Change to v6 handler
@ -72,7 +72,7 @@ static cw_action_in_t actions_in[] = {
/* Vendor Specific Payload - Discovery Response*/ /* Vendor Specific Payload - Discovery Response*/
{ {
.capwap_state = CW_STATE_DISCOVERY, .capwap_state = CW_STATE_DISCOVERY,
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_VENDOR_SPECIFIC_PAYLOAD, .elem_id = CW_ELEM_VENDOR_SPECIFIC_PAYLOAD,
.start = cw_in_vendor_specific_payload .start = cw_in_vendor_specific_payload
} }
@ -86,7 +86,7 @@ static cw_action_in_t actions_in[] = {
* of Discovery Response * of Discovery Response
*/ */
.capwap_state = CW_STATE_DISCOVERY, .capwap_state = CW_STATE_DISCOVERY,
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_RESULT_CODE, .elem_id = CW_ELEM_RESULT_CODE,
.item_id = CW_ITEM_RESULT_CODE, .item_id = CW_ITEM_RESULT_CODE,
.start = cw_in_generic2, .start = cw_in_generic2,

View File

@ -103,7 +103,7 @@ cw_action_out_t actions_ac_out[]={
/* 802.11 Radio Information - Discovery Response */ /* 802.11 Radio Information - Discovery Response */
{ {
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION, .elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION,
.item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION , .item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION ,
.out = cw_out_radio_infos, .out = cw_out_radio_infos,

View File

@ -20,7 +20,7 @@ static cw_action_in_t actions_wtp_in[] = {
/* 802.11 Radio Inmformation - Discovery Response */ /* 802.11 Radio Inmformation - Discovery Response */
{ {
.capwap_state = CW_STATE_DISCOVERY, .capwap_state = CW_STATE_DISCOVERY,
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION, .elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION,
.item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION, .item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION,
// .start = cw_in_radio_generic, // .start = cw_in_radio_generic,

View File

@ -326,7 +326,7 @@ static cw_action_out_t actions_out[]={
/* AC Descriptor - Discovery Response */ /* AC Descriptor - Discovery Response */
{ {
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.item_id = CW_ITEM_AC_DESCRIPTOR, .item_id = CW_ITEM_AC_DESCRIPTOR,
.elem_id = CW_ELEM_AC_DESCRIPTOR, .elem_id = CW_ELEM_AC_DESCRIPTOR,
.out = cisco_out_ac_descriptor, .out = cisco_out_ac_descriptor,
@ -339,7 +339,7 @@ static cw_action_out_t actions_out[]={
* Important to get the WTP a DTLS connection established * Important to get the WTP a DTLS connection established
*/ */
{ {
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.item_id = CW_ITEM_AC_TIMESTAMP, .item_id = CW_ITEM_AC_TIMESTAMP,
.vendor_id = CW_VENDOR_ID_CISCO, .vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_AP_TIMESYNC, .elem_id = CW_CISCO_AP_TIMESYNC,

View File

@ -47,7 +47,7 @@ static cw_action_in_t actions_in[] = {
/* AC Descriptor - Discovery Response */ /* AC Descriptor - Discovery Response */
{ {
.capwap_state = CW_STATE_DISCOVERY, .capwap_state = CW_STATE_DISCOVERY,
.msg_id = CW_MSG_DISCOVERY_RESPONSE, .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_AC_DESCRIPTOR, .elem_id = CW_ELEM_AC_DESCRIPTOR,
.item_id = CW_ITEM_AC_DESCRIPTOR, .item_id = CW_ITEM_AC_DESCRIPTOR,
.start = cisco_in_ac_descriptor, .start = cisco_in_ac_descriptor,