2018-03-26 14:33:51 +02:00
|
|
|
|
|
|
|
#include "cw/capwap.h"
|
|
|
|
#include "cw/cw.h"
|
|
|
|
#include "cw/dbg.h"
|
|
|
|
#include "cw/capwap80211.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "cw/msgset.h"
|
|
|
|
|
|
|
|
#include "mod_capwap80211.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static struct cw_ElemHandler handlers[] = {
|
2018-03-26 20:50:18 +02:00
|
|
|
{
|
2018-03-28 19:47:23 +02:00
|
|
|
"IEEE 802.11 WTP Radio Information", /* name */
|
2018-03-27 07:07:14 +02:00
|
|
|
CAPWAP80211_ELEM_WTP_RADIO_INFORMATION, /* Element ID */
|
|
|
|
0, 0, /* Vendor / Proto */
|
|
|
|
0, 0, /* min/max length */
|
2018-03-28 09:36:15 +02:00
|
|
|
CW_TYPE_DWORD, /* type */
|
2018-03-27 07:07:14 +02:00
|
|
|
"wtp-radio-information", /* Key */
|
2018-03-27 18:38:24 +02:00
|
|
|
cw_in_radio_generic, /* get */
|
2018-03-27 07:07:14 +02:00
|
|
|
cw_out_radio_generic /* put */
|
|
|
|
}
|
|
|
|
,
|
2018-03-26 20:50:18 +02:00
|
|
|
{NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL}
|
|
|
|
|
|
|
|
|
2018-03-26 14:33:51 +02:00
|
|
|
};
|
|
|
|
|
2018-03-26 20:50:18 +02:00
|
|
|
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}
|
2018-03-26 14:33:51 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct cw_MsgDef messages[] = {
|
|
|
|
{
|
2018-03-26 20:50:18 +02:00
|
|
|
"Discovery Request",
|
|
|
|
CAPWAP_MSG_DISCOVERY_REQUEST,
|
2018-04-01 12:44:05 +02:00
|
|
|
CW_ROLE_AC,
|
2018-03-26 20:50:18 +02:00
|
|
|
discovery_request_states,
|
2018-03-27 07:07:14 +02:00
|
|
|
discovery_request_elements
|
|
|
|
}
|
|
|
|
,
|
2018-03-26 20:50:18 +02:00
|
|
|
{0, 0, 0, 0, 0}
|
2018-03-26 14:33:51 +02:00
|
|
|
};
|
|
|
|
|
2018-03-26 20:50:18 +02:00
|
|
|
struct cw_MsgSet *capwap80211_register_msgset(set, mode)
|
|
|
|
struct cw_MsgSet *set;
|
|
|
|
int mode;
|
2018-03-26 14:33:51 +02:00
|
|
|
{
|
|
|
|
if (mode != CW_MOD_MODE_BINDINGS)
|
|
|
|
return NULL;
|
2018-03-26 20:50:18 +02:00
|
|
|
|
|
|
|
cw_dbg(DBG_INFO, "CAPWAP80211: Register messages");
|
|
|
|
cw_msgset_add(set, messages, handlers);
|
|
|
|
cw_dbg(DBG_INFO, "CAPWAP0211: Done register messages");
|
|
|
|
|
2018-03-26 14:33:51 +02:00
|
|
|
return set;
|
|
|
|
}
|