diff --git a/src/cw/capwap.h b/src/cw/capwap.h index 18901a7a..27fbdadf 100644 --- a/src/cw/capwap.h +++ b/src/cw/capwap.h @@ -25,8 +25,6 @@ #ifndef __CAPWAP_H #define __CAPWAP_H - -//#include #include #include @@ -49,6 +47,7 @@ /** *@defgroup CAPWAPConstants CAPWAP General Constants + *@brief General constants as defined in RFC5415 *@{ */ @@ -56,7 +55,7 @@ #define CAPWAP_VERSION (0) #define CAPWAP_IANA_ENTERPRISE_NUMBER 0 - + * /** CAPWAP Control Port*/ #define CAPWAP_CONTROL_PORT 5246 /** CAPWAP Control Port as String */ @@ -74,7 +73,8 @@ /** *@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 */ @@ -111,8 +111,15 @@ * @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 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_RESPONSE 4 @@ -158,7 +165,7 @@ * @defgroup CAPWAPMsgElems CAPWAP Message Elements * @brief CAPWAP message elements as defined in RFC 5415 * @{ - */ + */namin #define CW_ELEM_AC_DESCRIPTOR 1 /**< AC Descriptor */ #define CW_ELEM_AC_IPV4_LIST 2 /**< AC IP V4 List */ diff --git a/src/cw/capwap_80211_actions_ac.c b/src/cw/capwap_80211_actions_ac.c index ebbaea98..b2ec584b 100644 --- a/src/cw/capwap_80211_actions_ac.c +++ b/src/cw/capwap_80211_actions_ac.c @@ -35,7 +35,7 @@ cw_action_in_t capwap_80211_actions_ac_in[] = { cw_action_out_t capwap_80211_actions_ac_out[]={ /* 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} , diff --git a/src/cw/capwap_80211_actions_wtp.c b/src/cw/capwap_80211_actions_wtp.c index f1c5a042..a4cedd70 100644 --- a/src/cw/capwap_80211_actions_wtp.c +++ b/src/cw/capwap_80211_actions_wtp.c @@ -13,7 +13,7 @@ cw_action_in_t capwap_80211_actions_wtp_in[] = { /* 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} , diff --git a/src/cw/capwap_strings_msg.c b/src/cw/capwap_strings_msg.c index ecab6e4f..d323cd91 100644 --- a/src/cw/capwap_strings_msg.c +++ b/src/cw/capwap_strings_msg.c @@ -27,7 +27,7 @@ */ struct cw_strlist_elem capwap_strings_msg[] = { { 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_RESPONSE,"Join Response"}, { CW_MSG_CONFIGURATION_STATUS_REQUEST,"Configuration Status Request"}, diff --git a/src/mod/capwap/capwap_actions_ac.c b/src/mod/capwap/capwap_actions_ac.c index 3a4fbde7..207f4c86 100644 --- a/src/mod/capwap/capwap_actions_ac.c +++ b/src/mod/capwap/capwap_actions_ac.c @@ -550,7 +550,7 @@ static cw_action_out_t actions_out[]={ /* AC Descriptor - Discovery Response */ { - .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE, .item_id = CW_ITEM_AC_DESCRIPTOR, .elem_id = CW_ELEM_AC_DESCRIPTOR, .out = capwap_out_ac_descriptor, @@ -560,7 +560,7 @@ static cw_action_out_t actions_out[]={ /* AC Name - Discovery Response */ { - .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE, .elem_id = CW_ELEM_AC_NAME, .item_id = CW_ITEM_AC_NAME, .out = cw_out_generic, @@ -575,7 +575,7 @@ static cw_action_out_t actions_out[]={ * 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, .out = cw_out_capwap_control_ip_addr_list, .get = cw_out_get_outgoing, diff --git a/src/mod/capwap/capwap_actions_wtp.c b/src/mod/capwap/capwap_actions_wtp.c index 6c8c0026..d7852e37 100644 --- a/src/mod/capwap/capwap_actions_wtp.c +++ b/src/mod/capwap/capwap_actions_wtp.c @@ -11,7 +11,7 @@ static cw_action_in_t actions_in[] = { /* Message Discovery Response */ { .capwap_state = CW_STATE_DISCOVERY, - .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE, .end = cw_in_check_disc_resp } , @@ -19,7 +19,7 @@ static cw_action_in_t actions_in[] = { /* AC Descriptor - Discovery Response */ { .capwap_state = CW_STATE_DISCOVERY, - .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE, .elem_id = CW_ELEM_AC_DESCRIPTOR, .item_id = CW_ITEM_AC_DESCRIPTOR, .start = cw_in_ac_descriptor, @@ -32,7 +32,7 @@ static cw_action_in_t actions_in[] = { /* AC Name - Discovery Response */ { .capwap_state = CW_STATE_DISCOVERY, - .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE, .elem_id = CW_ELEM_AC_NAME, .item_id = CW_ITEM_AC_NAME, .start = cw_in_generic2, @@ -45,7 +45,7 @@ static cw_action_in_t actions_in[] = { /* CAPWAP Control IPv4 Address - Discovery Response*/ { .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, .item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST, .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_state = CW_STATE_DISCOVERY, - .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE, .elem_id = CW_ELEM_CAPWAP_CONTROL_IPV6_ADDRESS, .item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST, .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*/ { .capwap_state = CW_STATE_DISCOVERY, - .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE, .elem_id = CW_ELEM_VENDOR_SPECIFIC_PAYLOAD, .start = cw_in_vendor_specific_payload } @@ -86,7 +86,7 @@ static cw_action_in_t actions_in[] = { * of Discovery Response */ .capwap_state = CW_STATE_DISCOVERY, - .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE, .elem_id = CW_ELEM_RESULT_CODE, .item_id = CW_ITEM_RESULT_CODE, .start = cw_in_generic2, diff --git a/src/mod/capwap80211/capwap80211_actions_ac.c b/src/mod/capwap80211/capwap80211_actions_ac.c index 044639f9..93d7898d 100644 --- a/src/mod/capwap80211/capwap80211_actions_ac.c +++ b/src/mod/capwap80211/capwap80211_actions_ac.c @@ -103,7 +103,7 @@ cw_action_out_t actions_ac_out[]={ /* 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, .item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION , .out = cw_out_radio_infos, diff --git a/src/mod/capwap80211/capwap80211_actions_wtp.c b/src/mod/capwap80211/capwap80211_actions_wtp.c index e412c42a..b7f5fcd0 100644 --- a/src/mod/capwap80211/capwap80211_actions_wtp.c +++ b/src/mod/capwap80211/capwap80211_actions_wtp.c @@ -20,7 +20,7 @@ static cw_action_in_t actions_wtp_in[] = { /* 802.11 Radio Inmformation - Discovery Response */ { .capwap_state = CW_STATE_DISCOVERY, - .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE, .elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION, .item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION, // .start = cw_in_radio_generic, diff --git a/src/mod/cisco/cisco_actions_ac.c b/src/mod/cisco/cisco_actions_ac.c index 428c84c2..c6f06258 100644 --- a/src/mod/cisco/cisco_actions_ac.c +++ b/src/mod/cisco/cisco_actions_ac.c @@ -326,7 +326,7 @@ static cw_action_out_t actions_out[]={ /* AC Descriptor - Discovery Response */ { - .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE, .item_id = CW_ITEM_AC_DESCRIPTOR, .elem_id = CW_ELEM_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 */ { - .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE, .item_id = CW_ITEM_AC_TIMESTAMP, .vendor_id = CW_VENDOR_ID_CISCO, .elem_id = CW_CISCO_AP_TIMESYNC, diff --git a/src/mod/cisco/cisco_actions_wtp.c b/src/mod/cisco/cisco_actions_wtp.c index 9b37e2ac..7e72feed 100644 --- a/src/mod/cisco/cisco_actions_wtp.c +++ b/src/mod/cisco/cisco_actions_wtp.c @@ -47,7 +47,7 @@ static cw_action_in_t actions_in[] = { /* AC Descriptor - Discovery Response */ { .capwap_state = CW_STATE_DISCOVERY, - .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE, .elem_id = CW_ELEM_AC_DESCRIPTOR, .item_id = CW_ITEM_AC_DESCRIPTOR, .start = cisco_in_ac_descriptor,