Work on State machine

FossilOrigin-Name: 87d98b73010c7316cb9b53b5ba8c3dfdddca06042630cf8437ea506e1c424c70
This commit is contained in:
7u83@mail.ru
2018-05-04 22:36:19 +00:00
parent 7d1ef1ff01
commit 9d3e24df52
25 changed files with 317 additions and 227 deletions

View File

@ -27,6 +27,10 @@
#include "mod_capwap.h"
static int postprocess_join_request(struct conn *conn);
static cw_KTVStruct_t wtp_reboot_statistics[] = {
{CW_TYPE_WORD, "reboot-count", 2,-1},
{CW_TYPE_WORD, "ac-initiated-count", 2,-1},
@ -397,7 +401,7 @@ static struct cw_ElemHandler handlers[] = {
};
static int discovery_request_states[] = {CAPWAP_STATE_DISCOVERY,0};
static uint16_t discovery_request_states[] = {CAPWAP_STATE_DISCOVERY,0};
static struct cw_ElemDef discovery_request_elements[] ={
{0,0,CAPWAP_ELEM_DISCOVERY_TYPE, 1, 0},
{0,0,CAPWAP_ELEM_WTP_BOARD_DATA, 1, 0},
@ -410,7 +414,7 @@ static struct cw_ElemDef discovery_request_elements[] ={
};
static int discovery_response_states[] = {CAPWAP_STATE_DISCOVERY,0};
static uint16_t discovery_response_states[] = {CAPWAP_STATE_DISCOVERY,0};
static struct cw_ElemDef discovery_response_elements[] ={
{0,0,CAPWAP_ELEM_AC_DESCRIPTOR, 1, 0},
{0,0,CAPWAP_ELEM_AC_NAME, 1, 0},
@ -421,7 +425,9 @@ static struct cw_ElemDef discovery_response_elements[] ={
};
static int join_request_states[] = {CAPWAP_STATE_JOIN,0};
static uint16_t join_request_states[] = {
CW_TRANSITION(CAPWAP_STATE_DTLS_SETUP,CAPWAP_STATE_JOIN),
0};
static struct cw_ElemDef join_request_elements[] ={
{0,0,CAPWAP_ELEM_LOCATION_DATA, 1, 0},
{0,0,CAPWAP_ELEM_WTP_BOARD_DATA, 1, 0},
@ -440,7 +446,7 @@ static struct cw_ElemDef join_request_elements[] ={
{0,0,0,0,0}
};
static int join_response_states[] = {CAPWAP_STATE_JOIN,0};
static uint16_t join_response_states[] = {CAPWAP_STATE_JOIN,0};
static struct cw_ElemDef join_response_elements[] ={
{0,0,CAPWAP_ELEM_RESULT_CODE, 1, 0},
{0,0,CAPWAP_ELEM_AC_DESCRIPTOR, 1, 0},
@ -459,7 +465,9 @@ static struct cw_ElemDef join_response_elements[] ={
};
static int configuration_status_request_states[] = {CAPWAP_STATE_JOIN,0};
static uint16_t configuration_status_request_states[] = {
CW_TRANSITION(CAPWAP_STATE_JOIN, CAPWAP_STATE_JOIN),
0};
static struct cw_ElemDef configuration_status_request_elements[] ={
{0,0,CAPWAP_ELEM_AC_NAME, 1, 0},
{0,0,CAPWAP_ELEM_RADIO_ADMINISTRATIVE_STATE, 1, 0},
@ -471,7 +479,7 @@ static struct cw_ElemDef configuration_status_request_elements[] ={
{0,0,0,0,0}
};
static int configuration_status_response_states[] = {CAPWAP_STATE_JOIN,0};
static uint16_t configuration_status_response_states[] = {CAPWAP_STATE_JOIN,0};
static struct cw_ElemDef configuration_status_response_elements[] ={
{0,0,CAPWAP_ELEM_CAPWAP_TIMERS, 1, 0},
{0,0,CAPWAP_ELEM_DECRYPTION_ERROR_REPORT_PERIOD, 1, 0},
@ -483,7 +491,7 @@ static struct cw_ElemDef configuration_status_response_elements[] ={
};
static int configuration_update_request_states[] = {CAPWAP_STATE_RUN,0};
static uint16_t configuration_update_request_states[] = {CAPWAP_STATE_RUN,0};
static struct cw_ElemDef configuration_update_request_elements[] ={
{0,0,CAPWAP_ELEM_RADIO_ADMINISTRATIVE_STATE, 0, 0},
@ -497,14 +505,16 @@ static struct cw_ElemDef configuration_update_request_elements[] ={
static int configuration_update_response_states[] = {CAPWAP_STATE_RUN,0};
static uint16_t configuration_update_response_states[] = {CAPWAP_STATE_RUN,0};
static struct cw_ElemDef configuration_update_response_elements[] ={
{0,0,CAPWAP_ELEM_RESULT_CODE, 1, 0},
{0,0,0,0,0}
};
static int change_state_event_request_states[] = {CAPWAP_STATE_JOIN,0};
static uint16_t change_state_event_request_states[] = {
CW_TRANSITION(CAPWAP_STATE_JOIN, CAPWAP_STATE_CONFIGURE),
0};
static struct cw_ElemDef change_state_event_request_elements[] ={
{0,0,CAPWAP_ELEM_RADIO_OPERATIONAL_STATE, 1,0},
@ -514,7 +524,7 @@ static struct cw_ElemDef change_state_event_request_elements[] ={
{0,0,0,0,0}
};
static int change_state_event_response_states[] = {CAPWAP_STATE_JOIN,0};
static uint16_t change_state_event_response_states[] = {CAPWAP_STATE_JOIN,0};
static struct cw_ElemDef change_state_event_response_elements[] ={
{0,0,CAPWAP_ELEM_RESULT_CODE, 1, 0},
@ -522,14 +532,14 @@ static struct cw_ElemDef change_state_event_response_elements[] ={
};
static int wtp_event_request_states[] = {CAPWAP_STATE_JOIN,0};
static uint16_t wtp_event_request_states[] = {CAPWAP_STATE_JOIN,0};
static struct cw_ElemDef wtp_event_request_elements[] ={
{0,0,CAPWAP_ELEM_VENDOR_SPECIFIC_PAYLOAD, 0, CW_IGNORE},
{0,0,0,0,0}
};
static int wtp_event_response_states[] = {CAPWAP_STATE_JOIN,0};
static uint16_t wtp_event_response_states[] = {CAPWAP_STATE_JOIN,0};
static struct cw_ElemDef wtp_event_response_elements[] ={
{0,0,CAPWAP_ELEM_RESULT_CODE, 1, 0},
@ -537,13 +547,13 @@ static struct cw_ElemDef wtp_event_response_elements[] ={
};
static int echo_request_states[] = {CAPWAP_STATE_RUN,0};
static uint16_t echo_request_states[] = {CAPWAP_STATE_RUN,0};
static struct cw_ElemDef echo_request_elements[] ={
{0,0,CAPWAP_ELEM_VENDOR_SPECIFIC_PAYLOAD, 0, CW_IGNORE},
{0,0,0,0,0}
};
static int echo_response_states[] = {CAPWAP_STATE_RUN,0};
static uint16_t echo_response_states[] = {CAPWAP_STATE_RUN,0};
static struct cw_ElemDef echo_response_elements[] ={
{0,0,CAPWAP_ELEM_VENDOR_SPECIFIC_PAYLOAD, 0, CW_IGNORE},
{0,0,0,0,0}
@ -574,7 +584,11 @@ static struct cw_MsgDef messages[] = {
CAPWAP_MSG_JOIN_REQUEST,
CW_ROLE_AC,
join_request_states,
join_request_elements
join_request_elements,
NULL,
postprocess_join_request,
CAPWAP_STATE_JOIN,
},
{
@ -590,7 +604,10 @@ static struct cw_MsgDef messages[] = {
CAPWAP_MSG_CONFIGURATION_STATUS_REQUEST, /* msg type */
CW_ROLE_AC, /* role */
configuration_status_request_states, /* allowed states */
configuration_status_request_elements /* msg elements */
configuration_status_request_elements, /* msg elements */
NULL,
NULL,
CAPWAP_STATE_CONFIGURE
},
{
@ -623,6 +640,9 @@ static struct cw_MsgDef messages[] = {
CW_ROLE_AC, /* role */
change_state_event_request_states, /* allowed states */
change_state_event_request_elements /* msg elements */
NULL,
NULL,
CAPWAP_STATE_DATA_CHECK
},
{
@ -667,54 +687,19 @@ static struct cw_MsgDef messages[] = {
},
{0,0,0,0}
/* {
"Discovery Request",
CAPWAP_MSG_DISCOVERY_REQUEST,
CW_RECEIVER_AC,
(int[]){CAPWAP_STATE_DISCOVERY,0}
},
*/
/* Discovery Request Message*/
/* {
.name = "Discovery Request",
.type = CAPWAP_MSG_DISCOVERY_REQUEST,
.receiver = CW_RECEIVER_AC,
.states = (int[]){CAPWAP_STATE_DISCOVERY,0},
.elements = (cw_ElemDef_t []){
{&_DISCOVERY_TYPE,1},
{&_WTP_BOARD_DATA,1},
{&_WTP_DESCRIPTOR,1},
{&_WTP_FRAME_TUNNEL_MODE,1},
{&_WTP_MAC_TYPE,1},
{&_MTU_DISCOVERY_PADDING,0},
{&_VENDOR_SPECIFIC_PAYLOAD,0},
{0,0},
}
},
*/
/* Discovery Request Response */
/* {
.name = "Discovery Response",
.type = CAPWAP_MSG_DISCOVERY_RESPONSE,
.receiver = CW_RECEIVER_WTP,
.states = (int[]){CAPWAP_STATE_DISCOVERY,0},
.elements = (cw_ElemDef_t[]){
{&_AC_DESCRIPTOR,1},
{0,0},
}
},
*/ {0,0,0,0}
};
static int postprocess_join_request(struct conn *conn)
{
return 1;
}
struct cw_MsgSet * capwap_register_msg_set(struct cw_MsgSet * set, int mode){
if (mode != CW_MOD_MODE_CAPWAP)
return NULL;

View File

@ -203,7 +203,7 @@ static cw_action_in_t actions_in[] = {
* Message Configuration Status Response - IN
*/
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.end = cw_in_check_generic_resp
}
@ -212,7 +212,7 @@ static cw_action_in_t actions_in[] = {
/* Capwap Timers - Config Status Resp */
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.elem_id = CAPWAP_ELEM_CAPWAP_TIMERS,
.item_id = CW_ITEM_CAPWAP_TIMERS,
@ -225,7 +225,7 @@ static cw_action_in_t actions_in[] = {
/* Decryption Error Report - Config Status Resp */
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.elem_id = CAPWAP_ELEM_DECRYPTION_ERROR_REPORT_PERIOD,
.item_id = CW_RADIOITEM_DECRYPTION_ERROR_REPORT_PERIOD,
@ -239,7 +239,7 @@ static cw_action_in_t actions_in[] = {
/* Idle Timeout - Config Status Resp */
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.elem_id = CAPWAP_ELEM_IDLE_TIMEOUT,
.item_id = CW_ITEM_IDLE_TIMEOUT,
@ -253,7 +253,7 @@ static cw_action_in_t actions_in[] = {
/* WTP Fallback - Config Status Resp */
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.elem_id = CAPWAP_ELEM_WTP_FALLBACK,
.item_id = CW_ITEM_WTP_FALLBACK,
@ -269,7 +269,7 @@ static cw_action_in_t actions_in[] = {
/* Result Code - Config Status Resp */
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.elem_id = CAPWAP_ELEM_RESULT_CODE,
.item_id = CW_ITEM_RESULT_CODE,
@ -283,7 +283,7 @@ static cw_action_in_t actions_in[] = {
/* AC IPv4 List - Config Status Resp */
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.elem_id = CAPWAP_ELEM_AC_IPV4_LIST,
.item_id = CW_ITEM_AC_IP_LIST,
@ -297,7 +297,7 @@ static cw_action_in_t actions_in[] = {
/* Vendor Specific Payload - Cponfig Status Resp */
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.elem_id = CAPWAP_ELEM_VENDOR_SPECIFIC_PAYLOAD,
.start = cw_in_vendor_specific_payload
@ -312,14 +312,14 @@ static cw_action_in_t actions_in[] = {
*/
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_RESPONSE,
.end = cw_in_check_cfg_update_req
}
,
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CHANGE_STATE_EVENT_RESPONSE,
.elem_id = CAPWAP_ELEM_RESULT_CODE,
.item_id = CW_ITEM_RESULT_CODE,

View File

@ -29,7 +29,7 @@ int capwap_in_vendor_specific_payload(struct cw_ElemHandler *handler,
cw_dbg(DBG_WARN,
"Can't handle Vendor Specific Payload %s/%d, in msg %d (%s) in %s state.",
cw_strvendor(vendor_id), elem_id, params->msgdata->type,
params->msgdata->name, cw_strstate(params->conn->capwap_state));
params->msgdata->name, cw_strstate(params->conn->capwap_transition));
return 0;
}

View File

@ -10,9 +10,10 @@
#include "mod_capwap80211.h"
static int capwap80211_in_crate_set(struct cw_ElemHandler *eh,
/*static int capwap80211_in_crate_set(struct cw_ElemHandler *eh,
struct cw_ElemHandlerParams *params,
uint8_t * data, int len);
*/
static struct cw_ElemHandler handlers[] = {
{
@ -33,8 +34,8 @@ static struct cw_ElemHandler handlers[] = {
3, 0, /* min/max length */
CW_TYPE_BSTR16, /* type */
"rate_set", /* Key */
cw_in_radio_generic, /* get */
cw_out_radio_generic /* put */
cw_in_radio_generic, /* get */
cw_out_radio_generic /* put */
}
,
{NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL}
@ -42,7 +43,7 @@ static struct cw_ElemHandler handlers[] = {
};
static int discovery_request_states[] = { CAPWAP_STATE_DISCOVERY, 0 };
/*static int discovery_request_states[] = { CAPWAP_STATE_DISCOVERY, 0 };*/
static struct cw_ElemDef discovery_request_elements[] = {
{0, 0, CAPWAP80211_ELEM_WTP_RADIO_INFORMATION, 1, 0},
{0, 0, 0, 0, 0}
@ -50,21 +51,21 @@ static struct cw_ElemDef discovery_request_elements[] = {
};
static int join_request_states[] = { CAPWAP_STATE_JOIN, 0 };
/*static int join_request_states[] = { CAPWAP_STATE_JOIN, 0 };*/
static struct cw_ElemDef join_request_elements[] = {
{0, 0, CAPWAP80211_ELEM_WTP_RADIO_INFORMATION, 1, 0},
{0, 0, 0, 0, 0}
};
static int join_response_states[] = { CAPWAP_STATE_JOIN, 0 };
/*static int join_response_states[] = { CAPWAP_STATE_JOIN, 0 };*/
static struct cw_ElemDef join_response_elements[] = {
{0, 0, CAPWAP80211_ELEM_WTP_RADIO_INFORMATION, 1, 0},
{0, 0, 0, 0, 0}
};
static int configuration_status_response_states[] = { CAPWAP_STATE_JOIN, 0 };
/*static int configuration_status_response_states[] = { CAPWAP_STATE_JOIN, 0 };*/
static struct cw_ElemDef configuration_status_response_elements[] = {
{0, 0, CAPWAP80211_ELEM_RATE_SET , 1, 0},
{0, 0, 0, 0, 0}
@ -75,23 +76,23 @@ static struct cw_MsgDef messages[] = {
NULL,
CAPWAP_MSG_DISCOVERY_REQUEST,
CW_ROLE_AC,
discovery_request_states,
NULL, /* states */
discovery_request_elements
}
,
{
NULL,
CAPWAP_MSG_JOIN_REQUEST,
CW_ROLE_AC,
join_request_states,
join_request_elements
NULL, /* name */
CAPWAP_MSG_JOIN_REQUEST, /* type */
CW_ROLE_AC, /* role */
NULL, /* states */
join_request_elements /* elements */
}
,
{
NULL,
CAPWAP_MSG_JOIN_RESPONSE,
CW_ROLE_AC,
join_response_states,
NULL,
join_response_elements
}
,
@ -99,7 +100,7 @@ static struct cw_MsgDef messages[] = {
NULL,
CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
CW_ROLE_WTP,
configuration_status_response_states,
NULL,
configuration_status_response_elements
}
,
@ -121,19 +122,19 @@ int mode;
}
/*
static int capwap80211_in_crate_set(struct cw_ElemHandler *eh,
struct cw_ElemHandlerParams *params,
uint8_t * data, int len)
{
/* int radio;
int radio;
int i;
radio = cw_get_byte(data);
for (i=0; i<len-1; i++){
int rate = (data+1)[i];
sprintf(d,"%0.1f",dot11_rate2float(val & 0x7f));
}
*/
}
*/

View File

@ -32,7 +32,7 @@
static int postprocess_discovery();
static int preprocess_join_request();
static int postprocess_join_request();
static cw_KTVStruct_t ap_time_sync[] = {
@ -1338,7 +1338,7 @@ static struct cw_ElemHandler handlers73[] = {
};
static int discovery_request_states[] = {CAPWAP_STATE_DISCOVERY,0};
static uint16_t discovery_request_states[] = {CAPWAP_STATE_DISCOVERY,0};
static struct cw_ElemDef discovery_request_elements[] ={
/* {0,0, CAPWAP_ELEM_WTP_DESCRIPTOR, 1, 0},*/
{0,0, CAPWAP_ELEM_WTP_BOARD_DATA, 0, 0},
@ -1348,7 +1348,7 @@ static struct cw_ElemDef discovery_request_elements[] ={
};
static int discovery_response_states[] = {CAPWAP_STATE_DISCOVERY,0};
static uint16_t discovery_response_states[] = {CAPWAP_STATE_DISCOVERY,0};
static struct cw_ElemDef discovery_response_elements[] ={
{0,CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_TIMESYNC, 1, 0},
{0,CW_VENDOR_ID_CISCO, CISCO_ELEM_MWAR_TYPE, 0, 0},
@ -1357,7 +1357,7 @@ static struct cw_ElemDef discovery_response_elements[] ={
};
static int join_request_states[] = {CAPWAP_STATE_JOIN,0};
/*static uint16_t join_request_states[] = {CAPWAP_STATE_JOIN,0};*/
static struct cw_ElemDef join_request_elements[] ={
{0,CW_VENDOR_ID_CISCO, CW_CISCO_BOARD_DATA_OPTIONS, 1, 0},
{0,CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_GROUP_NAME, 1, 0},
@ -1378,7 +1378,7 @@ static struct cw_ElemDef join_request_elements[] ={
};
static int join_response_states[] = {CAPWAP_STATE_JOIN,0};
static uint16_t join_response_states[] = {CAPWAP_STATE_JOIN,0};
static struct cw_ElemDef join_response_elements[] ={
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,0, CW_IGNORE},
@ -1391,7 +1391,7 @@ static struct cw_ElemDef join_response_elements[] ={
};
static int configuration_status_request_states[] = {CAPWAP_STATE_JOIN,0};
/*static uint16_t configuration_status_request_states[] = {CAPWAP_STATE_JOIN,0};*/
static struct cw_ElemDef configuration_status_request_elements[] ={
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,0, CW_IGNORE},
@ -1433,7 +1433,7 @@ static struct cw_ElemDef configuration_status_request_elements[] ={
};
static int configuration_status_response_states[] = {CAPWAP_STATE_JOIN,0};
static uint16_t configuration_status_response_states[] = {CAPWAP_STATE_JOIN,0};
static struct cw_ElemDef configuration_status_response_elements[] ={
{0,0, CAPWAP_ELEM_RADIO_ADMINISTRATIVE_STATE, 1,0},
{0,0, CAPWAP_ELEM_RADIO_OPERATIONAL_STATE, 1,0},
@ -1455,7 +1455,7 @@ static struct cw_ElemDef configuration_status_response_elements[] ={
};
static int configuration_update_request_states[] = {CAPWAP_STATE_RUN,0};
static uint16_t configuration_update_request_states[] = {CAPWAP_STATE_RUN,0};
static struct cw_ElemDef configuration_update_request_elements[] ={
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,0, CW_IGNORE},
@ -1513,21 +1513,21 @@ static struct cw_ElemDef configuration_update_request_elements[] ={
};
static int wtp_event_request_states[] = {CAPWAP_STATE_JOIN,0};
static uint16_t wtp_event_request_states[] = {CAPWAP_STATE_JOIN,0};
static struct cw_ElemDef wtp_event_request_elements[] ={
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,0, CW_IGNORE},
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_HARDWARE_INFO, 0, 0},
{0,0,0,0,0}
};
static int wtp_event_response_states[] = {CAPWAP_STATE_JOIN,0};
static uint16_t wtp_event_response_states[] = {CAPWAP_STATE_JOIN,0};
static struct cw_ElemDef wtp_event_response_elements[] ={
/* {0,0,CAPWAP_ELEM_RESULT_CODE, 1, 0},*/
{0,0,0,0,0}
};
static int wtp_echo_response_states[] = {CAPWAP_STATE_RUN,0};
static uint16_t wtp_echo_response_states[] = {CAPWAP_STATE_RUN,0};
static struct cw_ElemDef wtp_echo_response_elements[] ={
{0,CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_TIMESYNC, 1, 0},
{0,0,0,0,0}
@ -1555,11 +1555,11 @@ static struct cw_MsgDef messages[] = {
{
NULL, /* name */
CAPWAP_MSG_JOIN_REQUEST, /* type */
CW_ROLE_AC,
join_request_states,
CW_ROLE_AC, /* role to receive */
NULL, /* states, taken from mod_capwap*/
join_request_elements,
preprocess_join_request, /* preprocess fun */
postprocess_discovery /* postprocess */
postprocess_join_request /* postprocess */
},
{
NULL, /* name */
@ -1574,7 +1574,7 @@ static struct cw_MsgDef messages[] = {
NULL, /* name */
CAPWAP_MSG_CONFIGURATION_STATUS_REQUEST, /* type */
CW_ROLE_AC,
configuration_status_request_states,
NULL, /* states */
configuration_status_request_elements,
NULL /* postprocess */
},
@ -1701,6 +1701,12 @@ static int postprocess_discovery(struct conn *conn)
return 1;
}
static int postprocess_join_request(struct conn *conn)
{
postprocess_discovery(conn);
return 1;
}
static int preprocess_join_request(struct conn *conn)
{
cw_KTV_t * ver;

View File

@ -190,7 +190,7 @@ static cw_action_in_t actions_in[] = {
/* Element Cisco 802.11 Radio Conffig - Config Status Resp */
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CW_CISCO_WTP_RADIO_CFG,
@ -202,7 +202,7 @@ static cw_action_in_t actions_in[] = {
/* Radio Admin State - Config Status Response */
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.elem_id = CAPWAP_ELEM_RADIO_ADMINISTRATIVE_STATE,
.item_id = CW_RADIOITEM_ADMIN_STATE,
@ -219,7 +219,7 @@ static cw_action_in_t actions_in[] = {
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.vendor_id = CW_VENDOR_ID_CISCO,
.elem_id = CISCO_ELEM_SPAM_VENDOR_SPECIFIC,
@ -244,7 +244,7 @@ static cw_action_in_t actions_in[] = {
{
.proto = CW_ACTION_PROTO_LWAPP,
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.vendor_id = LW_VENDOR_ID_CISCO,
.elem_id = CISCO_LWELEM_MWAR_HASH_VALUE,
@ -424,7 +424,7 @@ static cw_action_in_t actions80211_in[] = {
/* Radio Operational State - Status Resp */
{
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id= CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
.elem_id = CAPWAP_ELEM_RADIO_OPERATIONAL_STATE,
.item_id = CW_RADIOITEM_OPER_STATE,

View File

@ -20,7 +20,7 @@ int cisco_in_spam_vendor_specific(struct cw_ElemHandler *eh,
cw_dbg(DBG_WARN,
"Can't handle Vendor Specific LWAPP Payload %s/%d, in msg %d (%s) in %s state.",
cw_strvendor(vendor_id), elem_id, params->msgdata->type,
params->msgdata->name, cw_strstate(params->conn->capwap_state));
params->msgdata->name, cw_strstate(params->conn->capwap_transition));
return 0;
}

View File

@ -152,7 +152,7 @@ static cw_action_in_t actions_in[] = {
/* AC Name - Config Status Request */
{
/* We have to deal with zero-length strings */
.capwap_state = CW_STATE_CONFIGURE,
.capwap_state = CAPWAP_STATE_CONFIGURE,
.msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST,
.elem_id = CAPWAP_ELEM_AC_NAME,
.item_id = CW_ITEM_AC_NAME,