diff --git a/actube.workspace b/actube.workspace
index a1ba30eb..d976dd40 100644
--- a/actube.workspace
+++ b/actube.workspace
@@ -3,9 +3,9 @@
-
+
-
+
diff --git a/src/ac/wtpman.c b/src/ac/wtpman.c
index 6b69ef0b..b4d49527 100644
--- a/src/ac/wtpman.c
+++ b/src/ac/wtpman.c
@@ -90,14 +90,14 @@ static void wtpman_run_discovery(void *arg)
extern cw_actionlist_in_t the_tree;
- wtpman->conn->capwap_state = CW_STATE_DISCOVERY;
+ wtpman->conn->capwap_state = CAPWAP_STATE_DISCOVERY;
wtpman->conn->actions = &capwap_actions;
wtpman->conn->outgoing = mbag_create();
wtpman->conn->incomming = mbag_create();
while (!cw_timer_timeout(timer)
- && wtpman->conn->capwap_state == CW_STATE_DISCOVERY) {
+ && wtpman->conn->capwap_state == CAPWAP_STATE_DISCOVERY) {
cw_read_messages(wtpman->conn);
}
@@ -120,7 +120,7 @@ int xprocess_message(struct conn *conn, uint8_t * rawmsg, int rawlen,
uint32_t type = cw_get_msg_type(msgptr);
cw_log(LOG_ERR, "Hey: %d", type);
if (type == CAPWAP_MSG_DISCOVERY_REQUEST)
- conn->capwap_state = CW_STATE_DISCOVERY;
+ conn->capwap_state = CAPWAP_STATE_DISCOVERY;
return process_message(conn, rawmsg, rawlen, from);
diff --git a/src/cw/capwap.h b/src/cw/capwap.h
index 87cb6038..e7e5865c 100644
--- a/src/cw/capwap.h
+++ b/src/cw/capwap.h
@@ -220,7 +220,11 @@
#define CW_ELEM_DELETE_MAC_ACL_ENTRY 17
#define CW_ELEM_DELETE_STATION 18
#define CW_ELEM_RESERVED_19 19
-#define CW_ELEM_DISCOVERY_TYPE 20
+/**
+ * Indicates the AP's Discovery Type
+ * @see CAPWAPDIscoveryTypes
+ */
+#define CAPWAP_ELEM_DISCOVERY_TYPE 20
#define CW_ELEM_DUPLICATE_IPV4_ADDRESS 21
#define CW_ELEM_DUPLICATE_IPV6_ADRESS 22
#define CW_ELEM_ECN_SUPPORT 53
@@ -239,8 +243,11 @@
#define CW_ELEM_SESSION_ID 35
#define CW_ELEM_STATISTICS_TIMER 36
#define CW_ELEM_VENDOR_SPECIFIC_PAYLOAD 37
-#define CW_ELEM_WTP_BOARD_DATA 38
-#define CW_ELEM_WTP_DESCRIPTOR 39
+#define CAPWAP_ELEM_WTP_BOARD_DATA 38
+/**
+ * The WTP Descriptor message element conteins information
+ * about the WTP */
+#define CAPWAP_ELEM_WTP_DESCRIPTOR 39
#define CW_ELEM_WTP_FALLBACK 40
#define CW_ELEM_WTP_FRAME_TUNNEL_MODE 41
#define CW_ELEM_RESERVED_42 42
@@ -662,7 +669,7 @@ struct cw_ac_status {
enum capwap_states {
CW_STATE_NONE = 0,
/** Discovery State */
- CW_STATE_DISCOVERY,
+ CAPWAP_STATE_DISCOVERY,
/** Join State */
CW_STATE_JOIN,
/** Config State */
diff --git a/src/cw/capwap_80211_actions_ac.c b/src/cw/capwap_80211_actions_ac.c
index 81e77a30..5f66d457 100644
--- a/src/cw/capwap_80211_actions_ac.c
+++ b/src/cw/capwap_80211_actions_ac.c
@@ -16,7 +16,7 @@ cw_action_in_t capwap_80211_actions_ac_in[] = {
* Discovery Resquest
*/
- {0, 0, CW_STATE_DISCOVERY, CAPWAP_MSG_DISCOVERY_REQUEST,
+ {0, 0, CAPWAP_STATE_DISCOVERY, CAPWAP_MSG_DISCOVERY_REQUEST,
CW_ACTION_IN_80211_WTP_RADIO_INFORMATION, 1}
,
/* --------------------------------------------------------
diff --git a/src/cw/capwap_80211_actions_wtp.c b/src/cw/capwap_80211_actions_wtp.c
index aa2024f8..fdc7147b 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, CAPWAP_MSG_DISCOVERY_RESPONSE,
+ {0, 0, CAPWAP_STATE_DISCOVERY, CAPWAP_MSG_DISCOVERY_RESPONSE,
CW_ACTION_IN_80211_WTP_RADIO_INFORMATION, 1}
,
diff --git a/src/cw/capwap_strings_elem.c b/src/cw/capwap_strings_elem.c
index 6f018bbb..b405b5eb 100644
--- a/src/cw/capwap_strings_elem.c
+++ b/src/cw/capwap_strings_elem.c
@@ -25,7 +25,7 @@ struct cw_strlist_elem capwap_strings_elem[] = {
{CW_ELEM_DELETE_MAC_ACL_ENTRY, "Delete MAC ACL Entry"},
{CW_ELEM_DELETE_STATION, "Delete Station"},
{CW_ELEM_RESERVED_19, "Reserved 19"},
- {CW_ELEM_DISCOVERY_TYPE, "Discovery Type"},
+ {CAPWAP_ELEM_DISCOVERY_TYPE, "Discovery Type"},
{CW_ELEM_DUPLICATE_IPV4_ADDRESS, "Duplicate IPv4 Address"},
{CW_ELEM_DUPLICATE_IPV6_ADRESS, "Duplicate IPv6 Address"},
{CW_ELEM_ECN_SUPPORT, "ECN Support"},
@@ -44,8 +44,8 @@ struct cw_strlist_elem capwap_strings_elem[] = {
{CW_ELEM_SESSION_ID, "Session ID"},
{CW_ELEM_STATISTICS_TIMER, "Statistics Timer"},
{CW_ELEM_VENDOR_SPECIFIC_PAYLOAD, "Vendor Specific Payload"},
- {CW_ELEM_WTP_BOARD_DATA, "WTP Board Data"},
- {CW_ELEM_WTP_DESCRIPTOR, "WTP Descriptor"},
+ {CAPWAP_ELEM_WTP_BOARD_DATA, "WTP Board Data"},
+ {CAPWAP_ELEM_WTP_DESCRIPTOR, "WTP Descriptor"},
{CW_ELEM_WTP_FALLBACK, "WTP Fallback"},
{CW_ELEM_WTP_FRAME_TUNNEL_MODE, "WTP Frame Tunnel Mode"},
{CW_ELEM_RESERVED_42, "Reserved 42"},
diff --git a/src/cw/capwap_strings_state.c b/src/cw/capwap_strings_state.c
index 58b57a06..ff4aab4f 100644
--- a/src/cw/capwap_strings_state.c
+++ b/src/cw/capwap_strings_state.c
@@ -1,7 +1,7 @@
#include "capwap.h"
struct cw_strlist_elem capwap_strings_state[] = {
-{ CW_STATE_DISCOVERY, "Discovery" },
+{ CAPWAP_STATE_DISCOVERY, "Discovery" },
{ CW_STATE_JOIN,"Join" },
{ CW_STATE_RUN,"Run" },
{ CW_STATE_CONFIGURE,"Configure" },
diff --git a/src/cw/cw.h b/src/cw/cw.h
index f6ad7e42..68315870 100644
--- a/src/cw/cw.h
+++ b/src/cw/cw.h
@@ -100,6 +100,40 @@
#define cw_get_hdr_flag_f(th) ((ntohl( *((uint32_t*)th)) & CAPWAP_FLAG_HDR_F ) ? 1:0)
#define cw_get_hdr_flag_t(th) ((ntohl( *((uint32_t*)th)) & CAPWAP_FLAG_HDR_T ) ? 1:0)
+
+
+
+
+typedef struct{
+ int proto;
+ int vendor;
+ int id;
+ int mand;
+}cw_messagedef_t;
+
+typedef struct {
+ int type;
+ int * states;
+ cw_messagedef_t * elements;
+}cw_message_t;
+
+typedef struct {
+ int proto;
+ int vendor;
+ int id;
+
+ int min_len;
+ int max_len;
+ const char * name;
+}cw_message_element_t;
+
+typefe struct {
+
+
+}cw_message_set;
+
+
+
/**
* Get length wireless specific data
* @param th Pointer to packet
diff --git a/src/cw/cw_out_wtp_board_data.c b/src/cw/cw_out_wtp_board_data.c
index 14c4eb33..b061a890 100644
--- a/src/cw/cw_out_wtp_board_data.c
+++ b/src/cw/cw_out_wtp_board_data.c
@@ -105,6 +105,6 @@ printf("Val: %s\n",buf);
}
int l = d - dst-4;
- return l + cw_put_elem_hdr(dst, CW_ELEM_WTP_BOARD_DATA, l );
+ return l + cw_put_elem_hdr(dst, CAPWAP_ELEM_WTP_BOARD_DATA, l );
}
diff --git a/src/cw/wtpinfo_readelem_wtp_board_data.c b/src/cw/wtpinfo_readelem_wtp_board_data.c
index c437d40c..45c203b8 100644
--- a/src/cw/wtpinfo_readelem_wtp_board_data.c
+++ b/src/cw/wtpinfo_readelem_wtp_board_data.c
@@ -58,7 +58,7 @@ static void wtpinfo_readsubelems_wtp_board_data(struct wtpinfo * wtpinfo,uint8_t
int wtpinfo_readelem_wtp_board_data(struct wtpinfo *wtpinfo, int type, uint8_t *msgelem, int len)
{
- if (type!=CW_ELEM_WTP_BOARD_DATA)
+ if (type!=CAPWAP_ELEM_WTP_BOARD_DATA)
return 0;
if (len<4){
cw_dbg(DBG_ELEM,"Discarding WTP_BOARD_DATA msgelem, wrong size, type=%d, len=%d\n",type,len);
diff --git a/src/mod/capwap/capwap_actions_ac.c b/src/mod/capwap/capwap_actions_ac.c
index 128c8196..50bcfe48 100644
--- a/src/mod/capwap/capwap_actions_ac.c
+++ b/src/mod/capwap/capwap_actions_ac.c
@@ -26,6 +26,68 @@
#include "mod_capwap.h"
+static cw_message_element_t elements[] = {
+ {
+ .id = CAPWAP_ELEM_DISCOVERY_TYPE,
+ .name = "Discovery Type",
+ //.start = cw_in_generic2,
+ //.item_id = "discovery_type",
+ .min_len = 1,
+ .max_len = 1
+ },
+ {
+ .id = CAPWAP_ELEM_WTP_BOARD_DATA,
+// .start = cw_in_wtp_board_data,
+// .item_id = CW_ITEM_WTP_BOARD_DATA,
+ },
+
+ {
+ .id = CAPWAP_ELEM_WTP_DESCRIPTOR,
+ //.start = capwap_in_wtp_descriptor,
+ //.item_id = "wtp_descriptor",
+
+ }
+ ,
+ {
+ .id = CW_ELEM_WTP_FRAME_TUNNEL_MODE,
+// .start = cw_in_generic2,
+// .item_id = CW_ITEM_WTP_FRAME_TUNNEL_MODE,
+ .min_len = 1,
+ .max_len = 1
+ }
+ ,
+};
+
+static cw_message_t messages[] = {
+
+ /* Discovery Request Message*/
+ {
+ .type = CAPWAP_MSG_DISCOVERY_REQUEST,
+ .states = (int[]){CAPWAP_STATE_DISCOVERY,0},
+ .elements = (cw_messagedef_t[]){
+ {0,0,CAPWAP_ELEM_DISCOVERY_TYPE,1},
+ {0,0,CAPWAP_ELEM_WTP_BOARD_DATA,1},
+ {0,0,CAPWAP_ELEM_WTP_DESCRIPTOR,1},
+ {0,0,CW_ELEM_WTP_FRAME_TUNNEL_MODE,1},
+ }
+ }
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static cw_action_in_t actions_in[] = {
@@ -33,7 +95,7 @@ static cw_action_in_t actions_in[] = {
* Discovery Request
*/
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
.end = cw_in_check_disc_req
}
@@ -41,9 +103,9 @@ static cw_action_in_t actions_in[] = {
/* Element Discovery Type */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
- .elem_id = CW_ELEM_DISCOVERY_TYPE,
+ .elem_id = CAPWAP_ELEM_DISCOVERY_TYPE,
.start = cw_in_generic2,
.item_id = "discovery_type",
.mand = 1,
@@ -54,9 +116,9 @@ static cw_action_in_t actions_in[] = {
/* Element WTP Board Data - Discovery Request */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
- .elem_id = CW_ELEM_WTP_BOARD_DATA,
+ .elem_id = CAPWAP_ELEM_WTP_BOARD_DATA,
.start = cw_in_wtp_board_data,
.item_id = CW_ITEM_WTP_BOARD_DATA,
.mand = 1,
@@ -65,9 +127,9 @@ static cw_action_in_t actions_in[] = {
/* Element WTP Descriptor - Discovery */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
- .elem_id = CW_ELEM_WTP_DESCRIPTOR,
+ .elem_id = CAPWAP_ELEM_WTP_DESCRIPTOR,
.start = capwap_in_wtp_descriptor,
.item_id = "wtp_descriptor",
.mand = 1,
@@ -77,7 +139,7 @@ static cw_action_in_t actions_in[] = {
/* Element WTP Frame Tunnel Mode */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
.elem_id = CW_ELEM_WTP_FRAME_TUNNEL_MODE,
.start = cw_in_generic2,
@@ -90,7 +152,7 @@ static cw_action_in_t actions_in[] = {
/* Element WTP Mac Type */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
.elem_id = CW_ELEM_WTP_MAC_TYPE,
.start = cw_in_generic2,
@@ -103,7 +165,7 @@ static cw_action_in_t actions_in[] = {
/* MTU Discovery Padding */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
.elem_id = CW_ELEM_MTU_DISCOVERY_PADDING,
.start = cw_in_mtu_discovery_padding,
@@ -112,7 +174,7 @@ static cw_action_in_t actions_in[] = {
/* Vendor Specific Payload */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
.elem_id = CW_ELEM_VENDOR_SPECIFIC_PAYLOAD,
.start = cw_in_vendor_specific_payload,
@@ -148,7 +210,7 @@ static cw_action_in_t actions_in[] = {
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
- .elem_id = CW_ELEM_WTP_BOARD_DATA,
+ .elem_id = CAPWAP_ELEM_WTP_BOARD_DATA,
.start = cw_in_wtp_board_data,
.item_id = CW_ITEM_WTP_BOARD_DATA,
.mand = 1,
@@ -159,7 +221,7 @@ static cw_action_in_t actions_in[] = {
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
- .elem_id = CW_ELEM_WTP_DESCRIPTOR,
+ .elem_id = CAPWAP_ELEM_WTP_DESCRIPTOR,
.start = capwap_in_wtp_descriptor,
.item_id = CW_ITEM_WTP_DESCRIPTOR,
.mand = 1,
diff --git a/src/mod/capwap/capwap_actions_wtp.c b/src/mod/capwap/capwap_actions_wtp.c
index 4b339f3e..c017e6c6 100644
--- a/src/mod/capwap/capwap_actions_wtp.c
+++ b/src/mod/capwap/capwap_actions_wtp.c
@@ -10,7 +10,7 @@ static cw_action_in_t actions_in[] = {
/* Message Discovery Response */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.end = cw_in_check_disc_resp
}
@@ -18,7 +18,7 @@ static cw_action_in_t actions_in[] = {
/* AC Descriptor - Discovery Response */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CAPWAP_ELEM_AC_DESCRIPTOR,
.item_id = CW_ITEM_AC_DESCRIPTOR,
@@ -31,7 +31,7 @@ static cw_action_in_t actions_in[] = {
/* AC Name - Discovery Response */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_AC_NAME,
.item_id = CW_ITEM_AC_NAME,
@@ -44,7 +44,7 @@ static cw_action_in_t actions_in[] = {
/* CAPWAP Control IPv4 Address - Discovery Response*/
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_CAPWAP_CONTROL_IPV4_ADDRESS,
.item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST,
@@ -58,7 +58,7 @@ static cw_action_in_t actions_in[] = {
/* CAPWAP Control IPv6 Address - Discovery Response*/
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_CAPWAP_CONTROL_IPV6_ADDRESS,
.item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST,
@@ -71,7 +71,7 @@ static cw_action_in_t actions_in[] = {
/* Vendor Specific Payload - Discovery Response*/
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_VENDOR_SPECIFIC_PAYLOAD,
.start = cw_in_vendor_specific_payload
@@ -85,7 +85,7 @@ static cw_action_in_t actions_in[] = {
* The Result Code is not defined as part
* of Discovery Response
*/
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM_RESULT_CODE,
.item_id = CW_ITEM_RESULT_CODE,
@@ -451,7 +451,7 @@ static cw_action_out_t actions_out[] = {
/* Discovery Type - Discovery Request */
{
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
- .elem_id = CW_ELEM_DISCOVERY_TYPE,
+ .elem_id = CAPWAP_ELEM_DISCOVERY_TYPE,
.item_id = CW_ITEM_DISCOVERY_TYPE,
.out = cw_out_generic,
.get = cw_out_get_outgoing,
@@ -462,7 +462,7 @@ static cw_action_out_t actions_out[] = {
/* WTP Board Data - Discovery Request */
{
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
- .elem_id = CW_ELEM_WTP_BOARD_DATA,
+ .elem_id = CAPWAP_ELEM_WTP_BOARD_DATA,
.item_id = CW_ITEM_WTP_BOARD_DATA,
.out = cw_out_wtp_board_data,
.get = cw_out_get_config,
@@ -473,7 +473,7 @@ static cw_action_out_t actions_out[] = {
/* WTP Descriptor - Discover Request */
{
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
- .elem_id = CW_ELEM_WTP_DESCRIPTOR,
+ .elem_id = CAPWAP_ELEM_WTP_DESCRIPTOR,
.item_id = CW_ITEM_WTP_DESCRIPTOR,
.out = capwap_out_wtp_descriptor,
//.get = cw_out_get_config,
@@ -523,7 +523,7 @@ static cw_action_out_t actions_out[] = {
/* WTP Board Data - Join Request */
{
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
- .elem_id = CW_ELEM_WTP_BOARD_DATA,
+ .elem_id = CAPWAP_ELEM_WTP_BOARD_DATA,
.item_id = CW_ITEM_WTP_BOARD_DATA,
.out = cw_out_wtp_board_data,
.get = cw_out_get_config,
@@ -534,7 +534,7 @@ static cw_action_out_t actions_out[] = {
/* WTP Descriptor - Join Request */
{
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
- .elem_id = CW_ELEM_WTP_DESCRIPTOR,
+ .elem_id = CAPWAP_ELEM_WTP_DESCRIPTOR,
.item_id = CW_ITEM_WTP_DESCRIPTOR,
.out = cw_out_wtp_descriptor,
.mand = 1
diff --git a/src/mod/capwap80211/capwap80211_actions_ac.c b/src/mod/capwap80211/capwap80211_actions_ac.c
index 8ac3ff0b..f208ec12 100644
--- a/src/mod/capwap80211/capwap80211_actions_ac.c
+++ b/src/mod/capwap80211/capwap80211_actions_ac.c
@@ -27,7 +27,7 @@ static cw_action_in_t actions_ac_in[] = {
/* 802.11 Radio Information - Discovery Request */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
.elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION,
.item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION,
diff --git a/src/mod/capwap80211/capwap80211_actions_wtp.c b/src/mod/capwap80211/capwap80211_actions_wtp.c
index 83fb534c..67730cd4 100644
--- a/src/mod/capwap80211/capwap80211_actions_wtp.c
+++ b/src/mod/capwap80211/capwap80211_actions_wtp.c
@@ -19,7 +19,7 @@ static cw_action_in_t actions_wtp_in[] = {
/* 802.11 Radio Inmformation - Discovery Response */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION,
.item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION,
diff --git a/src/mod/cisco/cisco_actions_ac.c b/src/mod/cisco/cisco_actions_ac.c
index 0a1a2def..72125bbc 100644
--- a/src/mod/cisco/cisco_actions_ac.c
+++ b/src/mod/cisco/cisco_actions_ac.c
@@ -50,7 +50,7 @@ static cw_action_in_t actions_in[] = {
/* Message Discovery Request */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
.end = cw_in_check_disc_req
}
@@ -58,9 +58,9 @@ static cw_action_in_t actions_in[] = {
/* Element WTP Descriptor */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
- .elem_id = CW_ELEM_WTP_DESCRIPTOR,
+ .elem_id = CAPWAP_ELEM_WTP_DESCRIPTOR,
.start = cisco_in_wtp_descriptor,
.item_id = "wtp_descriptor",
.mand = 1,
@@ -69,7 +69,7 @@ static cw_action_in_t actions_in[] = {
/* Element Cisco RAD Name */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_RAD_NAME,
@@ -86,9 +86,9 @@ static cw_action_in_t actions_in[] = {
* firmware does not send this message element.
*/
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
- .elem_id = CW_ELEM_WTP_BOARD_DATA,
+ .elem_id = CAPWAP_ELEM_WTP_BOARD_DATA,
.start = cw_in_wtp_board_data,
.item_id = CW_ITEM_WTP_BOARD_DATA,
.mand = 0,
@@ -106,7 +106,7 @@ static cw_action_in_t actions_in[] = {
{
.capwap_state = CW_STATE_JOIN,
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
- .elem_id = CW_ELEM_WTP_DESCRIPTOR,
+ .elem_id = CAPWAP_ELEM_WTP_DESCRIPTOR,
.start = cisco_in_wtp_descriptor,
.item_id = "wtp_descriptor",
.mand = 1,
@@ -503,7 +503,7 @@ static cw_action_in_t actions80211_in[] = {
/* Cisco doe't sned this message element in discovery request,
so make it non-mandatory */
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
.elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION,
.item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION,
diff --git a/src/mod/cisco/cisco_actions_wtp.c b/src/mod/cisco/cisco_actions_wtp.c
index 5c98b767..c5b63414 100644
--- a/src/mod/cisco/cisco_actions_wtp.c
+++ b/src/mod/cisco/cisco_actions_wtp.c
@@ -46,7 +46,7 @@ static cw_action_in_t actions_in[] = {
/* AC Descriptor - Discovery Response */
{
- .capwap_state = CW_STATE_DISCOVERY,
+ .capwap_state = CAPWAP_STATE_DISCOVERY,
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
.elem_id = CAPWAP_ELEM_AC_DESCRIPTOR,
.item_id = CW_ITEM_AC_DESCRIPTOR,
@@ -269,7 +269,7 @@ static cw_action_out_t actions_out[]={
/* WTP Descriptor - Discovery */
{
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
- .elem_id = CW_ELEM_WTP_DESCRIPTOR,
+ .elem_id = CAPWAP_ELEM_WTP_DESCRIPTOR,
.item_id = CW_ITEM_WTP_DESCRIPTOR,
.out = cisco_out_wtp_descriptor,
.mand = 1
@@ -307,7 +307,7 @@ static cw_action_out_t actions_out[]={
/* WTP Descriptor - Join Request */
{
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
- .elem_id = CW_ELEM_WTP_DESCRIPTOR,
+ .elem_id = CAPWAP_ELEM_WTP_DESCRIPTOR,
.item_id = CW_ITEM_WTP_DESCRIPTOR,
.out = cisco_out_wtp_descriptor,
.mand = 1
diff --git a/src/wtp/discovery.c b/src/wtp/discovery.c
index 01ea45e7..7113415c 100644
--- a/src/wtp/discovery.c
+++ b/src/wtp/discovery.c
@@ -122,7 +122,7 @@ static int run_discovery(struct conn *conn)
// conn->incomming = mbag_create();
- conn->capwap_state = CW_STATE_DISCOVERY;
+ conn->capwap_state = CAPWAP_STATE_DISCOVERY;
mbag_set_byte(conn->outgoing, CW_ITEM_DISCOVERY_TYPE,
CAPWAP_DISCOVERY_TYPE_UNKNOWN);
@@ -136,7 +136,7 @@ static int run_discovery(struct conn *conn)
while (!cw_timer_timeout(timer)
- && conn->capwap_state == CW_STATE_DISCOVERY) {
+ && conn->capwap_state == CAPWAP_STATE_DISCOVERY) {
mavl_del_all(conn->incomming);
int rc = cw_read_from(conn);