2016-03-08 01:44:59 +01:00
|
|
|
|
|
|
|
#include "cw/mod.h"
|
|
|
|
#include "cw/log.h"
|
|
|
|
#include "cw/dbg.h"
|
|
|
|
|
2016-03-11 22:23:00 +01:00
|
|
|
#include "cw/cw.h"
|
2016-03-08 01:44:59 +01:00
|
|
|
|
|
|
|
#include "mod_capwap80211.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static int init()
|
|
|
|
{
|
|
|
|
cw_dbg(DBG_INFO, "Initialiazing mod_capwap80211 ...");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int detect(struct conn *conn, const uint8_t * rawmsg, int rawlen, int elems_len,
|
|
|
|
struct sockaddr *from, int mode)
|
|
|
|
{
|
2018-03-26 13:22:55 +02:00
|
|
|
int wbid;
|
2018-03-12 11:22:06 +01:00
|
|
|
if (mode != CW_MOD_MODE_BINDINGS)
|
2016-03-08 01:44:59 +01:00
|
|
|
return 0;
|
|
|
|
|
2018-03-26 13:22:55 +02:00
|
|
|
/* Check, if we can handle the Wireless Binding ID */
|
|
|
|
wbid = cw_get_hdr_wbid(rawmsg);
|
2018-02-23 13:59:36 +01:00
|
|
|
if (wbid != CAPWAP_WBID_IEEE80211 ) {
|
|
|
|
cw_dbg(DBG_MOD,"CAPWAP80211 detected: no, my wbid=%d, remote wbid=%d",CAPWAP_WBID_IEEE80211,wbid);
|
2016-03-09 09:36:29 +01:00
|
|
|
return 0;
|
2016-03-09 18:39:57 +01:00
|
|
|
}
|
|
|
|
cw_dbg(DBG_MOD,"CAPWAP80211 detected: yes");
|
2016-03-08 01:44:59 +01:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2018-03-26 13:22:55 +02:00
|
|
|
/*
|
2016-03-10 08:07:30 +01:00
|
|
|
static int register_actions(struct cw_actiondef *actions, int mode)
|
2016-03-08 01:44:59 +01:00
|
|
|
{
|
2018-03-12 11:22:06 +01:00
|
|
|
if (mode != CW_MOD_MODE_BINDINGS)
|
2016-03-10 08:07:30 +01:00
|
|
|
return 0;
|
|
|
|
|
2016-03-08 19:57:19 +01:00
|
|
|
return capwap80211_register_actions_ac(actions);
|
2016-03-08 01:44:59 +01:00
|
|
|
}
|
2018-03-26 13:22:55 +02:00
|
|
|
*/
|
|
|
|
|
2018-03-26 20:50:48 +02:00
|
|
|
struct cw_Mod mod_capwap80211 = {
|
|
|
|
"capwap80211", /* name */
|
|
|
|
init, /* init */
|
|
|
|
detect, /* detect */
|
|
|
|
capwap80211_register_msgset, /* register_messages */
|
|
|
|
NULL, /* dll_handle */
|
|
|
|
NULL /* data */
|
|
|
|
};
|
2016-03-08 01:44:59 +01:00
|
|
|
|
2018-03-26 20:50:48 +02:00
|
|
|
/*
|
2018-02-25 19:12:28 +01:00
|
|
|
static struct cw_Mod capwap80211_ac = {
|
2016-03-08 01:44:59 +01:00
|
|
|
.name = "capwap80211",
|
|
|
|
.init = init,
|
|
|
|
.detect = detect,
|
2018-03-26 13:22:55 +02:00
|
|
|
|
2016-03-08 01:44:59 +01:00
|
|
|
};
|
2018-03-26 20:50:48 +02:00
|
|
|
*/
|
2016-03-08 01:44:59 +01:00
|
|
|
|
2018-03-26 20:50:48 +02:00
|
|
|
/*
|
2018-02-25 19:12:28 +01:00
|
|
|
struct cw_Mod *mod_capwap80211_ac()
|
2016-03-08 01:44:59 +01:00
|
|
|
{
|
|
|
|
return &capwap80211_ac;
|
2018-03-26 20:50:48 +02:00
|
|
|
}
|
|
|
|
*/
|