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

@ -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));
}
*/
}
*/