Capwpa 802.11 radio infos send and accept...
FossilOrigin-Name: 67290a384fba6794570a7f578dcef211456831d1e5255ea959ca57336a7b0129
This commit is contained in:
parent
51ea7bc45e
commit
e5203b81a2
@ -298,6 +298,8 @@ cw_action_out_t *cw_actionlist_out_add(cw_actionlist_out_t t, struct cw_action_o
|
||||
}
|
||||
*/
|
||||
|
||||
//printf("Add %d %d\n",a->msg_id,a->elem_id);
|
||||
|
||||
struct outelem * o = cw_actionlist_out_get_outelem(t,a->msg_id);
|
||||
|
||||
|
||||
|
@ -1,12 +1,6 @@
|
||||
#ifndef __CAPWAP80211_H
|
||||
#define __CAPWAP80211_H
|
||||
|
||||
//#include "capwap.h"
|
||||
//#include <stdint.h>
|
||||
|
||||
//#include "bstr.h"
|
||||
//#include "action.h"
|
||||
|
||||
#include "strlist.h"
|
||||
|
||||
/**
|
||||
@ -54,8 +48,12 @@ enum radioelems {
|
||||
CW_ELEM80211_ODFM_CONTROL = 1033,
|
||||
/** IEEE 802.11 Supported WLAN Rates */
|
||||
CW_ELEM80211_RATE_SET = 1034,
|
||||
/** IEEE 802.11 RSNA Error Report From Station */
|
||||
CW_ELEM80211_RSNA_ERROR_REPORT_FROM_STATION=1035,
|
||||
/** IEEE 802.11 Station */
|
||||
CW_ELEM80211_STATION=1036,
|
||||
|
||||
/* IEEE 802.11 RSNA Error Report From Station 1035
|
||||
/*
|
||||
IEEE 802.11 Station 1036
|
||||
IEEE 802.11 Station QoS Profile 1037
|
||||
IEEE 802.11 Station Session Key 1038
|
||||
@ -108,7 +106,9 @@ struct cw_wlan {
|
||||
|
||||
*/
|
||||
|
||||
//int cw_out_radio_infos(struct conn *conn, struct cw_action_out *a, uint8_t * dst);
|
||||
#include "action.h"
|
||||
|
||||
int cw_out_radio_infos(struct conn *conn, struct cw_action_out *a, uint8_t * dst);
|
||||
|
||||
|
||||
//extern int cw_register_actions_capwap_80211_wtp(struct cw_actiondef *def);
|
||||
|
@ -29,6 +29,7 @@ int cw_put_elem_radio_administrative_state(uint8_t *dst,int radio_id,mbag_t radi
|
||||
|
||||
int cw_out_radio_infos(struct conn *conn, struct cw_action_out *a, uint8_t * dst)
|
||||
{
|
||||
|
||||
int l=0;
|
||||
MAVLITER_DEFINE(it,conn->radios);
|
||||
mavliter_foreach(&it){
|
||||
|
@ -1,11 +1,11 @@
|
||||
|
||||
include ../Config.mak
|
||||
all:
|
||||
$(MAKE) -C capwap
|
||||
$(MAKE) -C capwap80211
|
||||
$(MAKE) -C cipwap
|
||||
$(MAKE) -C cisco
|
||||
cc -c modload_ac.c -I../
|
||||
cc -c modload_wtp.c -I../
|
||||
$(CC) -c modload_ac.c -I../
|
||||
$(CC) -c modload_wtp.c -I../
|
||||
|
||||
clean:
|
||||
$(MAKE) -C capwap clean
|
||||
|
@ -1,7 +1,9 @@
|
||||
|
||||
OBJS=\
|
||||
mod_capwap80211_ac.o \
|
||||
capwap80211_actions_ac.o
|
||||
mod_capwap80211_wtp.o \
|
||||
capwap80211_actions_ac.o \
|
||||
capwap80211_actions_wtp.o
|
||||
|
||||
NAME=libcapwap80211.a
|
||||
|
||||
|
@ -20,7 +20,7 @@ static cw_action_in_t actions_ac_in[] = {
|
||||
* Discovery Resquest
|
||||
*/
|
||||
|
||||
/* Element Discovery Type */
|
||||
/* 802.11 Radio Inmformation - Discovery Request */
|
||||
{
|
||||
.capwap_state = CW_STATE_DISCOVERY,
|
||||
.msg_id = CW_MSG_DISCOVERY_REQUEST,
|
||||
@ -34,6 +34,24 @@ static cw_action_in_t actions_ac_in[] = {
|
||||
,
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
* Join Resquest
|
||||
*/
|
||||
|
||||
/* 802.11 Radio Inmformation - Join Request */
|
||||
{
|
||||
.capwap_state = CW_STATE_JOIN,
|
||||
.msg_id = CW_MSG_JOIN_REQUEST,
|
||||
.elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION,
|
||||
.item_id = "radio_information",
|
||||
.start = cw_in_radio_generic,
|
||||
.mand = 1,
|
||||
.min_len = 5,
|
||||
.max_len = 5
|
||||
}
|
||||
,
|
||||
|
||||
|
||||
|
||||
// {0, 0, CW_STATE_DISCOVERY, CW_MSG_DISCOVERY_REQUEST,
|
||||
// CW_ACTION_IN_80211_WTP_RADIO_INFORMATION, 1}
|
||||
|
@ -2,9 +2,10 @@
|
||||
#define __MOD_CAPWAP80211_H
|
||||
|
||||
struct mod_ac *mod_capwap80211_ac();
|
||||
struct mod_wtp *mod_capwap2011_wtp();
|
||||
struct mod_wtp *mod_capwap80211_wtp();
|
||||
|
||||
extern int capwap80211_register_actions_ac(struct cw_actiondef *def);
|
||||
extern int capwap80211_register_actions_wtp(struct cw_actiondef *def);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -4,3 +4,14 @@
|
||||
struct mod_ac * modload_ac(const char *name);
|
||||
struct mod_wtp * modload_wtp(const char *name);
|
||||
|
||||
|
||||
|
||||
#include "cipwap/mod_cipwap.h"
|
||||
#include "capwap/mod_capwap.h"
|
||||
#include "cisco/mod_cisco.h"
|
||||
#include "capwap80211/mod_capwap80211.h"
|
||||
|
||||
#define MODS_AC { mod_capwap_ac,mod_cipwap_ac, mod_cisco_ac, mod_capwap80211_ac, NULL }
|
||||
#define MODS_WTP { mod_capwap_wtp,mod_capwap80211_wtp, NULL }
|
||||
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
#include "modload.h"
|
||||
|
||||
/*
|
||||
#include "../cw/mod.h"
|
||||
|
||||
|
||||
@ -8,6 +11,8 @@
|
||||
|
||||
#define MODS_AC { mod_capwap_ac,mod_cipwap_ac, mod_cisco_ac, mod_capwap80211_ac, NULL }
|
||||
|
||||
*/
|
||||
|
||||
|
||||
struct mod_ac *(*mods_ac[])() = MODS_AC;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/*
|
||||
#include "../cw/mod.h"
|
||||
|
||||
|
||||
@ -7,6 +8,9 @@
|
||||
|
||||
#define MODS_WTP { mod_capwap_wtp, NULL }
|
||||
|
||||
*/
|
||||
|
||||
#include "modload.h"
|
||||
|
||||
struct mod_wtp *(*mods_wtp[])() = MODS_WTP;
|
||||
|
||||
|
@ -26,6 +26,7 @@ LDFLAGS += -L../contrib/jsmn -L../../src/lib/$(ARCH)
|
||||
|
||||
|
||||
LIBS+=-lcapwap
|
||||
LIBS+=-lcapwap80211
|
||||
LIBS+=-lcisco
|
||||
LIBS+=-lcw
|
||||
LIBS+=-lnl-3
|
||||
|
@ -103,8 +103,19 @@ int main()
|
||||
printf("Can't load mod capwap\n");
|
||||
exit(0);
|
||||
}
|
||||
conn->detected = 1;
|
||||
mod->register_actions(&capwap_actions);
|
||||
mod = modload_wtp("capwap80211");
|
||||
if (!mod) {
|
||||
printf("Can't load mod capwap80211\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
printf("add capwap80211\n");
|
||||
int rc = mod->register_actions(&capwap_actions);
|
||||
|
||||
printf("Out reg = %d\n",rc);
|
||||
|
||||
conn->detected = 1;
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user