rename mod_wtp and mod_ac to cw_Mod
FossilOrigin-Name: 4a8f9578a5fc384f0dad291114ac9470ea8561817e87760946277ec9ddd0db79
This commit is contained in:
@ -5,7 +5,7 @@ include ../../Config.mak
|
||||
OBJS:=$(patsubst %.o,$(ARCH)/%.o,$(OBJS))
|
||||
|
||||
|
||||
CFLAGS = -Wall -g -O0 -D_REENTRANT -DWITH_IPV6 $(COMPDEFS) -DWITH_RMAC_SUPPORT -I ../../ -I../ -I../../include
|
||||
CFLAGS = -fPIC -Wall -g -O0 -D_REENTRANT -DWITH_IPV6 $(COMPDEFS) -DWITH_RMAC_SUPPORT -I ../../ -I../ -I../../include
|
||||
|
||||
LIBDIR=../../lib/$(ARCH)
|
||||
|
||||
@ -21,6 +21,7 @@ $(LIBDIR)/$(NAME) : $(OBJS) $(MODOBJS)
|
||||
@mkdir -p $(LIBDIR)
|
||||
@echo " AR $(LIBDIR)/$(NAME)"
|
||||
@$(AR) rcs $(LIBDIR)/$(NAME) $(OBJS) $(MODOBJS)
|
||||
$(CC) -L$(LIBDIR) $(OBJS) $(MODOBJS) $(SLIBS) -v -shared -o ../../../lib/actube/capwap.so
|
||||
|
||||
|
||||
all: $(LIBDIR)/$(NAME)
|
||||
|
@ -16,6 +16,7 @@ OBJS=\
|
||||
|
||||
|
||||
NAME=libcapwap.a
|
||||
SLIBS=-lcw
|
||||
|
||||
include ../Mod.mak
|
||||
|
||||
|
@ -127,15 +127,20 @@ static cw_msgdef_t messages[] = {
|
||||
};
|
||||
|
||||
|
||||
|
||||
int capwap_register_msg_set(struct cw_MsgSet * set){
|
||||
|
||||
}
|
||||
|
||||
void test_sets(){
|
||||
|
||||
cw_message_set_t * set = cw_message_set_create();
|
||||
cw_MsgSet_t * set = cw_message_set_create();
|
||||
if (set==NULL){
|
||||
cw_log(LOG_ERR,"No mem");
|
||||
return;
|
||||
}
|
||||
|
||||
cw_message_set_add(set,messages);
|
||||
cw_msgset_add(set,messages);
|
||||
|
||||
cw_elem_handler_t el;
|
||||
memset(&el,0,sizeof(el));
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef __MOD_CAPWAP_H
|
||||
#define __MOD_CAPWAP_H
|
||||
|
||||
struct mod_ac *mod_capwap_ac();
|
||||
struct mod_wtp *mod_capwap_wtp();
|
||||
struct cw_Mod *mod_capwap_ac();
|
||||
struct cw_Mod *mod_capwap_wtp();
|
||||
|
||||
|
||||
extern int capwap_in_wtp_descriptor(struct conn *conn, struct cw_action_in *a,
|
||||
|
@ -42,14 +42,14 @@ static int register_actions(struct cw_actiondef *def, int mode)
|
||||
|
||||
|
||||
|
||||
static struct mod_ac capwap_ac = {
|
||||
static struct cw_Mod capwap_ac = {
|
||||
.name = "capwap",
|
||||
.init = init,
|
||||
.detect = detect,
|
||||
.register_actions = register_actions
|
||||
};
|
||||
|
||||
struct mod_ac *mod_capwap_ac()
|
||||
struct cw_Mod *mod_capwap_ac()
|
||||
{
|
||||
return &capwap_ac;
|
||||
};
|
||||
|
@ -41,14 +41,14 @@ static int register_actions(struct cw_actiondef *def, int mode)
|
||||
return capwap_register_actions_wtp(def);
|
||||
}
|
||||
|
||||
static struct mod_wtp capwap_wtp = {
|
||||
static struct cw_Mod capwap_wtp = {
|
||||
.name = "capwap",
|
||||
.init = init,
|
||||
.detect = detect,
|
||||
.register_actions=register_actions
|
||||
};
|
||||
|
||||
struct mod_wtp *mod_capwap_wtp()
|
||||
struct cw_Mod *mod_capwap_wtp()
|
||||
{
|
||||
return &capwap_wtp;
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef __MOD_CAPWAP80211_H
|
||||
#define __MOD_CAPWAP80211_H
|
||||
|
||||
struct mod_ac *mod_capwap80211_ac();
|
||||
struct mod_wtp *mod_capwap80211_wtp();
|
||||
struct cw_Mod *mod_capwap80211_ac();
|
||||
struct cw_Mod *mod_capwap80211_wtp();
|
||||
|
||||
extern int capwap80211_register_actions_ac(struct cw_actiondef *def);
|
||||
extern int capwap80211_register_actions_wtp(struct cw_actiondef *def);
|
||||
|
@ -47,14 +47,14 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
return capwap80211_register_actions_ac(actions);
|
||||
}
|
||||
|
||||
static struct mod_ac capwap80211_ac = {
|
||||
static struct cw_Mod capwap80211_ac = {
|
||||
.name = "capwap80211",
|
||||
.init = init,
|
||||
.detect = detect,
|
||||
.register_actions = register_actions
|
||||
};
|
||||
|
||||
struct mod_ac *mod_capwap80211_ac()
|
||||
struct cw_Mod *mod_capwap80211_ac()
|
||||
{
|
||||
return &capwap80211_ac;
|
||||
};
|
||||
|
@ -40,14 +40,14 @@ static int register_actions(struct cw_actiondef *actions,int mode)
|
||||
return capwap80211_register_actions_wtp(actions);
|
||||
}
|
||||
|
||||
static struct mod_ac capwap80211_wtp = {
|
||||
static struct cw_Mod capwap80211_wtp = {
|
||||
.name = "capwap80211",
|
||||
.init = init,
|
||||
.detect = detect,
|
||||
.register_actions = register_actions
|
||||
};
|
||||
|
||||
struct mod_ac *mod_capwap80211_wtp()
|
||||
struct cw_Mod *mod_capwap80211_wtp()
|
||||
{
|
||||
return &capwap80211_wtp;
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef __MOD_CIPWAP_H
|
||||
#define __MOD_CIPWAP_H
|
||||
|
||||
struct mod_ac * mod_cipwap_ac();
|
||||
struct mod_wtp * mod_cipwap_wtp();
|
||||
struct cw_Mod * mod_cipwap_ac();
|
||||
struct cw_Mod * mod_cipwap_wtp();
|
||||
|
||||
extern int cipwap_register_actions_ac(struct cw_actiondef *def);
|
||||
|
||||
|
@ -30,7 +30,7 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
case MOD_MODE_CAPWAP:
|
||||
{
|
||||
|
||||
struct mod_ac *cmod = modload_ac("capwap");
|
||||
struct cw_Mod *cmod = modload_ac("capwap");
|
||||
if (!cmod) {
|
||||
cw_log(LOG_ERR,
|
||||
"Can't initialize mod_cisco, failed to load base mod mod_capwap");
|
||||
@ -69,7 +69,7 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
|
||||
|
||||
|
||||
static struct mod_ac cipwap_ac = {
|
||||
static struct cw_Mod cipwap_ac = {
|
||||
.name ="cipwap",
|
||||
.init = cipwap_init,
|
||||
.detect = detect,
|
||||
@ -79,7 +79,7 @@ static struct mod_ac cipwap_ac = {
|
||||
|
||||
|
||||
|
||||
struct mod_ac * mod_cipwap_ac(){
|
||||
struct cw_Mod * mod_cipwap_ac(){
|
||||
return &cipwap_ac;
|
||||
};
|
||||
|
||||
|
@ -30,7 +30,7 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
case MOD_MODE_CAPWAP:
|
||||
{
|
||||
|
||||
struct mod_ac *cmod = modload_wtp("capwap");
|
||||
struct cw_Mod *cmod = modload_wtp("capwap");
|
||||
if (!cmod) {
|
||||
cw_log(LOG_ERR,
|
||||
"Can't initialize mod_cisco, failed to load base mod mod_capwap");
|
||||
@ -69,7 +69,7 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
|
||||
|
||||
|
||||
static struct mod_ac cipwap_wtp = {
|
||||
static struct cw_Mod cipwap_wtp = {
|
||||
.name ="cipwap",
|
||||
.init = cipwap_init,
|
||||
.detect = detect,
|
||||
@ -79,7 +79,7 @@ static struct mod_ac cipwap_wtp = {
|
||||
|
||||
|
||||
|
||||
struct mod_ac * mod_cipwap_wtp(){
|
||||
struct cw_Mod * mod_cipwap_wtp(){
|
||||
return &cipwap_wtp;
|
||||
};
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef __MOD_CISCO_H
|
||||
#define __MOD_CISCO_H
|
||||
|
||||
struct mod_ac * mod_cisco_ac();
|
||||
struct mod_ac * mod_cisco_wtp();
|
||||
struct cw_Mod * mod_cisco_ac();
|
||||
struct cw_Mod * mod_cisco_wtp();
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -27,7 +27,7 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
case MOD_MODE_CAPWAP:
|
||||
{
|
||||
|
||||
struct mod_ac *cmod = modload_ac("cipwap");
|
||||
struct cw_Mod *cmod = modload_ac("cipwap");
|
||||
if (!cmod) {
|
||||
cw_log(LOG_ERR,
|
||||
"Can't initialize mod_cisco, failed to load base mod mod_cipwap");
|
||||
@ -40,7 +40,7 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
}
|
||||
case MOD_MODE_BINDINGS:
|
||||
{
|
||||
struct mod_ac *cmod = modload_ac("capwap80211");
|
||||
struct cw_Mod *cmod = modload_ac("capwap80211");
|
||||
if (!cmod) {
|
||||
cw_log(LOG_ERR,
|
||||
"Can't initialize mod_cisco, failed to load base mod mod_capwap80211");
|
||||
@ -167,14 +167,14 @@ static int detect(struct conn *conn, const uint8_t * rawmsg, int rawlen, int ele
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct mod_ac capwap_ac = {
|
||||
static struct cw_Mod capwap_ac = {
|
||||
.name = "cisco",
|
||||
.init = init,
|
||||
.detect = detect,
|
||||
.register_actions = register_actions,
|
||||
};
|
||||
|
||||
struct mod_ac *mod_cisco_ac()
|
||||
struct cw_Mod *mod_cisco_ac()
|
||||
{
|
||||
return &capwap_ac;
|
||||
};
|
||||
|
@ -19,11 +19,12 @@ extern int cisco_register_actions_wtp(struct cw_actiondef *def);
|
||||
|
||||
static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
{
|
||||
|
||||
switch (mode) {
|
||||
case MOD_MODE_CAPWAP:
|
||||
{
|
||||
|
||||
struct mod_wtp *cmod = modload_wtp("cipwap");
|
||||
struct cw_Mod *cmod = modload_wtp("cipwap");
|
||||
if (!cmod) {
|
||||
cw_log(LOG_ERR,
|
||||
"Can't initzialize mod_cisco, failed to load base mod mod_cipwap");
|
||||
@ -40,7 +41,7 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
}
|
||||
case MOD_MODE_BINDINGS:
|
||||
{
|
||||
struct mod_ac *cmod = modload_wtp("capwap80211");
|
||||
struct cw_Mod *cmod = modload_wtp("capwap80211");
|
||||
if (!cmod) {
|
||||
cw_log(LOG_ERR,
|
||||
"Can't initzialize mod_cisco, failed to load base mod mod_capwap80211");
|
||||
@ -154,7 +155,7 @@ static int detect(struct conn *conn, const uint8_t * rawmsg, int rawlen, int ele
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct mod_ac cisco_wtp = {
|
||||
static struct cw_Mod cisco_wtp = {
|
||||
.name = "cisco",
|
||||
.init = init,
|
||||
.init_config = init_config,
|
||||
@ -162,7 +163,7 @@ static struct mod_ac cisco_wtp = {
|
||||
.register_actions = register_actions
|
||||
};
|
||||
|
||||
struct mod_ac *mod_cisco_wtp()
|
||||
struct cw_Mod *mod_cisco_wtp()
|
||||
{
|
||||
return &cisco_wtp;
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef __MOD_FORTINET_H
|
||||
#define __MOD_FORTINET_H
|
||||
|
||||
struct mod_ac * mod_fortinet_ac();
|
||||
struct mod_ac * mod_fortinet_wtp();
|
||||
struct cw_Mod * mod_fortinet_ac();
|
||||
struct cw_Mod * mod_fortinet_wtp();
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -21,7 +21,7 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
case MOD_MODE_CAPWAP:
|
||||
{
|
||||
|
||||
struct mod_ac *cmod = modload_ac("capwap");
|
||||
struct cw_Mod *cmod = modload_ac("capwap");
|
||||
if (!cmod) {
|
||||
cw_log(LOG_ERR,
|
||||
"Can't initialize mod_fortinet, failed to load base mod mod_capwap");
|
||||
@ -34,7 +34,7 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
}
|
||||
case MOD_MODE_BINDINGS:
|
||||
{
|
||||
struct mod_ac *cmod = modload_ac("capwap80211");
|
||||
struct cw_Mod *cmod = modload_ac("capwap80211");
|
||||
if (!cmod) {
|
||||
cw_log(LOG_ERR,
|
||||
"Can't initialize mod_fortinet, failed to load base mod mod_capwap80211");
|
||||
@ -60,7 +60,7 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
static int init()
|
||||
{
|
||||
cw_dbg(DBG_INFO, "Initialiazing mod_fortineto ...");
|
||||
// struct mod_ac *cmod = modload_ac("capwap");
|
||||
// struct cw_Mod *cmod = modload_ac("capwap");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -108,14 +108,14 @@ static int detect(struct conn *conn, const uint8_t * rawmsg, int rawlen, int ele
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct mod_ac capwap_ac = {
|
||||
static struct cw_Mod capwap_ac = {
|
||||
.name = "fortinet",
|
||||
.init = init,
|
||||
.detect = detect,
|
||||
.register_actions = register_actions
|
||||
};
|
||||
|
||||
struct mod_ac *mod_fortinet_ac()
|
||||
struct cw_Mod *mod_fortinet_ac()
|
||||
{
|
||||
return &capwap_ac;
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
case MOD_MODE_CAPWAP:
|
||||
{
|
||||
|
||||
struct mod_wtp *cmod = modload_wtp("capwap");
|
||||
struct cw_Mod *cmod = modload_wtp("capwap");
|
||||
if (!cmod) {
|
||||
cw_log(LOG_ERR,
|
||||
"Can't initialize mod_fortinet, failed to load base mod mod_capwap");
|
||||
@ -38,7 +38,7 @@ static int register_actions(struct cw_actiondef *actions, int mode)
|
||||
}
|
||||
case MOD_MODE_BINDINGS:
|
||||
{
|
||||
struct mod_ac *cmod = modload_wtp("capwap80211");
|
||||
struct cw_Mod *cmod = modload_wtp("capwap80211");
|
||||
if (!cmod) {
|
||||
cw_log(LOG_ERR,
|
||||
"Can't initialize mod_fortinet, failed to load base mod mod_capwap80211");
|
||||
@ -82,7 +82,7 @@ static int init()
|
||||
mbag_set_bstr16(cisco_config_wtp,CW_ITEM_WTP_BOOTLOADER_VERSION,v);
|
||||
|
||||
#endif
|
||||
// struct mod_ac *cmod = modload_ac("capwap");
|
||||
// struct cw_Mod *cmod = modload_ac("capwap");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ static int detect(struct conn *conn, const uint8_t * rawmsg, int rawlen, int ele
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct mod_ac fortinet_wtp = {
|
||||
static struct cw_Mod fortinet_wtp = {
|
||||
.name = "fortinet",
|
||||
.init = init,
|
||||
.init_config = init_config,
|
||||
@ -161,7 +161,7 @@ static struct mod_ac fortinet_wtp = {
|
||||
.register_actions = register_actions
|
||||
};
|
||||
|
||||
struct mod_ac *mod_fortinet_wtp()
|
||||
struct cw_Mod *mod_fortinet_wtp()
|
||||
{
|
||||
return &fortinet_wtp;
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
#include "cw/mod.h"
|
||||
|
||||
struct mod_ac * modload_ac(const char *name);
|
||||
struct mod_wtp * modload_wtp(const char *name);
|
||||
struct cw_Mod * modload_ac(const char *name);
|
||||
struct cw_Mod * modload_wtp(const char *name);
|
||||
|
||||
|
||||
|
||||
|
@ -14,14 +14,14 @@
|
||||
*/
|
||||
|
||||
|
||||
struct mod_ac *(*mods_ac[])() = MODS_AC;
|
||||
struct cw_Mod *(*mods_ac[])() = MODS_AC;
|
||||
|
||||
struct mod_ac * modload_ac(const char *name)
|
||||
struct cw_Mod * modload_ac(const char *name)
|
||||
{
|
||||
int i;
|
||||
for (i=0; mods_ac[i];i++){
|
||||
|
||||
struct mod_ac * m = mods_ac[i]();
|
||||
struct cw_Mod * m = mods_ac[i]();
|
||||
if (strcmp(m->name,name)==0)
|
||||
return m;
|
||||
}
|
||||
|
@ -12,14 +12,14 @@
|
||||
|
||||
#include "modload.h"
|
||||
|
||||
struct mod_wtp *(*mods_wtp[])() = MODS_WTP;
|
||||
struct cw_Mod *(*mods_wtp[])() = MODS_WTP;
|
||||
|
||||
struct mod_wtp * modload_wtp(const char *name)
|
||||
struct cw_Mod * modload_wtp(const char *name)
|
||||
{
|
||||
int i;
|
||||
for (i=0; mods_wtp[i];i++){
|
||||
|
||||
struct mod_wtp * m = mods_wtp[i]();
|
||||
struct cw_Mod * m = mods_wtp[i]();
|
||||
if (strcmp(m->name,name)==0)
|
||||
return m;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __MOD_ZYXEL_H
|
||||
#define __MOD_ZYXEL_H
|
||||
|
||||
struct mod_ac * mod_zyxel_ac();
|
||||
struct cw_Mod * mod_zyxel_ac();
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user