Improved mod detection, also for bindings. detections are cached.
FossilOrigin-Name: bb2a4cd9c18aded4fa028aa8d385c811d7550a37ddaf3da17f90399315abf637
This commit is contained in:
@ -17,30 +17,33 @@ extern int capwap_register_actions_wtp(struct cw_actiondef *def);
|
||||
|
||||
static int init()
|
||||
{
|
||||
cw_dbg(DBG_INFO,"Initialiazing mod_capwap ...");
|
||||
cw_dbg(DBG_INFO, "Initialiazing mod_capwap ...");
|
||||
int rc = capwap_register_actions_wtp(&actions);
|
||||
cw_dbg(DBG_INFO,"Initialized mod capwap with %d actions",rc);
|
||||
cw_dbg(DBG_INFO, "Initialized mod capwap with %d actions", rc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int detect(struct conn *conn,const uint8_t *rawmsg, int rawlen,int elems_len,struct sockaddr *from)
|
||||
static int detect(struct conn *conn, const uint8_t * rawmsg, int rawlen, int elems_len,
|
||||
struct sockaddr *from, int mode)
|
||||
{
|
||||
cw_log(LOG_INFO,"Detecting ...");
|
||||
conn->detected=1;
|
||||
conn->actions=&actions;
|
||||
if (mode != MOD_DETECT_CAPWAP)
|
||||
return 0;
|
||||
|
||||
cw_log(LOG_INFO, "Detecting ...");
|
||||
conn->detected = 1;
|
||||
conn->actions = &actions;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static struct mod_wtp capwap_wtp = {
|
||||
.name ="capwap",
|
||||
.name = "capwap",
|
||||
.init = init,
|
||||
.detect = detect,
|
||||
.register_actions = capwap_register_actions_wtp
|
||||
|
||||
};
|
||||
|
||||
struct mod_wtp * mod_capwap_wtp(){
|
||||
struct mod_wtp *mod_capwap_wtp()
|
||||
{
|
||||
return &capwap_wtp;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user