CW_JOIN_REQ... to CAPWAP_JOIN_REQ...

FossilOrigin-Name: 809b5b2014e10f7c70001984d874908d6f6c63198c0883e63ee919c9d89451dd
This commit is contained in:
7u83@mail.ru 2018-02-23 16:23:53 +00:00
parent a54b6ea36c
commit d72cc6ef02
12 changed files with 47 additions and 43 deletions

View File

@ -121,7 +121,11 @@
* 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
/**
* The CAPWAP Join Request message type. A Join Request is
* snet by the WTP to join an AC */
#define CAPWAP_MSG_JOIN_REQUEST 3
#define CW_MSG_JOIN_RESPONSE 4
#define CW_MSG_CONFIGURATION_STATUS_REQUEST 5

View File

@ -23,7 +23,7 @@ cw_action_in_t capwap_80211_actions_ac_in[] = {
* Discovery Resquest
*/
{0, 0, CW_STATE_JOIN, CW_MSG_JOIN_REQUEST,
{0, 0, CW_STATE_JOIN, CAPWAP_MSG_JOIN_REQUEST,
CW_ACTION_IN_80211_WTP_RADIO_INFORMATION, 1}
,

View File

@ -43,7 +43,7 @@ cw_action_out_t capwap_80211_actions_wtp_out[]={
*/
/* 802.11 Radio Information */
{CW_MSG_JOIN_REQUEST, CW_ITEM_RADIO_INFOS, 0,
{CAPWAP_MSG_JOIN_REQUEST, CW_ITEM_RADIO_INFOS, 0,
CW_ELEM80211_WTP_RADIO_INFORMATION, NULL,cw_out_radio_infos, NULL,1},

View File

@ -28,7 +28,7 @@
struct cw_strlist_elem capwap_strings_msg[] = {
{ CAPWAP_MSG_DISCOVERY_REQUEST, "Discovery Request" },
{ CAPWAP_MSG_DISCOVERY_RESPONSE,"Discovery Response" },
{ CW_MSG_JOIN_REQUEST, "Join Request"},
{ CAPWAP_MSG_JOIN_REQUEST, "Join Request"},
{ CW_MSG_JOIN_RESPONSE,"Join Response"},
{ CW_MSG_CONFIGURATION_STATUS_REQUEST,"Configuration Status Request"},
{ CW_MSG_CONFIGURATION_STATUS_RESPONSE,"Configuration Status Response"},

View File

@ -27,7 +27,7 @@ int cw_in_radio_generic(struct conn *conn, struct cw_action_in *a, uint8_t * dat
if (!radio) {
if (a->vendor_id != 0
|| ( (a->vendor_id == 0) && (a->msg_id != CAPWAP_MSG_DISCOVERY_REQUEST
&& a->msg_id != CW_MSG_JOIN_REQUEST) )) {
&& a->msg_id != CAPWAP_MSG_JOIN_REQUEST) )) {
cw_dbg(DBG_ELEM_ERR, "Radio not found %d", rid);
return 0;
}

View File

@ -126,7 +126,7 @@ static cw_action_in_t actions_in[] = {
*/
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.end = cw_in_check_join_req
}
,
@ -134,7 +134,7 @@ static cw_action_in_t actions_in[] = {
/* Location Data - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id =CW_MSG_JOIN_REQUEST,
.msg_id =CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_LOCATION_DATA,
.item_id = CW_ITEM_LOCATION_DATA,
.start = cw_in_generic2,
@ -147,7 +147,7 @@ static cw_action_in_t actions_in[] = {
/* Element WTP Board Data - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_BOARD_DATA,
.start = cw_in_wtp_board_data,
.item_id = CW_ITEM_WTP_BOARD_DATA,
@ -158,7 +158,7 @@ static cw_action_in_t actions_in[] = {
/* Element WTP Descriptor - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_DESCRIPTOR,
.start = capwap_in_wtp_descriptor,
.item_id = CW_ITEM_WTP_DESCRIPTOR,
@ -169,7 +169,7 @@ static cw_action_in_t actions_in[] = {
/* Element WTP Name - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_NAME,
.start = cw_in_generic2,
.item_id = CW_ITEM_WTP_NAME,
@ -182,7 +182,7 @@ static cw_action_in_t actions_in[] = {
/* Element Session ID - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_SESSION_ID,
.start = capwap_in_session_id,
.item_id = CW_ITEM_SESSION_ID,
@ -195,7 +195,7 @@ static cw_action_in_t actions_in[] = {
/* WTP Frame Tunnel Mode - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_FRAME_TUNNEL_MODE,
.start = cw_in_generic2,
.item_id = CW_ITEM_WTP_FRAME_TUNNEL_MODE,
@ -208,7 +208,7 @@ static cw_action_in_t actions_in[] = {
/* WTP Mac Type - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_MAC_TYPE,
.start = cw_in_generic2,
.item_id = CW_ITEM_WTP_MAC_TYPE,
@ -226,7 +226,7 @@ static cw_action_in_t actions_in[] = {
/* ECN Support - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_ECN_SUPPORT,
.item_id = CW_ITEM_ECN_SUPPORT,
.start = cw_in_generic2,
@ -240,7 +240,7 @@ static cw_action_in_t actions_in[] = {
/* Local IPv4 Address - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_CAPWAP_LOCAL_IPV4_ADDRESS,
.item_id = CW_ITEM_CAPWAP_LOCAL_IP_ADDRESS,
.start = cw_in_capwap_local_ipv4_address,
@ -253,7 +253,7 @@ static cw_action_in_t actions_in[] = {
/* Local IPv6 Address - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_CAPWAP_LOCAL_IPV6_ADDRESS,
.item_id = CW_ITEM_CAPWAP_LOCAL_IP_ADDRESS,
.start = cw_in_capwap_local_ipv4_address,
@ -268,7 +268,7 @@ static cw_action_in_t actions_in[] = {
/* CAPWAP Transport Protocol - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_CAPWAP_TRANSPORT_PROTOCOL,
.item_id = CW_ITEM_CAPWAP_TRANSPORT_PROTOCOL,
.start = cw_in_generic2,
@ -280,7 +280,7 @@ static cw_action_in_t actions_in[] = {
/* Maximum Message Length - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_MAXIMUM_MESSAGE_LENGTH,
.start = cw_in_generic2,
.item_id = CW_ITEM_MAXIMUM_MESSAGE_LENGTH,
@ -292,7 +292,7 @@ static cw_action_in_t actions_in[] = {
/* WTP Reboot Statistics - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_REBOOT_STATISTICS,
.start = cw_in_wtp_reboot_statistics,
.item_id = CW_ITEM_WTP_REBOOT_STATISTICS,
@ -304,7 +304,7 @@ static cw_action_in_t actions_in[] = {
/* Vendor Specific Payload - Join Request*/
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_VENDOR_SPECIFIC_PAYLOAD,
.start = cw_in_vendor_specific_payload,
.min_len=7

View File

@ -511,7 +511,7 @@ static cw_action_out_t actions_out[] = {
/* Location Data - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_LOCATION_DATA,
.item_id = CW_ITEM_LOCATION_DATA,
.out = cw_out_generic,
@ -522,7 +522,7 @@ static cw_action_out_t actions_out[] = {
/* WTP Board Data - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_BOARD_DATA,
.item_id = CW_ITEM_WTP_BOARD_DATA,
.out = cw_out_wtp_board_data,
@ -533,7 +533,7 @@ static cw_action_out_t actions_out[] = {
/* WTP Descriptor - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_DESCRIPTOR,
.item_id = CW_ITEM_WTP_DESCRIPTOR,
.out = cw_out_wtp_descriptor,
@ -543,7 +543,7 @@ static cw_action_out_t actions_out[] = {
/* WTP Name - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_NAME,
.item_id = CW_ITEM_WTP_NAME,
.out = cw_out_generic,
@ -554,7 +554,7 @@ static cw_action_out_t actions_out[] = {
/* Session ID - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_SESSION_ID,
.item_id = CW_ITEM_SESSION_ID,
.out = cw_out_generic,
@ -565,7 +565,7 @@ static cw_action_out_t actions_out[] = {
/* WTP Frame Tunnel Mode - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_FRAME_TUNNEL_MODE,
.item_id = CW_ITEM_WTP_FRAME_TUNNEL_MODE,
.out = cw_out_generic,
@ -577,7 +577,7 @@ static cw_action_out_t actions_out[] = {
/* WTP MAC Type - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_MAC_TYPE,
.item_id = CW_ITEM_WTP_MAC_TYPE,
.out = cw_out_generic,
@ -588,7 +588,7 @@ static cw_action_out_t actions_out[] = {
/* ECN Support - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_ECN_SUPPORT,
.item_id = CW_ITEM_ECN_SUPPORT,
.out = cw_out_generic,
@ -599,7 +599,7 @@ static cw_action_out_t actions_out[] = {
/* CAPWAP Local IP Address - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.item_id = CW_ITEM_CAPWAP_LOCAL_IP_ADDRESS,
.out = cw_out_capwap_local_ip_address,
.mand = 1
@ -608,7 +608,7 @@ static cw_action_out_t actions_out[] = {
/* WTP Reboot Statistics - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_REBOOT_STATISTICS,
.item_id = CW_ITEM_WTP_REBOOT_STATISTICS,
.out = cw_out_wtp_reboot_statistics,

View File

@ -46,7 +46,7 @@ static cw_action_in_t actions_ac_in[] = {
/* 802.11 Radio Information - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION,
.item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION,
.start = cw_in_radio_generic,

View File

@ -84,7 +84,7 @@ cw_action_out_t actions_out[]={
/* 802.11 Radio Information - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.item_id = CW_ITEM_RADIO_INFOS ,
.elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION,
.out = cw_out_radio_infos,

View File

@ -105,7 +105,7 @@ static cw_action_in_t actions_in[] = {
/* WTP Descriptor - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_DESCRIPTOR,
.start = cisco_in_wtp_descriptor,
.item_id = "wtp_descriptor",
@ -117,7 +117,7 @@ static cw_action_in_t actions_in[] = {
{
/* Cisco uses 4 byte session ids */
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_SESSION_ID,
.start = capwap_in_session_id,
.item_id = CW_ITEM_SESSION_ID,
@ -130,7 +130,7 @@ static cw_action_in_t actions_in[] = {
/* Local IPv4 Address - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_IPV4_IP_ADDRESS,
.item_id = CW_ITEM_CAPWAP_LOCAL_IP_ADDRESS,
.start = cw_in_capwap_local_ipv4_address,
@ -143,7 +143,7 @@ static cw_action_in_t actions_in[] = {
/* Local IPv6 Address - Join Request */
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_IPV6_IP_ADDRESS,
.item_id = CW_ITEM_CAPWAP_LOCAL_IP_ADDRESS,
.start = cw_in_capwap_local_ipv4_address,
@ -158,7 +158,7 @@ static cw_action_in_t actions_in[] = {
/* Cisco (using draft 7) does nothing know
* about ECN support, so make it non-mandatory */
.capwap_state = CW_STATE_JOIN,
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_ECN_SUPPORT,
.item_id = CW_ITEM_ECN_SUPPORT,
.start = cw_in_generic2,

View File

@ -297,7 +297,7 @@ static cw_action_out_t actions_out[]={
/* CAPWAP Local IP Address - Join Request */
{
/* use draft 7 elem ids */
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.item_id = CW_ITEM_CAPWAP_LOCAL_IP_ADDRESS,
.out = cw_out_capwap_local_ip_address_7,
.mand = 1
@ -306,7 +306,7 @@ static cw_action_out_t actions_out[]={
/* WTP Descriptor - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_WTP_DESCRIPTOR,
.item_id = CW_ITEM_WTP_DESCRIPTOR,
.out = cisco_out_wtp_descriptor,
@ -316,7 +316,7 @@ static cw_action_out_t actions_out[]={
/* WTP Group Name (WTP Name) - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_AP_GROUP_NAME,
.item_id = CIPWAP_ITEM_WTP_GROUP_NAME,
@ -328,7 +328,7 @@ static cw_action_out_t actions_out[]={
/* WTP Board Data Options - Join Request */
{
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_BOARD_DATA_OPTIONS,
.item_id = CW_ITEM_CISCO_BOARD_DATA_OPTIONS,
@ -344,7 +344,7 @@ static cw_action_out_t actions_out[]={
{
/* Cisco doesn't know ECN support, so we
define no output method */
.msg_id = CW_MSG_JOIN_REQUEST,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
.elem_id = CW_ELEM_ECN_SUPPORT,
.item_id = CW_ITEM_ECN_SUPPORT,
.mand = 0

View File

@ -186,7 +186,7 @@ int run_join(struct conn *conn)
//mbag_del (conn->incomming,CW_ITEM_RESULT_CODE);
int rc = cw_send_request(conn, CW_MSG_JOIN_REQUEST);
int rc = cw_send_request(conn, CAPWAP_MSG_JOIN_REQUEST);
if (!cw_rcok(rc)) {
if (rc > 0) {