2016-03-08 19:57:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
#include "cw/action.h"
|
|
|
|
#include "cw/cw.h"
|
2016-04-02 12:31:33 +02:00
|
|
|
#include "cw/cw_80211.h"
|
2016-03-08 19:57:19 +01:00
|
|
|
#include "cw/capwap.h"
|
2016-03-14 08:38:29 +01:00
|
|
|
#include "cw/capwap_items.h"
|
2016-03-08 19:57:19 +01:00
|
|
|
|
2016-03-28 16:48:32 +02:00
|
|
|
#include "cw/capwap80211.h"
|
|
|
|
#include "cw/capwap80211_items.h"
|
|
|
|
|
|
|
|
|
2016-03-08 19:57:19 +01:00
|
|
|
//#include "capwap_80211_actions.h"
|
|
|
|
//#include "capwap_80211.h"
|
|
|
|
//#include "capwap.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static cw_action_in_t actions_ac_in[] = {
|
|
|
|
|
|
|
|
/* --------------------------------------------------------
|
|
|
|
* Discovery Resquest
|
|
|
|
*/
|
|
|
|
|
2016-03-28 10:49:19 +02:00
|
|
|
/* 802.11 Radio Information - Discovery Request */
|
2016-03-08 19:57:19 +01:00
|
|
|
{
|
|
|
|
.capwap_state = CW_STATE_DISCOVERY,
|
|
|
|
.msg_id = CW_MSG_DISCOVERY_REQUEST,
|
|
|
|
.elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION,
|
2016-04-02 09:05:07 +02:00
|
|
|
.item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION,
|
2016-03-08 19:57:19 +01:00
|
|
|
.start = cw_in_radio_generic,
|
|
|
|
.mand = 1,
|
|
|
|
.min_len = 5,
|
|
|
|
.max_len = 5
|
|
|
|
}
|
|
|
|
,
|
|
|
|
|
|
|
|
|
2016-03-09 09:09:28 +01:00
|
|
|
/* --------------------------------------------------------
|
|
|
|
* Join Resquest
|
|
|
|
*/
|
|
|
|
|
2016-03-28 10:49:19 +02:00
|
|
|
/* 802.11 Radio Information - Join Request */
|
2016-03-09 09:09:28 +01:00
|
|
|
{
|
|
|
|
.capwap_state = CW_STATE_JOIN,
|
|
|
|
.msg_id = CW_MSG_JOIN_REQUEST,
|
|
|
|
.elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION,
|
2016-04-02 09:05:07 +02:00
|
|
|
.item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION,
|
2016-03-09 09:09:28 +01:00
|
|
|
.start = cw_in_radio_generic,
|
|
|
|
.mand = 1,
|
|
|
|
.min_len = 5,
|
|
|
|
.max_len = 5
|
|
|
|
}
|
|
|
|
,
|
|
|
|
|
2016-03-08 19:57:19 +01:00
|
|
|
/* --------------------------------------------------------
|
2016-03-28 10:49:19 +02:00
|
|
|
* Configuration Satus Request
|
2016-03-08 19:57:19 +01:00
|
|
|
*/
|
|
|
|
|
2016-03-28 10:49:19 +02:00
|
|
|
/* 802.11 Supported Rates - Config Status Request */
|
|
|
|
{
|
|
|
|
.capwap_state = CW_STATE_CONFIGURE,
|
|
|
|
.msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST,
|
|
|
|
.elem_id = CW_ELEM80211_SUPPORTED_RATES,
|
2016-04-02 09:05:07 +02:00
|
|
|
.item_id = CW_RADIOITEM80211_SUPPORTED_RATES,
|
2016-03-28 10:49:19 +02:00
|
|
|
.start = cw_in_radio_generic,
|
2016-03-31 19:25:53 +02:00
|
|
|
.mand = 0,
|
2016-03-28 10:49:19 +02:00
|
|
|
.min_len = 3,
|
|
|
|
.max_len = 9
|
|
|
|
}
|
|
|
|
,
|
|
|
|
|
2016-04-02 12:31:33 +02:00
|
|
|
/* 802.11 MAC Operation - Config Status Request */
|
|
|
|
{
|
|
|
|
.capwap_state = CW_STATE_CONFIGURE,
|
|
|
|
.msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST,
|
|
|
|
.elem_id = CW_ELEM80211_MAC_OPERATION,
|
|
|
|
.item_id = "80111_mac_operation", //CW_iTEM80211_MAC_SUPPORTED_RATES,
|
|
|
|
.start = cw_in_80211_mac_operation,
|
|
|
|
.mand = 0,
|
|
|
|
.min_len = 16,
|
|
|
|
.max_len = 16
|
|
|
|
}
|
|
|
|
,
|
|
|
|
|
2016-03-28 10:49:19 +02:00
|
|
|
|
2016-03-08 19:57:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{0, 0, 0}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2016-03-14 08:38:29 +01:00
|
|
|
cw_action_out_t actions_ac_out[]={
|
|
|
|
|
|
|
|
/* --------------------------------------------------------
|
|
|
|
* Discovery Response
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/* 802.11 Radio Information - Discovery Response */
|
|
|
|
{
|
|
|
|
.msg_id = CW_MSG_DISCOVERY_RESPONSE,
|
|
|
|
.elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION,
|
2016-04-02 09:05:07 +02:00
|
|
|
.item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION ,
|
2016-03-14 08:38:29 +01:00
|
|
|
.out = cw_out_radio_infos,
|
|
|
|
.mand = 1
|
|
|
|
}
|
|
|
|
,
|
|
|
|
|
|
|
|
/* --------------------------------------------------------
|
|
|
|
* Join Response
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/* 802.11 Radio Information - Discovery Response */
|
|
|
|
{
|
|
|
|
.msg_id = CW_MSG_JOIN_RESPONSE,
|
|
|
|
.elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION,
|
2016-04-02 09:05:07 +02:00
|
|
|
.item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION,
|
2016-03-14 08:38:29 +01:00
|
|
|
.out = cw_out_radio_infos,
|
|
|
|
.mand = 1
|
|
|
|
}
|
|
|
|
,
|
|
|
|
|
|
|
|
|
2016-03-08 19:57:19 +01:00
|
|
|
/* Radio Infos */
|
|
|
|
// {CW_MSG_DISCOVERY_RESPONSE, NULL /*CW_ELEM80211_WTP_RADIO_INFORMATION*/, 0,
|
|
|
|
// CW_ELEM80211_WTP_RADIO_INFORMATION, NULL,cw_out_radio_infos, NULL,1}
|
|
|
|
|
|
|
|
/* Radio Infos */
|
|
|
|
// {CW_MSG_JOIN_RESPONSE, NULL /*CW_ELEM80211_WTP_RADIO_INFORMATION*/, 0,
|
|
|
|
// CW_ELEM80211_WTP_RADIO_INFORMATION, NULL,cw_out_radio_infos, NULL,1}
|
|
|
|
|
|
|
|
{0,0,0}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
int capwap80211_register_actions_ac(struct cw_actiondef *def)
|
|
|
|
{
|
|
|
|
|
|
|
|
int rc;
|
|
|
|
rc=cw_actionlist_in_register_actions(def->in, actions_ac_in);
|
2016-03-14 08:38:29 +01:00
|
|
|
rc+=cw_actionlist_out_register_actions(def->out, actions_ac_out);
|
2016-03-08 19:57:19 +01:00
|
|
|
|
|
|
|
rc+= cw_strheap_register_strings(def->strelem, capwap_strings_elem80211);
|
2016-03-28 16:48:32 +02:00
|
|
|
|
|
|
|
rc += cw_itemdefheap_register(def->items,capwap80211_itemdefs);
|
2016-04-02 09:05:07 +02:00
|
|
|
rc += cw_itemdefheap_register(def->radioitems,capwap80211_radioitemdefs);
|
2016-03-28 16:48:32 +02:00
|
|
|
|
2016-03-08 19:57:19 +01:00
|
|
|
/*rc += cw_strheap_register_strings(def->strelem, capwap_strings_elem);
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|