2016-03-09 09:11:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
#include "cw/action.h"
|
|
|
|
#include "cw/cw.h"
|
|
|
|
#include "cw/capwap.h"
|
|
|
|
#include "cw/capwap80211.h"
|
|
|
|
#include "cw/capwap_items.h"
|
2016-03-28 16:49:08 +02:00
|
|
|
#include "cw/capwap80211_items.h"
|
2016-03-28 10:49:19 +02:00
|
|
|
#include "cw/radio.h"
|
2016-03-09 09:11:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static cw_action_in_t actions_wtp_in[] = {
|
|
|
|
|
|
|
|
/* --------------------------------------------------------
|
2016-04-01 07:34:24 +02:00
|
|
|
* Discovery Response
|
2016-03-09 09:11:47 +01:00
|
|
|
*/
|
|
|
|
|
2016-03-14 08:20:46 +01:00
|
|
|
/* 802.11 Radio Inmformation - Discovery Response */
|
|
|
|
{
|
2018-02-23 20:14:10 +01:00
|
|
|
.capwap_state = CAPWAP_STATE_DISCOVERY,
|
2018-02-23 14:18:22 +01:00
|
|
|
.msg_id = CAPWAP_MSG_DISCOVERY_RESPONSE,
|
2018-03-26 13:22:55 +02:00
|
|
|
.elem_id = CAPWAP80211_ELEM_WTP_RADIO_INFORMATION,
|
2016-04-02 09:05:07 +02:00
|
|
|
.item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION,
|
2016-04-01 07:34:24 +02:00
|
|
|
// .start = cw_in_radio_generic,
|
2016-03-14 08:20:46 +01:00
|
|
|
.mand = 1,
|
|
|
|
.min_len = 5,
|
|
|
|
.max_len = 5
|
|
|
|
}
|
|
|
|
,
|
|
|
|
|
|
|
|
/* --------------------------------------------------------
|
|
|
|
* Join Response
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* 802.11 Radio Inmformation - Join Response */
|
|
|
|
{
|
2018-02-28 07:38:02 +01:00
|
|
|
.capwap_state = CAPWAP_STATE_JOIN,
|
2018-02-23 17:36:11 +01:00
|
|
|
.msg_id = CAPWAP_MSG_JOIN_RESPONSE,
|
2018-03-26 13:22:55 +02:00
|
|
|
.elem_id = CAPWAP80211_ELEM_WTP_RADIO_INFORMATION,
|
2016-04-02 09:05:07 +02:00
|
|
|
.item_id = CW_RADIOITEM80211_WTP_RADIO_INFORMATION,
|
2016-04-01 07:34:24 +02:00
|
|
|
// .start = cw_in_radio_generic,
|
2016-03-14 08:20:46 +01:00
|
|
|
.mand = 1,
|
|
|
|
.min_len = 5,
|
|
|
|
.max_len = 5
|
|
|
|
}
|
|
|
|
,
|
|
|
|
|
2016-03-09 09:11:47 +01:00
|
|
|
/* --------------------------------------------------------
|
2016-04-02 16:53:04 +02:00
|
|
|
* Configuration Status Response
|
2016-03-09 09:11:47 +01:00
|
|
|
*/
|
|
|
|
|
2016-04-02 16:53:04 +02:00
|
|
|
/* Rate Set - Config Status Resp */
|
|
|
|
{
|
|
|
|
.capwap_state = CW_STATE_CONFIGURE,
|
2018-03-05 07:24:48 +01:00
|
|
|
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,
|
2016-04-02 16:53:04 +02:00
|
|
|
.elem_id = CW_ELEM80211_RATE_SET,
|
|
|
|
.item_id = CW_RADIOITEM80211_RATE_SET,
|
|
|
|
.start = cw_in_radio_generic
|
|
|
|
}
|
|
|
|
|
2016-03-09 09:11:47 +01:00
|
|
|
|
2016-04-02 16:53:04 +02:00
|
|
|
,
|
2016-03-09 09:11:47 +01:00
|
|
|
|
|
|
|
{0, 0, 0}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
cw_action_out_t actions_out[]={
|
|
|
|
/* Discovery Request */
|
|
|
|
|
|
|
|
/* 802.11 Radio Information - Discovery Request */
|
|
|
|
{
|
2018-02-23 13:59:36 +01:00
|
|
|
.msg_id = CAPWAP_MSG_DISCOVERY_REQUEST,
|
2016-03-09 09:11:47 +01:00
|
|
|
.item_id = CW_ITEM_RADIO_INFOS ,
|
2018-03-26 13:22:55 +02:00
|
|
|
.elem_id = CAPWAP80211_ELEM_WTP_RADIO_INFORMATION,
|
2016-03-09 09:11:47 +01:00
|
|
|
.out = cw_out_radio_infos,
|
|
|
|
.mand = 1
|
|
|
|
}
|
|
|
|
,
|
|
|
|
|
|
|
|
/* Join Request */
|
|
|
|
|
|
|
|
/* 802.11 Radio Information - Join Request */
|
|
|
|
{
|
2018-02-23 17:23:53 +01:00
|
|
|
.msg_id = CAPWAP_MSG_JOIN_REQUEST,
|
2016-03-09 09:11:47 +01:00
|
|
|
.item_id = CW_ITEM_RADIO_INFOS ,
|
2018-03-26 13:22:55 +02:00
|
|
|
.elem_id = CAPWAP80211_ELEM_WTP_RADIO_INFORMATION,
|
2016-03-09 09:11:47 +01:00
|
|
|
.out = cw_out_radio_infos,
|
|
|
|
.mand = 1
|
|
|
|
}
|
|
|
|
,
|
|
|
|
|
2016-03-28 10:49:19 +02:00
|
|
|
/* --------------------------------------------------------
|
|
|
|
* Config Status Request
|
|
|
|
*/
|
|
|
|
/* 802.11 Radio Information */
|
|
|
|
{
|
2018-02-23 17:36:11 +01:00
|
|
|
.msg_id = CAPWAP_MSG_CONFIGURATION_STATUS_REQUEST,
|
2016-03-28 10:49:19 +02:00
|
|
|
.item_id = CW_RADIO_SUPPORTED_RATES ,
|
|
|
|
.elem_id = CW_ELEM80211_SUPPORTED_RATES,
|
|
|
|
.out = cw_out_80211_supported_rates,
|
2016-03-31 19:24:50 +02:00
|
|
|
.mand = 0
|
2016-03-28 10:49:19 +02:00
|
|
|
}
|
|
|
|
,
|
2016-03-09 09:11:47 +01:00
|
|
|
|
|
|
|
|
2016-03-28 10:49:19 +02:00
|
|
|
/* --------------------------------------------------------
|
|
|
|
* Config Status Update Request
|
|
|
|
*/
|
2016-03-09 09:11:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{0,0,0}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
int capwap80211_register_actions_wtp(struct cw_actiondef *def)
|
|
|
|
{
|
|
|
|
|
|
|
|
int rc;
|
|
|
|
rc=cw_actionlist_in_register_actions(def->in, actions_wtp_in);
|
|
|
|
rc+=cw_actionlist_out_register_actions(def->out, actions_out);
|
|
|
|
|
|
|
|
rc+= cw_strheap_register_strings(def->strelem, capwap_strings_elem80211);
|
2016-03-28 16:49:08 +02:00
|
|
|
|
|
|
|
rc += cw_itemdefheap_register(def->items,capwap80211_itemdefs);
|
2016-04-02 16:53:04 +02:00
|
|
|
rc += cw_itemdefheap_register(def->radioitems,capwap80211_radioitemdefs);
|
2016-03-28 16:49:08 +02:00
|
|
|
|
2016-03-09 09:11:47 +01:00
|
|
|
/*rc += cw_strheap_register_strings(def->strelem, capwap_strings_elem);
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|