Working on mods.
FossilOrigin-Name: 5b47ebc4f08ac42b88471906357598a2155f3b7ae8eb0f4f843f6c05df155d46
This commit is contained in:
25
src/capwap/mod/capwap/Makefile
Normal file
25
src/capwap/mod/capwap/Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
include ../../../Macros.mak
|
||||
include ../../../Config.mak
|
||||
|
||||
OBJS=\
|
||||
mod_capwap_ac.o \
|
||||
capwap_actions_ac.o
|
||||
|
||||
OBJS:=$(patsubst %.o,$(ARCH)/%.o,$(OBJS))
|
||||
|
||||
|
||||
CFLAGS = -Wall -g -O0 -D_REENTRANT -DWITH_IPV6 -DWITH_RMAC_SUPPORT -I ../../../
|
||||
|
||||
|
||||
SRCS = $(OBJS:.o=.c)
|
||||
|
||||
$(ARCH)/%.o:%.c
|
||||
@mkdir -p $(ARCH)
|
||||
@echo " CC "$<
|
||||
@$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
|
||||
all: $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -rf $(ARCH)
|
6
src/capwap/mod/capwap/mod_capwap.h
Normal file
6
src/capwap/mod/capwap/mod_capwap.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef __MOD_CAPWAP_H
|
||||
#define __MOD_CAPWAP_H
|
||||
|
||||
struct mod_ac * mod_capwap_ac();
|
||||
|
||||
#endif
|
44
src/capwap/mod/capwap/mod_capwap_ac.c
Normal file
44
src/capwap/mod/capwap/mod_capwap_ac.c
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
#include "capwap/mod.h"
|
||||
#include "capwap/log.h"
|
||||
#include "capwap/dbg.h"
|
||||
|
||||
#include "capwap/action.h"
|
||||
|
||||
#include "mod_capwap.h"
|
||||
|
||||
|
||||
static struct cw_actiondef actions;
|
||||
|
||||
|
||||
|
||||
extern int capwap_register_actions_ac(struct cw_actiondef *def);
|
||||
|
||||
|
||||
static int init()
|
||||
{
|
||||
cw_dbg(DBG_INFO,"Initialiazing mod_capwap ...");
|
||||
int rc = capwap_register_actions_ac(&actions);
|
||||
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,struct sockaddr *from)
|
||||
{
|
||||
cw_log(LOG_INFO,"Detecting ...");
|
||||
conn->detected=1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static struct mod_ac capwap_ac = {
|
||||
.name ="capwap",
|
||||
.init = init,
|
||||
.detect = detect
|
||||
|
||||
};
|
||||
|
||||
struct mod_ac * mod_capwap_ac(){
|
||||
return &capwap_ac;
|
||||
};
|
||||
|
Reference in New Issue
Block a user