Refactoring ...
a# Please enter the commit message for your changes. Lines starting FossilOrigin-Name: c126f130f351f7103d1594a42255a1affd24061a75cf0cfeb129a92a8d2fb2a1
This commit is contained in:
59
src/mod/capwap80211/mod_capwap80211.c
Normal file
59
src/mod/capwap80211/mod_capwap80211.c
Normal file
@ -0,0 +1,59 @@
|
||||
|
||||
#include "cw/mod.h"
|
||||
#include "cw/log.h"
|
||||
#include "cw/dbg.h"
|
||||
|
||||
#include "cw/cw.h"
|
||||
|
||||
#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)
|
||||
{
|
||||
int wbid;
|
||||
if (mode != CW_MOD_MODE_BINDINGS)
|
||||
return 0;
|
||||
|
||||
/* Check, if we can handle the Wireless Binding ID */
|
||||
wbid = cw_get_hdr_wbid(rawmsg);
|
||||
if (wbid != CAPWAP_WBID_IEEE80211 ) {
|
||||
cw_dbg(DBG_MOD,"CAPWAP80211 detected: no, my wbid=%d, remote wbid=%d",CAPWAP_WBID_IEEE80211,wbid);
|
||||
return 0;
|
||||
}
|
||||
cw_dbg(DBG_MOD,"CAPWAP80211 detected: yes");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
{
|
||||
if (mode != CW_MOD_MODE_BINDINGS)
|
||||
return 0;
|
||||
|
||||
return capwap80211_register_actions_ac(actions);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
static struct cw_Mod capwap80211_ac = {
|
||||
.name = "capwap80211",
|
||||
.init = init,
|
||||
.detect = detect,
|
||||
|
||||
};
|
||||
|
||||
struct cw_Mod *mod_capwap80211_ac()
|
||||
{
|
||||
return &capwap80211_ac;
|
||||
}
|
Reference in New Issue
Block a user