Compare commits
11 Commits
typeless
...
4995cac9b8
Author | SHA1 | Date | |
---|---|---|---|
4995cac9b8 | |||
d7c826fac6 | |||
d668e0e5a7 | |||
63cb0b928f | |||
361e9dd1aa | |||
3f69dbf67e | |||
43b75502f7 | |||
4a565efff1 | |||
54955daff4 | |||
4047707fa8 | |||
5b1690bfbf |
@ -59,17 +59,17 @@ capwap/ac-descriptor/station-limit: 1000
|
||||
capwap/ac-descriptor/stations: 0
|
||||
|
||||
|
||||
capwap/control-ip-address/address.0: 192.168.0.24
|
||||
capwap/control-ip-address/address.0: 192.168.0.14
|
||||
|
||||
|
||||
|
||||
#
|
||||
# CAPWAP Timers
|
||||
#
|
||||
capwap/timers/change-state-pending-timer: Word: 3
|
||||
capwap/timers/data-check-timer: Word: 10
|
||||
capwap/timers/echo-interval :Byte: 30
|
||||
capwap/timers/max-discovery-interval :Byte: 10
|
||||
|
||||
|
||||
capwap/timers/change-state-pending-timer: 3
|
||||
capwap/timers/data-check-timer: 10
|
||||
capwap/timers/echo-interval: 30
|
||||
capwap/timers/max-discovery-interval: 10
|
||||
capwap/decryption-error-report-period: 120
|
||||
capwap/idle-timeout: 300
|
||||
|
||||
|
487
src/ac/db.c
487
src/ac/db.c
@ -1,487 +0,0 @@
|
||||
|
||||
#include <sqlite3.h>
|
||||
|
||||
|
||||
#include "cw/log.h"
|
||||
#include "cw/dbg.h"
|
||||
|
||||
#include "cw/conn.h"
|
||||
|
||||
|
||||
|
||||
#include "conf.h"
|
||||
|
||||
static sqlite3 *handle;
|
||||
|
||||
|
||||
static const char * init_tables = "\
|
||||
CREATE TABLE IF NOT EXISTS acs (acid TEXT PRIMARY KEY, acname TEXT, lastseen TIMESTAMP); \
|
||||
CREATE TABLE IF NOT EXISTS radios (\
|
||||
wtpid TEXT,\
|
||||
rid TEXT,\
|
||||
key TEXT,\
|
||||
sub_key,\
|
||||
val TEXT, \
|
||||
upd INTEGER, \
|
||||
PRIMARY KEY (wtpid,rid,key,sub_key)\
|
||||
);\
|
||||
CREATE TABLE IF NOT EXISTS acips (acid TEXT,ip TEXT); \
|
||||
CREATE TABLE IF NOT EXISTS wtps (wtpid TEXT PRIMARY KEY, acid TEXT,lastseen TIMESTAMP); \
|
||||
CREATE TABLE IF NOT EXISTS wtpprops (\
|
||||
wtpid TEXT NOT NULL,\
|
||||
id TEXT NOT NULL,\
|
||||
sub_id TEXT NOT NULL,\
|
||||
val TEXT,\
|
||||
upd INTEGER,\
|
||||
PRIMARY KEY(wtpid,id,sub_id)\
|
||||
);\
|
||||
CREATE TABLE IF NOT EXISTS wlans (wlanid INTEGER PRIMARY KEY);\
|
||||
CREATE TABLE IF NOT EXISTS wlanprops (wlanid INTEGER, id TEXT NOT NULL, val TEXT, PRIMARY KEY(wlanid,id));\
|
||||
";
|
||||
|
||||
|
||||
|
||||
|
||||
int db_init()
|
||||
{
|
||||
|
||||
int rc;
|
||||
const char * filename="ac.sqlite3";
|
||||
cw_dbg(DBG_INFO,"Initializing Sqlite3 DB: %s, SQLite3 Version %s",filename,SQLITE_VERSION);
|
||||
|
||||
rc = sqlite3_config(SQLITE_CONFIG_SERIALIZED);
|
||||
if (rc!=SQLITE_OK){
|
||||
cw_log(LOG_ERR,"Error configuring SQLite3: %s",sqlite3_errmsg(handle));
|
||||
return 0;
|
||||
}
|
||||
|
||||
rc = sqlite3_initialize();
|
||||
if (rc!=SQLITE_OK){
|
||||
cw_log(LOG_ERR,"Error initializing SQLite3 DB : %s",sqlite3_errmsg(handle));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
rc = sqlite3_open(filename,&handle);
|
||||
if (rc != SQLITE_OK)
|
||||
{
|
||||
cw_log(LOG_ERR,"Error opening SQLite3 DB %s: %s",filename,sqlite3_errmsg(handle));
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char * cmd = init_tables;
|
||||
rc = sqlite3_exec(handle,cmd,0,0,0);
|
||||
if (rc)
|
||||
{
|
||||
const char *em = sqlite3_errmsg(handle);
|
||||
cw_log(LOG_ERR,"Error executing SQL \"%s\"\nSQL Error Message: %s",cmd, em);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static sqlite3_stmt * ping_stmt;
|
||||
static sqlite3_stmt * put_wtp_prop_stmt;
|
||||
|
||||
|
||||
static sqlite3_stmt * get_tasks_stmt;
|
||||
|
||||
static sqlite3_stmt * stmt_get_radio_tasks;
|
||||
|
||||
static sqlite3_stmt * stmt_ping_wtp;
|
||||
static sqlite3_stmt * stmt_put_radio_prop;
|
||||
|
||||
int db_start()
|
||||
{
|
||||
cw_dbg(DBG_INFO,"Starting Sqlite3 DB");
|
||||
|
||||
const char *sql="";
|
||||
|
||||
sqlite3_stmt *stmt;
|
||||
int rc = sqlite3_prepare_v2(handle, "INSERT OR REPLACE INTO acs (acid,acname) VALUES (?,?);",-1,&stmt,0);
|
||||
if (rc)
|
||||
goto errX;
|
||||
|
||||
rc = sqlite3_bind_text(stmt,1,conf_acid,-1,SQLITE_STATIC);
|
||||
|
||||
rc = sqlite3_bind_text(stmt,2,conf_acname,-1,SQLITE_STATIC);
|
||||
|
||||
sqlite3_step(stmt);
|
||||
|
||||
rc = sqlite3_prepare_v2(handle, "UPDATE acs SET lastseen=datetime('now') WHERE acid=?;",-1,&ping_stmt,0);
|
||||
rc = sqlite3_bind_text(ping_stmt,1,conf_acid,-1,SQLITE_STATIC);
|
||||
|
||||
|
||||
/* Prepare statement to update a WTP property */
|
||||
sql = "INSERT OR REPLACE INTO wtpprops\
|
||||
(wtpid,id,sub_id,val,upd)\
|
||||
VALUES (?,?,?,?,?)";
|
||||
|
||||
rc = sqlite3_prepare_v2(handle, sql,-1, &put_wtp_prop_stmt,0);
|
||||
if (rc)
|
||||
goto errX;
|
||||
|
||||
|
||||
sql = "INSERT OR REPLACE INTO radios\
|
||||
(wtpid,rid,key,sub_key,val,upd)\
|
||||
VALUES (?,?,?,?,?,0)";
|
||||
|
||||
rc = sqlite3_prepare_v2(handle, sql,-1, &stmt_put_radio_prop,0);
|
||||
if (rc)
|
||||
goto errX;
|
||||
|
||||
|
||||
/* Prepare WTP ping statement */
|
||||
sql = "INSERT OR REPLACE INTO wtps (wtpid,acid,lastseen) VALUES(?,?,datetime('now'))";
|
||||
rc = sqlite3_prepare_v2(handle, sql,-1, &stmt_ping_wtp,0);
|
||||
if (rc)
|
||||
goto errX;
|
||||
|
||||
|
||||
|
||||
sql = "SELECT wtpid,id,sub_id,val FROM wtpprops WHERE upd>0 AND wtpid=?";
|
||||
rc = sqlite3_prepare_v2(handle, sql,-1, &get_tasks_stmt,0);
|
||||
if (rc)
|
||||
goto errX;
|
||||
|
||||
|
||||
sql = "SELECT wtpid,rid,key,sub_key,val FROM radios WHERE upd>0 AND wtpid=?";
|
||||
rc = sqlite3_prepare_v2(handle, sql,-1, &stmt_get_radio_tasks,0);
|
||||
if (rc)
|
||||
goto errX;
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
|
||||
errX:
|
||||
cw_log(LOG_ERR,"Fatal: Can't start Sqlite3 DB, Error while executing '%s' - %d - %s",sql,rc,sqlite3_errmsg(handle));
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void db_put_radio_prop(const char *wtp_id,const char *rid, const char * key,const char *sub_key,const char * val)
|
||||
{
|
||||
int rc=0;
|
||||
|
||||
/*// DBGX("Putting %s/%s:%s",id,sub_id,val);
|
||||
// (wtpid,rid,key,sub_key,val,upd)
|
||||
*/
|
||||
sqlite3_reset(stmt_put_radio_prop);
|
||||
sqlite3_clear_bindings(stmt_put_radio_prop);
|
||||
|
||||
if(sqlite3_bind_text(stmt_put_radio_prop,1,wtp_id,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
if(sqlite3_bind_text(stmt_put_radio_prop,2,rid,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
|
||||
|
||||
if (sqlite3_bind_text(stmt_put_radio_prop,3,key,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
|
||||
/* if (!sub_key)
|
||||
sub_key=CW_ITEM_NONE;
|
||||
*/
|
||||
if (sqlite3_bind_text(stmt_put_radio_prop,4,sub_key,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
if (sqlite3_bind_text(stmt_put_radio_prop,5,val,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
|
||||
/*
|
||||
// if (sqlite3_bind_int(put_wtp_prop_stmt,5,0))
|
||||
// goto errX;
|
||||
|
||||
// cw_dbg(DBG_X,"Her I am already, next is step");
|
||||
*/
|
||||
rc = sqlite3_step(stmt_put_radio_prop);
|
||||
if (rc != SQLITE_DONE)
|
||||
goto errX;
|
||||
|
||||
/*
|
||||
// cw_dbg(DBG_X,"SQL schould be fine");
|
||||
*/
|
||||
return;
|
||||
errX:
|
||||
/*// cw_dbg (DBG_X, "Iam on err %d\n",rc);*/
|
||||
|
||||
|
||||
if (rc) {
|
||||
cw_log(LOG_ERR,"Can't update database with WTP props: %d - %s",
|
||||
rc,sqlite3_errmsg(handle));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void db_ping()
|
||||
{
|
||||
int rc = sqlite3_step(ping_stmt);
|
||||
if (rc!=SQLITE_DONE){
|
||||
cw_log(LOG_ERR,"Error: Can't ping database, error code %d - %s",rc,sqlite3_errmsg(handle));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void db_ping_wtp(const char *wtpid,const char *acid)
|
||||
{
|
||||
int rc=0;
|
||||
sqlite3_reset(stmt_ping_wtp);
|
||||
sqlite3_clear_bindings(stmt_ping_wtp);
|
||||
if(sqlite3_bind_text(stmt_ping_wtp,1,wtpid,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
if(sqlite3_bind_text(stmt_ping_wtp,2,acid,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
rc = sqlite3_step(stmt_ping_wtp);
|
||||
errX:
|
||||
if (rc!=SQLITE_DONE) {
|
||||
cw_log(LOG_ERR,"Can't ping database for WTP: %d - %s",
|
||||
rc,sqlite3_errmsg(handle));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void db_put_wtp_prop(const char *wtp_id,const char * id,const char *sub_id,const char * val)
|
||||
{
|
||||
int rc=0;
|
||||
|
||||
/*// DBGX("Putting %s/%s:%s",id,sub_id,val);
|
||||
*/
|
||||
|
||||
sqlite3_reset(put_wtp_prop_stmt);
|
||||
sqlite3_clear_bindings(put_wtp_prop_stmt);
|
||||
|
||||
if(sqlite3_bind_text(put_wtp_prop_stmt,1,wtp_id,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
if(sqlite3_bind_text(put_wtp_prop_stmt,2,id,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
/* if (!sub_id)
|
||||
sub_id=CW_ITEM_NONE;
|
||||
*/
|
||||
|
||||
if (sqlite3_bind_text(put_wtp_prop_stmt,3,sub_id,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
if (sqlite3_bind_text(put_wtp_prop_stmt,4,val,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
if (sqlite3_bind_int(put_wtp_prop_stmt,5,0))
|
||||
goto errX;
|
||||
|
||||
/*// cw_dbg(DBG_X,"Her I am already, next is step");
|
||||
*/
|
||||
rc = sqlite3_step(put_wtp_prop_stmt);
|
||||
if (rc != SQLITE_DONE)
|
||||
goto errX;
|
||||
|
||||
/*
|
||||
// cw_dbg(DBG_X,"SQL schould be fine");
|
||||
*/
|
||||
return;
|
||||
errX:
|
||||
/*// cw_dbg (DBG_X, "Iam on err %d\n",rc);*/
|
||||
|
||||
|
||||
if (rc) {
|
||||
cw_log(LOG_ERR,"Can't update database with WTP props: %d - %s",
|
||||
rc,sqlite3_errmsg(handle));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*// TODO XXXX*/
|
||||
mavl_t db_get_update_tasks(struct conn * conn,const char * wtpid)
|
||||
{
|
||||
/*
|
||||
sqlite3_reset(get_tasks_stmt);
|
||||
sqlite3_clear_bindings(get_tasks_stmt);
|
||||
|
||||
mavl_conststr_t r = mavl_create_conststr();
|
||||
if (!r)
|
||||
return NULL;
|
||||
|
||||
|
||||
int rc=0;
|
||||
|
||||
|
||||
if(sqlite3_bind_text(get_tasks_stmt,1,wtpid,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
while (SQLITE_ROW == sqlite3_step(get_tasks_stmt)) {
|
||||
|
||||
int ii;
|
||||
//DBGX("-----------------------------------------------------","");
|
||||
for (ii=0; ii<5; ii++){
|
||||
|
||||
//DBGX("CVALL: %s",(const char*)sqlite3_column_text(get_tasks_stmt,ii));
|
||||
|
||||
|
||||
}
|
||||
|
||||
const char *id = (const char*)sqlite3_column_text(get_tasks_stmt,1);
|
||||
if (!id) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const char *sub_id = (const char*)sqlite3_column_text(get_tasks_stmt,2);
|
||||
|
||||
const char *val = (const char*)sqlite3_column_text(get_tasks_stmt,3);
|
||||
|
||||
//DBGX("ID: (%s), SubID (%s), Val (%s)",id,sub_id,val);
|
||||
|
||||
const struct cw_itemdef * cwi = cw_itemdef_get(conn->actions->items,id,sub_id);
|
||||
if (!cwi) {
|
||||
//DBGX("Not item definition found for: %s/%s",id,sub_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
//uint8_t data[2048];
|
||||
|
||||
if (!cwi->type->from_str) {
|
||||
cw_log(LOG_ERR,"Can't convert from string %s/%s - No method defined.",id,sub_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
mbag_item_t * i = cwi->type->from_str(val);
|
||||
i->id=cwi->id;
|
||||
|
||||
mbag_set(conn->outgoing,i);
|
||||
|
||||
mavl_add(r,(void*)cwi->id);
|
||||
}
|
||||
|
||||
if (r->count)
|
||||
return r;
|
||||
|
||||
mavl_destroy(r);
|
||||
return NULL;
|
||||
|
||||
|
||||
errX:
|
||||
if (rc) {
|
||||
cw_log(LOG_ERR,"Can't get tasks: %d - %s",
|
||||
rc,sqlite3_errmsg(handle));
|
||||
}
|
||||
|
||||
if (r)
|
||||
mavl_destroy(r);
|
||||
|
||||
|
||||
return NULL;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
mavl_t db_get_radio_tasks(struct conn * conn,const char * wtpid)
|
||||
{
|
||||
/*
|
||||
//cw_dbg(DBG_X,"Get Radio Tasks for %s",wtpid);
|
||||
|
||||
sqlite3_reset(stmt_get_radio_tasks);
|
||||
sqlite3_clear_bindings(stmt_get_radio_tasks);
|
||||
|
||||
mavl_conststr_t r = mavl_create_conststr();
|
||||
if (!r)
|
||||
return NULL;
|
||||
|
||||
|
||||
int rc=0;
|
||||
|
||||
|
||||
if(sqlite3_bind_text(stmt_get_radio_tasks,1,wtpid,-1,SQLITE_STATIC))
|
||||
goto errX;
|
||||
|
||||
while (SQLITE_ROW == sqlite3_step(stmt_get_radio_tasks)) {
|
||||
|
||||
int ii;
|
||||
//DBGX("-----------------------------------------------------","");
|
||||
for (ii=0; ii<6; ii++){
|
||||
|
||||
DBGX("CVALL: %s",(const char*)sqlite3_column_text(stmt_get_radio_tasks,ii));
|
||||
|
||||
|
||||
}
|
||||
const char *strrid= (const char*)sqlite3_column_text(stmt_get_radio_tasks,1);
|
||||
|
||||
const char *id = (const char*)sqlite3_column_text(stmt_get_radio_tasks,2);
|
||||
if (!id) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const char *sub_id = (const char*)sqlite3_column_text(stmt_get_radio_tasks,3);
|
||||
|
||||
const char *val = (const char*)sqlite3_column_text(stmt_get_radio_tasks,4);
|
||||
|
||||
//DBGX("ID: (%s), SubID (%s), Val (%s)",id,sub_id,val);
|
||||
|
||||
const struct cw_itemdef * cwi = cw_itemdef_get(conn->actions->radioitems,id,sub_id);
|
||||
if (!cwi) {
|
||||
DBGX("No item definition found for: %s/%s",id,sub_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (!cwi->type->from_str) {
|
||||
cw_log(LOG_ERR,"Can't convert from string %s/%s - No method defined.",id,sub_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
mbag_item_t * i = cwi->type->from_str(val);
|
||||
i->id=cwi->id;
|
||||
|
||||
int rid = atoi(strrid);
|
||||
cw_dbg(DBG_X,"RID: %d",rid);
|
||||
|
||||
|
||||
mbag_t radio = mbag_i_get_mbag_c(conn->radios_upd,rid,mbag_create);
|
||||
mbag_set(radio,i);
|
||||
|
||||
|
||||
//mbag_set(conn->outgoing,i);
|
||||
|
||||
mavl_add(r,(void*)cwi->id);
|
||||
}
|
||||
|
||||
if (r->count)
|
||||
return r;
|
||||
|
||||
mavl_destroy(r);
|
||||
return NULL;
|
||||
|
||||
|
||||
errX:
|
||||
if (rc) {
|
||||
cw_log(LOG_ERR,"Can't get tasks: %d - %s",
|
||||
rc,sqlite3_errmsg(handle));
|
||||
}
|
||||
|
||||
if (r)
|
||||
mavl_destroy(r);
|
||||
|
||||
|
||||
return NULL;
|
||||
*/
|
||||
}
|
||||
|
||||
|
21
src/ac/db.h
21
src/ac/db.h
@ -1,21 +0,0 @@
|
||||
#ifndef CW_MAVL_H
|
||||
#define CW_MAVL_H
|
||||
|
||||
#include "mavl.h"
|
||||
|
||||
extern void db_ping();
|
||||
extern void db_ping_wtp(const char *wtpid,const char *acid);
|
||||
|
||||
extern int db_init();
|
||||
int db_start();
|
||||
int db_get_tasks(struct conn * conn,const char * wtpid);
|
||||
void db_put_wtp_prop(const char *wtp_id,const char * id,const char *sub_id,const char * val);
|
||||
mavl_t db_get_update_tasks(struct conn * conn,const char * wtpid);
|
||||
|
||||
void db_put_radio_prop(const char *wtp_id,const char *rid, const char * key,const char *sub_key,const char * val);
|
||||
extern mavl_t db_get_radio_tasks(struct conn * conn,const char * wtpid);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,29 +0,0 @@
|
||||
|
||||
|
||||
#include "module.h"
|
||||
|
||||
|
||||
static int init()
|
||||
{
|
||||
// regn = cw_register_actions_cipwap_ac(&capwap_actions);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static struct ac_module module = {
|
||||
.name="Cipwap",
|
||||
.init= init,
|
||||
.detect_by_discovery = 0
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
struct ac_module * mod_cipwap()
|
||||
{
|
||||
|
||||
return &module;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
#ifndef __MODULE_H
|
||||
#define __MODULE_H
|
||||
|
||||
struct ac_module
|
||||
{
|
||||
const char *name;
|
||||
int (*init)();
|
||||
int (*detect_by_raw)(const char *msg, int len);
|
||||
int (*detect_by_discovery)(const char*);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -374,44 +374,6 @@ static void *wtpman_main(void *arg)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* dtls is established, goto join state */
|
||||
/*
|
||||
conn->capwap_state = CAPWAP_STATE_JOIN;
|
||||
if (!wtpman_join(wtpman)) {
|
||||
wtpman_remove(wtpman);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
cw_dbg(DBG_INFO, "WTP from %s has joined with session id: %s",
|
||||
sock_addr2str_p(&conn->addr, sock_buf),
|
||||
format_bin2hex(conn->session_id, 16));
|
||||
|
||||
*/
|
||||
|
||||
exit(0);
|
||||
|
||||
return NULL;
|
||||
@ -433,20 +395,7 @@ void wtpman_destroy(struct wtpman *wtpman)
|
||||
|
||||
static void copy(struct cw_ElemHandlerParams * params)
|
||||
{
|
||||
// struct wtpman * wtpman;
|
||||
//struct cw_Conn * conn;
|
||||
//wtpman = (struct wtpman*)params->conn->data;
|
||||
//conn = (struct cw_Conn*)params->conn;
|
||||
|
||||
|
||||
// cw_dbg(DBG_X,"------------- Here is the config we ve got from WTP ---------------- ");
|
||||
// cw_cfg_dump(params->cfg);
|
||||
// cw_dbg(DBG_X,"------------- This was the config we ve got from WTP ---------------- ");
|
||||
// cw_dbg(DBG_X,"Now copying:");
|
||||
// cw_cfg_copy(params->cfg,conn->local_cfg,0,"");
|
||||
cw_cfg_copy(params->cfg, params->conn->remote_cfg,DBG_CFG_UPDATES,"GlobalCfg");
|
||||
|
||||
// cw_dbg(DBG_X,"Copying done.");
|
||||
}
|
||||
|
||||
static int discovery_cb(struct cw_ElemHandlerParams * params, uint8_t * elems_ptr, int elems_len)
|
||||
@ -499,6 +448,8 @@ static int update_cb(struct cw_ElemHandlerParams * params, uint8_t * elems_ptr,
|
||||
static int event_cb(struct cw_ElemHandlerParams * params, uint8_t * elems_ptr, int elems_len)
|
||||
{
|
||||
struct cw_Conn * conn = (struct cw_Conn*)params->conn;
|
||||
struct wtpman * wtpman = (struct wtpman *)conn->data;
|
||||
|
||||
char filename[200];
|
||||
|
||||
|
||||
@ -507,9 +458,8 @@ static int event_cb(struct cw_ElemHandlerParams * params, uint8_t * elems_ptr, i
|
||||
copy(params);
|
||||
|
||||
const char * wtpname = cw_cfg_get(conn->remote_cfg,"capwap/wtp-name","default");
|
||||
sprintf(filename,"wtp-event-%s.ckv",wtpname);
|
||||
cw_cfg_save(filename,conn->remote_cfg,NULL);
|
||||
//stop();
|
||||
sprintf(filename,"wtp-event-%d-%s.ckv",wtpman->ctr++,wtpname);
|
||||
cw_cfg_save(filename,params->cfg,NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -530,6 +480,8 @@ struct wtpman *wtpman_create(int socklistindex, struct sockaddr *srcaddr,
|
||||
if (!wtpman)
|
||||
return 0;
|
||||
|
||||
wtpman->ctr=0;
|
||||
|
||||
if (socklist[socklistindex].type != SOCKLIST_UNICAST_SOCKET) {
|
||||
|
||||
int port = sock_getport(&socklist[socklistindex].addr);
|
||||
|
@ -41,7 +41,7 @@ struct wtpman {
|
||||
cw_Cfg_t * wtp_cfg;
|
||||
|
||||
|
||||
|
||||
int ctr;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -18,13 +18,11 @@ CWSRC=\
|
||||
cw_in_capwap_local_ipv4_address.c\
|
||||
cw_in_capwap_local_ipv6_address.c\
|
||||
cw_in_generic_with_index.c\
|
||||
cw_in_radio_generic_struct.c\
|
||||
cw_in_idx_generic.c\
|
||||
cw_in_idx_generic_struct.c\
|
||||
cw_in_generic_indexed_enum.c\
|
||||
cw_out_generic_indexed_enum.c\
|
||||
cw_in_generic_enum.c\
|
||||
cw_out_generic_struct.c\
|
||||
cw_out_idx_generic_struct.c\
|
||||
cw_init_data_keep_alive_msg.c\
|
||||
cw_inline.c\
|
||||
@ -37,7 +35,6 @@ CWSRC=\
|
||||
cw_put_elem_radio_operational_state.c\
|
||||
cw_put_image_data.c\
|
||||
cw_put_local_ip_address.c\
|
||||
cw_radio_set_admin_state.c\
|
||||
cw_rand.c\
|
||||
cw_randint.c\
|
||||
cw_read_ac_descriptor.c\
|
||||
@ -66,7 +63,6 @@ CWSRC=\
|
||||
cw_write_radio_element.c\
|
||||
cw_detect_nat.c\
|
||||
cw_read_from.c \
|
||||
cw_in_generic_struct.c\
|
||||
|
||||
# cw_in_check_disc_req.c\
|
||||
# cw_in_check_img_data_req_ac.c\
|
||||
@ -77,46 +73,15 @@ CWSRC=\
|
||||
# cw_out_generic.c\
|
||||
#
|
||||
# cw_process_element.c\
|
||||
# cw_out_generic_struct.c\
|
||||
cw_in_radio_generic_struct.c\
|
||||
cw_in_generic_struct.c\
|
||||
cw_radio_set_admin_state.c\
|
||||
|
||||
KTVSRC=\
|
||||
cfg.c\
|
||||
|
||||
|
||||
# cw_ktv_add.c\
|
||||
cw_ktv_idx_get.c\
|
||||
cw_ktv_mavlcmp.c\
|
||||
cw_ktv_mavlcmp_type_by_name.c\
|
||||
cw_ktv_mavldel.c\
|
||||
|
||||
|
||||
# cw_ktv_parser.c\
|
||||
# cw_ktv_del_sub.c\
|
||||
# cw_ktv_base_exists.c\
|
||||
cw_ktv_add_from_str.c\
|
||||
cw_ktv_read_file.c\
|
||||
cw_ktv_readline.c\
|
||||
cw_ktv_save.c\
|
||||
cw_ktv_std_types.c\
|
||||
cw_ktv_read_struct.c\
|
||||
cw_ktv_write_struct.c\
|
||||
|
||||
# cw_ktv_get_byte.c\
|
||||
cw_ktv_get_bool.c\
|
||||
cw_ktv_get_bstr16.c\
|
||||
cw_ktv_set_byte.c\
|
||||
cw_ktv_set_word.c\
|
||||
cw_ktv_set_dword.c\
|
||||
|
||||
# cw_ktv_get_word.c\
|
||||
cw_ktv_get_dword.c\
|
||||
cw_ktv_get_sysptr.c\
|
||||
cw_ktv_get_str.c\
|
||||
|
||||
# cw_ktv_cast.c\
|
||||
cw_ktv_replace.c\
|
||||
cw_ktv_get.c\
|
||||
|
||||
|
||||
LWSRC=\
|
||||
lw_addelem.c\
|
||||
lw_checksum.c\
|
||||
|
10
src/cw/cfg.c
10
src/cw/cfg.c
@ -80,7 +80,13 @@ static void del(void *ptr)
|
||||
free((void *) e->val);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create an empty cfg
|
||||
* @return A pointer to the cfg or NULL if an error has accoured.
|
||||
*
|
||||
* In case of an error consult errno to find out the reason.
|
||||
* The created config must be freed by #cw_cfg_destroy.
|
||||
*/
|
||||
cw_Cfg_t *cw_cfg_create()
|
||||
{
|
||||
cw_Cfg_t * cfg;
|
||||
@ -88,6 +94,7 @@ cw_Cfg_t *cw_cfg_create()
|
||||
if (cfg == NULL)
|
||||
return NULL;
|
||||
memset(cfg,0,sizeof(cw_Cfg_t));
|
||||
cfg->name = CW_CFG_DEFAULT_NAME;
|
||||
cfg->cfg = mavl_create(cmp, del, sizeof(struct cw_Cfg_entry));
|
||||
if (cfg->cfg==NULL){
|
||||
cw_cfg_destroy(cfg);
|
||||
@ -682,7 +689,6 @@ void cw_cfg_set_int(cw_Cfg_t * cfg, const char * key, int val)
|
||||
}
|
||||
|
||||
|
||||
|
||||
int cw_cfg_get_next_index(cw_Cfg_t * cfg, const char *key)
|
||||
{
|
||||
char ikey[CW_CFG_MAX_KEY_LEN];
|
||||
|
44
src/cw/cfg.h
44
src/cw/cfg.h
@ -5,28 +5,53 @@
|
||||
#include "val.h"
|
||||
#include "bstr.h"
|
||||
|
||||
#define CW_CFG_MAX_KEY_LEN 1024
|
||||
|
||||
/**
|
||||
*@file
|
||||
*@brief
|
||||
*@defgroup CFG SOCK
|
||||
*@{
|
||||
*/
|
||||
|
||||
|
||||
/** Maximum size of a key used in cfg objects */
|
||||
#define CW_CFG_MAX_KEY_LEN 1024
|
||||
|
||||
/** Default name for fresh cfg's created by #cw_cfg_create */
|
||||
#define CW_CFG_DEFAULT_NAME "[anonymous]"
|
||||
|
||||
|
||||
/**
|
||||
* A Cfg object
|
||||
*/
|
||||
struct cw_Cfg {
|
||||
struct mavl * cfg;
|
||||
const char *name;
|
||||
struct mavl * cfg; /**< The AVL-tree containig the keys
|
||||
and vals */
|
||||
const char *name; /**< A name for this config object */
|
||||
int dbg_level;
|
||||
const char *dbg_prefix;
|
||||
};
|
||||
|
||||
typedef struct cw_Cfg cw_Cfg_t;
|
||||
|
||||
|
||||
/**
|
||||
* An antry for a Cfg object
|
||||
*/
|
||||
struct cw_Cfg_entry{
|
||||
const char *key; /**< A string representing the key
|
||||
of this entry */
|
||||
const char *val; /**< The value, represented by a string */
|
||||
};
|
||||
|
||||
|
||||
|
||||
cw_Cfg_t * cw_cfg_create();
|
||||
int cw_cfg_set(cw_Cfg_t *cfg,const char *key, const char *val);
|
||||
void cw_cfg_dump(cw_Cfg_t *cfg);
|
||||
int cw_cfg_read_from_file(FILE * file, cw_Cfg_t * cfg);
|
||||
int cw_cfg_load(const char *filename,cw_Cfg_t * cfg);
|
||||
|
||||
struct cw_Cfg_entry{
|
||||
const char *key;
|
||||
const char *val;
|
||||
};
|
||||
|
||||
|
||||
struct cw_Cfg_iter{
|
||||
struct mavliter it;
|
||||
@ -74,3 +99,6 @@ int cw_cfg_set_val(cw_Cfg_t * cfg, const char *key, const struct cw_Type *t, con
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
|
||||
#include "capwap.h"
|
||||
#include "msgset.h"
|
||||
#include "val.h"
|
||||
#include "log.h"
|
||||
#include "dbg.h"
|
||||
|
||||
int cw_in_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHandlerParams * params,
|
||||
uint8_t * elem_data, int elem_len)
|
||||
{
|
||||
cw_dbg(DBG_X,"STRUCT KEY: %s",handler->key);
|
||||
stop();
|
||||
/* const char * key;
|
||||
char tmpkey[CW_CFG_MAX_KEY_LEN];
|
||||
|
||||
|
||||
if (handler->mkkey != NULL){
|
||||
handler->mkkey(key,elem_data,elem_len, tmpkey);
|
||||
key = tmpkey;
|
||||
}
|
||||
else{
|
||||
key = handler->key;
|
||||
}
|
||||
|
||||
//printf("CW_IN_GENERIC STRUCT: %s\n",key);
|
||||
|
||||
|
||||
if (!handler->type){
|
||||
cw_log(LOG_ERR,"Can't handle element: %s, no type defined",handler->name);
|
||||
return CAPWAP_RESULT_UNRECOGNIZED_MESSAGE_ELEMENT;
|
||||
}
|
||||
|
||||
cw_ktv_read_struct(params->cfg,handler->type,key,elem_data,elem_len);
|
||||
*/
|
||||
return CAPWAP_RESULT_SUCCESS;
|
||||
}
|
@ -10,12 +10,14 @@
|
||||
int cw_in_idx_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHandlerParams * params,
|
||||
uint8_t * elem_data, int elem_len)
|
||||
{
|
||||
stop();
|
||||
|
||||
/*
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
int idx;
|
||||
|
||||
|
||||
cw_dbg(DBG_X,"Fix cw_in_idx_generic_struct");
|
||||
stop();
|
||||
|
||||
if (!handler->type){
|
||||
cw_log(LOG_ERR,"Can't handle element: %s, no type defined",handler->name);
|
||||
@ -26,6 +28,6 @@ int cw_in_idx_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHand
|
||||
sprintf(key, handler->key, idx);
|
||||
|
||||
cw_ktv_read_struct(params->cfg,handler->type,key,elem_data+1,elem_len-1);
|
||||
|
||||
*/
|
||||
return CAPWAP_RESULT_SUCCESS;
|
||||
}
|
||||
|
@ -1,48 +0,0 @@
|
||||
#include "capwap.h"
|
||||
#include "msgset.h"
|
||||
#include "val.h"
|
||||
#include "log.h"
|
||||
#include "cw.h"
|
||||
|
||||
#include "dbg.h"
|
||||
|
||||
|
||||
int cw_out_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHandlerParams * params
|
||||
, uint8_t * dst)
|
||||
{
|
||||
cw_dbg(DBG_X,"Key: %s",handler->key);
|
||||
stop();
|
||||
|
||||
|
||||
int start;
|
||||
int len;
|
||||
cw_Val_t search, *result;
|
||||
|
||||
if (!handler->type){
|
||||
cw_log(LOG_ERR,"Can't handle element: %s, no type defined",handler->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
search.key = (char*)handler->key;
|
||||
result = mavl_get_first(params->cfg,&search);
|
||||
if (result == NULL ){
|
||||
if (params->elemdata->mand)
|
||||
cw_log(LOG_ERR,"Can't put mandatory message element %s, no data available",handler->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strncmp(result->key,handler->key, strlen(handler->key))!=0){
|
||||
if (params->elemdata->mand)
|
||||
cw_log(LOG_ERR,"Can't put mandatory message element %s, no data available",handler->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
start = params->msgset->header_len(handler);
|
||||
|
||||
len = cw_ktv_write_struct(params->cfg,
|
||||
params->cfg,
|
||||
handler->type,handler->key,dst+start);
|
||||
|
||||
return params->msgset->write_header(handler,dst,len);
|
||||
|
||||
}
|
@ -7,7 +7,7 @@ int cw_out_idx_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHan
|
||||
{
|
||||
|
||||
stop();
|
||||
|
||||
/*
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
struct cw_Val * elem, search;
|
||||
int i;
|
||||
@ -26,7 +26,7 @@ int cw_out_idx_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHan
|
||||
|
||||
sprintf(key,handler->key,i);
|
||||
search.key=key;
|
||||
/*elem = mavl_get(params->conn->local_cfg, &search);*/
|
||||
/ * elem = mavl_get(params->conn->local_cfg, &search); * /
|
||||
elem = mavl_get_first(params->cfg,&search);
|
||||
if(elem != NULL){
|
||||
printf("Elem key: %s\n",elem->key);
|
||||
@ -55,14 +55,16 @@ int cw_out_idx_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHan
|
||||
|
||||
|
||||
|
||||
/* radios = cw_ktv_get_byte(params->conn->local_cfg,"wtp-descriptor/max-radios",0);
|
||||
/ * radios = cw_ktv_get_byte(params->conn->local_cfg,"wtp-descriptor/max-radios",0);
|
||||
|
||||
for(i=1;i<radios+1;i++){
|
||||
l = cw_write_radio_element(handler,params,i,dst+len);
|
||||
cw_dbg_elem(DBG_ELEM_OUT,params->conn,params->msgdata->type,handler,dst,l);
|
||||
len+=l;
|
||||
}
|
||||
*/
|
||||
* /
|
||||
|
||||
return mdst-dst;
|
||||
*/ return 0;
|
||||
}
|
||||
|
||||
|
@ -233,6 +233,10 @@ int cw_decode_element(struct cw_ElemHandlerParams *params, int proto,
|
||||
|
||||
/* check the length of the message */
|
||||
if (len < handler->min_len) {
|
||||
if (!handler->flags || cw_dbg_is_level(DBG_ELEM_VNDR))
|
||||
cw_dbg_elem(params->dbg_level, NULL, params->msgdata->type, handler,
|
||||
data, len);
|
||||
|
||||
cw_dbg(DBG_ELEM_ERR,
|
||||
"%d (%s) message element too short, len=%d, min len=%d",
|
||||
handler->id, handler->name, len, handler->min_len);
|
||||
@ -246,6 +250,10 @@ int cw_decode_element(struct cw_ElemHandlerParams *params, int proto,
|
||||
|
||||
|
||||
if (len > handler->max_len && handler->max_len) {
|
||||
if (!handler->flags || cw_dbg_is_level(DBG_ELEM_VNDR))
|
||||
cw_dbg_elem(params->dbg_level, NULL, params->msgdata->type, handler,
|
||||
data, len);
|
||||
|
||||
cw_dbg(DBG_ELEM_ERR,
|
||||
"%d (%s) message element too big, len=%d, max len=%d",
|
||||
handler->id, handler->name, len, handler->max_len);
|
||||
|
@ -1,51 +0,0 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __RADIOINFO_H
|
||||
#define __RADIOINFO_H
|
||||
|
||||
#include "bstr.h"
|
||||
|
||||
|
||||
struct radioinfo{
|
||||
char set;
|
||||
int rid;
|
||||
uint32_t type;
|
||||
int admin_state;
|
||||
int state;
|
||||
int cause;
|
||||
bstr_t rmac;
|
||||
|
||||
uint16_t regDomain;
|
||||
|
||||
uint8_t country_str[4];
|
||||
uint8_t country_str2[4];
|
||||
|
||||
int cfp_period;
|
||||
int cfp_max_duration;
|
||||
int beacon_period;
|
||||
int dtim_period;
|
||||
int max_bssid;
|
||||
int occupancy_limit;
|
||||
|
||||
bstr_t bssid;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@ -1,89 +0,0 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief bstr_create_from_cfgstr function
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "bstr.h"
|
||||
|
||||
|
||||
/**
|
||||
* Create a bstr16_t string from a string read from config file.
|
||||
*
|
||||
* @param s String from config file.
|
||||
* @return The create bstr_t string.
|
||||
*
|
||||
* The string from config file is an ASCII-text which is interpreted
|
||||
* as hexadecimal string if it starts with ".x"
|
||||
*
|
||||
* @see bstr16_t
|
||||
*/
|
||||
uint8_t * bstr16_create_from_cfgstr(const char * s)
|
||||
{
|
||||
int l = strlen(s);
|
||||
|
||||
|
||||
if (s[0]!='.')
|
||||
return bstr16_create((uint8_t*)s,l);
|
||||
|
||||
if (l<=2)
|
||||
return bstr16_create((uint8_t*)s,l);
|
||||
|
||||
if (s[1]=='.')
|
||||
return bstr16_create((uint8_t*)s+1,l-1);
|
||||
|
||||
if (s[1]=='x'){
|
||||
uint8_t * ns=0;
|
||||
int len=0;
|
||||
|
||||
int ch,cl;
|
||||
const char *ss = s+2;
|
||||
int rc ;
|
||||
do {
|
||||
rc = sscanf(ss,"%01X",&ch);
|
||||
if (rc!=1)
|
||||
break;
|
||||
ss++;
|
||||
rc = sscanf(ss,"%01X",&cl);
|
||||
if (rc!=1)
|
||||
cl=0;
|
||||
ss++;
|
||||
int c=(ch<<4) | cl;
|
||||
|
||||
len++;
|
||||
ns = realloc(ns,len);
|
||||
ns[len-1]=c;
|
||||
|
||||
|
||||
}while (rc==1);
|
||||
|
||||
|
||||
return bstr16_create(ns,len);
|
||||
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1,67 +0,0 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "bstr.h"
|
||||
|
||||
|
||||
/**
|
||||
* Create a bstr1616_t string from a string read from config file.
|
||||
*
|
||||
* @param s String from config file.
|
||||
* @return The create bstr16_t string.
|
||||
*
|
||||
* The string from config file is an ASCII-text which is interpreted
|
||||
* as hexadecimal string if it starts with ".x"
|
||||
*
|
||||
* @see bstr16_t
|
||||
*/
|
||||
uint8_t * bstr16cfgstr(const char * s)
|
||||
{
|
||||
int l = strlen(s);
|
||||
|
||||
|
||||
if (s[0]!='.')
|
||||
return bstr16_create((uint8_t*)s,l);
|
||||
|
||||
if (l<=2)
|
||||
return bstr16_create((uint8_t*)s,l);
|
||||
|
||||
if (s[1]=='.')
|
||||
return bstr16_create((uint8_t*)s+1,l-1);
|
||||
|
||||
if (s[1]=='x'){
|
||||
uint8_t * ns=0;
|
||||
int len=0;
|
||||
|
||||
int ch,cl;
|
||||
const char *ss = s+2;
|
||||
int rc ;
|
||||
do {
|
||||
rc = sscanf(ss,"%01X",&ch);
|
||||
if (rc!=1)
|
||||
break;
|
||||
ss++;
|
||||
rc = sscanf(ss,"%01X",&cl);
|
||||
if (rc!=1)
|
||||
cl=0;
|
||||
ss++;
|
||||
int c=(ch<<4) | cl;
|
||||
|
||||
len++;
|
||||
ns = realloc(ns,len);
|
||||
ns[len-1]=c;
|
||||
|
||||
|
||||
}while (rc==1);
|
||||
|
||||
|
||||
return bstr16_create(ns,len);
|
||||
|
||||
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1,90 +0,0 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief bstr_create_from_cfgstr function
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "bstr.h"
|
||||
|
||||
|
||||
/**
|
||||
* Create a bstr_t string from a string read from config file.
|
||||
*
|
||||
* @param s String from config file.
|
||||
* @return The create bstr_t string.
|
||||
*
|
||||
* The string from config file is an ASCII-text which is interpreted
|
||||
* as hexadecimal string if it starts with ".x"
|
||||
*
|
||||
* @see bstr_t
|
||||
*/
|
||||
uint8_t * bstr_create_from_cfgstr(const char * s)
|
||||
{
|
||||
int l = strlen(s);
|
||||
|
||||
|
||||
if (s[0]!='.')
|
||||
return bstr_create((uint8_t*)s,l);
|
||||
|
||||
if (l<=2)
|
||||
return bstr_create((uint8_t*)s,l);
|
||||
|
||||
if (s[1]=='.')
|
||||
return bstr_create((uint8_t*)s+1,l-1);
|
||||
|
||||
if (s[1]=='x'){
|
||||
uint8_t * ns=0;
|
||||
int len=0;
|
||||
|
||||
int ch,cl;
|
||||
const char *ss = s+2;
|
||||
int rc ;
|
||||
do {
|
||||
rc = sscanf(ss,"%01X",&ch);
|
||||
if (rc!=1)
|
||||
break;
|
||||
ss++;
|
||||
rc = sscanf(ss,"%01X",&cl);
|
||||
if (rc!=1)
|
||||
cl=0;
|
||||
ss++;
|
||||
int c=(ch<<4) | cl;
|
||||
|
||||
len++;
|
||||
ns = realloc(ns,len);
|
||||
ns[len-1]=c;
|
||||
|
||||
|
||||
}while (rc==1);
|
||||
|
||||
|
||||
return bstr_create(ns,len);
|
||||
|
||||
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1,38 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "bstr.h"
|
||||
#include "cw_util.h"
|
||||
|
||||
int bstr_to_str(char *dst, bstr_t str,char * def)
|
||||
{
|
||||
if (!str){
|
||||
if (!def)
|
||||
return 0;
|
||||
return sprintf(dst,"%s",def);
|
||||
}
|
||||
|
||||
int printable = cw_is_printable(bstr_data(str),bstr_len(str));
|
||||
int l=bstr_len(str);
|
||||
|
||||
if (printable){
|
||||
memcpy((char*)dst,bstr_data(str),l);
|
||||
*(dst+l)=0;
|
||||
return l;
|
||||
}
|
||||
|
||||
int i;
|
||||
int c=0;
|
||||
char *s = dst;
|
||||
for (i=0; i<l; i++){
|
||||
if (!c){
|
||||
|
||||
s += sprintf(s,"%02X",bstr_data(str)[i]);
|
||||
c=1;
|
||||
}
|
||||
else
|
||||
s += sprintf(s,",%02X",bstr_data(str)[i]);
|
||||
}
|
||||
|
||||
return s-dst;
|
||||
}
|
@ -1,126 +0,0 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "capwap80211_types.h"
|
||||
#include "dot11.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
static int to_str(void *item,char *dst)
|
||||
{
|
||||
mbag_item_t *it= item;
|
||||
|
||||
uint8_t *data = (uint8_t*)it->u2.data;
|
||||
int n=*data;
|
||||
data++;
|
||||
|
||||
char *d=dst;
|
||||
char *space="";
|
||||
int i;
|
||||
for (i=0; i<n; i++){
|
||||
int val = data[i];
|
||||
|
||||
|
||||
d+=sprintf(d,"%s",space);
|
||||
if (val & 0x80){
|
||||
d+=sprintf(d,"*");
|
||||
}
|
||||
|
||||
d+=sprintf(d,"%0.1f",dot11_rate2float(val & 0x7f));
|
||||
|
||||
space=" ";
|
||||
|
||||
}
|
||||
|
||||
return d-dst;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static struct mbag_item * from_str(const char *src)
|
||||
{
|
||||
mbag_item_t * item = mbag_item_new(CAPWAP80211_TYPE_RATESET);
|
||||
if (!item)
|
||||
return NULL;
|
||||
|
||||
if (strlen(src)==0)
|
||||
return 0;
|
||||
|
||||
uint8_t rates[64];
|
||||
int nrates =0;
|
||||
|
||||
const char *s = src;
|
||||
|
||||
while (*s!=0){
|
||||
while (*s==' ')
|
||||
s++;
|
||||
int m=0;
|
||||
if(*s=='*'){
|
||||
m=0x80;
|
||||
s++;
|
||||
}
|
||||
else{
|
||||
m=0;
|
||||
}
|
||||
|
||||
float val;
|
||||
int n=sscanf(s,"%f",&val);
|
||||
if (n!=1)
|
||||
break;
|
||||
|
||||
int r = dot11_float2rate(val) | m;
|
||||
|
||||
rates[nrates++]=r;
|
||||
|
||||
|
||||
while (*s!=0 && *s!=' ')
|
||||
s++;
|
||||
|
||||
}
|
||||
|
||||
uint8_t *data = malloc(nrates+1);
|
||||
*data=nrates;
|
||||
memcpy(data+1,rates,nrates);
|
||||
|
||||
item->u2.data=data;
|
||||
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
static struct mbag_item * get(const uint8_t *src,int len)
|
||||
{
|
||||
|
||||
mbag_item_t * item = mbag_item_new(CAPWAP80211_TYPE_RATESET);
|
||||
if (!item)
|
||||
return NULL;
|
||||
|
||||
uint8_t *data = malloc(len+1);
|
||||
if (!data){
|
||||
free (item);
|
||||
return NULL;
|
||||
}
|
||||
*data=len;
|
||||
memcpy(data+1,src,len);
|
||||
item->u2.data=data;
|
||||
return item;
|
||||
}
|
||||
|
||||
static int put(struct mbag_item *i,uint8_t *dst)
|
||||
{
|
||||
int l=*((uint8_t*)(i->u2.data));
|
||||
memcpy(dst,i->u2.data+1,l);
|
||||
return l;
|
||||
}
|
||||
|
||||
|
||||
const struct mbag_typedef capwap80211_type_rateset = {
|
||||
.name = "802.11 Rate Set",
|
||||
.del = free,
|
||||
.from_str = from_str,
|
||||
.to_str = to_str,
|
||||
.get = get,
|
||||
.put = put
|
||||
};
|
||||
*/
|
@ -1,59 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Add a Cisco AP Timesync message element to a buffer
|
||||
* @param dst destination buffer
|
||||
* @param time a unix timestamp
|
||||
* @param type of time
|
||||
* @return number of bytes put (5)
|
||||
*/
|
||||
/*
|
||||
int cw_put_cisco_ap_timesync(uint8_t * dst, time_t time, uint8_t type)
|
||||
{
|
||||
cw_put_dword(dst , time);
|
||||
cw_put_byte(dst + 4, type);
|
||||
return 5;
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
int cw_addelem_cisco_ap_regulatory_domain(uint8_t *dst, struct radioinfo * ri){
|
||||
uint8_t *d=dst+10;
|
||||
|
||||
d+=cw_put_byte(d,ri->rid); // Band ID
|
||||
d+=cw_put_byte(d,1); // Set True/False
|
||||
d+=cw_put_byte(d,ri->rid); // Slot ID
|
||||
d+=cw_put_word(d,ri->regDomain);
|
||||
return 5 + cw_put_elem_vendor_hdr(dst, CW_VENDOR_ID_CISCO, CW_CISCO_AP_REGULATORY_DOMAIN, 5);
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add a Cisco Certificate payload message element
|
||||
* @param dst destination buffer
|
||||
* @param src pointer to DER certificate
|
||||
* @param len length of certificate
|
||||
* @return number of bytes put
|
||||
*/
|
||||
/*
|
||||
int cw_addelem_cisco_certificate(uint8_t*dst,uint8_t*src,int len){
|
||||
int l = lw_put_certificate(dst+10,src,len);
|
||||
return l+cw_put_elem_vendor_hdr(dst,CW_VENDOR_ID_CISCO,CW_CISCO_CERTIFICATE,l);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
int cw_addelem_cisco_wtp_radio_cfg(uint8_t * dst,struct radioinfo *ri){
|
||||
int l = lw_put_80211_wtp_wlan_radio_configuration(dst+10,ri);
|
||||
return l+cw_put_elem_vendor_hdr(dst,CW_VENDOR_ID_CISCO,CW_CISCO_STATION_CFG,l);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
int cw_readelem_cisco_station_cfg(uint8_t *src,int len){
|
||||
|
||||
// lw_readelem_
|
||||
return 0;
|
||||
}
|
||||
*/
|
@ -1,175 +0,0 @@
|
||||
#include "capwap.h"
|
||||
|
||||
|
||||
|
||||
#include "radio.h"
|
||||
#include "log.h"
|
||||
#include "dbg.h"
|
||||
|
||||
/*
|
||||
int cw_put_cisco_wtp_radio_cfg(uint8_t *dst, int rid, mbag_t radio)
|
||||
{
|
||||
|
||||
cw_put_byte(dst,rid);
|
||||
|
||||
cw_put_byte(dst+1,0); //?
|
||||
cw_put_word(dst+2,mbag_get_word(radio,CW_RADIO_OCCUPANCY_LIMIT,12));
|
||||
cw_put_byte(dst+4,mbag_get_byte(radio,CW_RADIO_CFP_PERIOD,8));
|
||||
|
||||
cw_put_word(dst+5,mbag_get_word(radio,CW_RADIO_CFP_MAX_DURATION,200));
|
||||
|
||||
|
||||
bstr_t grmac = mbag_get_bstr(radio,CW_RADIO_BSSID,NULL);
|
||||
|
||||
//printf("GRMAC: %d\n",bstr_len(grmac));
|
||||
if ( grmac) {
|
||||
if (bstr_len(grmac)!=6){
|
||||
cw_log(LOG_ERR,"Wrong bssid size");
|
||||
exit(0);
|
||||
grmac =NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bstr_t rmac;
|
||||
|
||||
if (!grmac){
|
||||
uint8_t defrmac[]={0,0,0,0,0,0};
|
||||
rmac = bstr_create(defrmac,6);
|
||||
}
|
||||
else
|
||||
rmac = grmac;
|
||||
|
||||
|
||||
cw_put_bstr(dst+7,rmac);
|
||||
|
||||
if ( !grmac )
|
||||
free(rmac);
|
||||
|
||||
cw_put_word(dst+13,0); // beacon period
|
||||
|
||||
|
||||
cw_put_data(dst+15,mbag_get_raw(radio,CW_RADIO_COUNTRY_STRING,"DE "),3);
|
||||
cw_put_data(dst+18,mbag_get_raw(radio,CW_RADIO_COUNTRY_STRING,"DE "),3);
|
||||
|
||||
cw_put_byte(dst+21,10); // gPeriod
|
||||
|
||||
cw_put_dword(dst+22,0x3538); // ?
|
||||
|
||||
cw_put_word(dst+26,0);
|
||||
|
||||
return 26+2; //+cw_put_elem_vendor_hdr(dst,CW_VENDOR_ID_CISCO,CW_CISCO_WTP_RADIO_CFG,28);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
int cw_put_elem_cisco_ap_regulatory_domain(uint8_t *dst,int rid, mbag_t radio)
|
||||
{
|
||||
//int l=0;
|
||||
uint8_t *d=dst+10;
|
||||
|
||||
d+=cw_put_byte(d,rid); //Band ID
|
||||
d+=cw_put_byte(d,1); // Set True/False
|
||||
d+=cw_put_byte(d,rid); //* Slot ID
|
||||
d+=cw_put_word(d,mbag_get_word(radio,CW_RADIO_REG_DOMAIN,1));
|
||||
|
||||
return 5 + cw_put_elem_vendor_hdr(dst, CW_VENDOR_ID_CISCO, CW_CISCO_AP_REGULATORY_DOMAIN, 5);
|
||||
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
int cw_put_elem_cisco_radio_cfg(uint8_t * dst,int rid, mbag_t radio)
|
||||
{
|
||||
int l = cw_put_cisco_wtp_radio_cfg(dst+10,rid,radio);
|
||||
return l+cw_put_elem_vendor_hdr(dst,CW_VENDOR_ID_CISCO,CW_CISCO_WTP_RADIO_CFG,l);
|
||||
}
|
||||
|
||||
int cw_out_cisco_wtp_radio_cfg(struct conn *conn, struct cw_action_out *a, uint8_t * dst)
|
||||
{
|
||||
|
||||
int l=0;
|
||||
MAVLITER_DEFINE(it,conn->radios);
|
||||
mavliter_foreach(&it){
|
||||
struct mbag_item *i = mavliter_get(&it);
|
||||
if ( i->type != MBAG_MBAG ) {
|
||||
continue;
|
||||
}
|
||||
// l+=cw_put_elem_radio_info(dst+l,i->id,i->data);
|
||||
l+=cw_put_elem_cisco_radio_cfg(dst+l,i->u1.iid,i->u2.data);
|
||||
l+=cw_put_elem_cisco_ap_regulatory_domain(dst+l,i->u1.iid,i->u2.data);
|
||||
|
||||
}
|
||||
return l;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// MAVLITER_DEFINE
|
||||
// int l = cw_out_cisco_wtp_radio_cfg_(conn,a,dst,0);
|
||||
|
||||
// return l+cw_out_cisco_wtp_radio_cfg_(conn,a,dst+l,1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int cw_in_cisco_radio_cfg(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
||||
struct sockaddr *from)
|
||||
{
|
||||
|
||||
int rid = cw_get_byte(data);
|
||||
mbag_t radio = mbag_i_get_mbag(conn->radios,rid,NULL);
|
||||
if ( !radio){
|
||||
cw_dbg(DBG_ELEM_ERR,"Radio ID %d not defined",rid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// printf("Here we are %d\n",rid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int cw_radio_cisco_set_state(struct conn * conn, uint8_t *data, int len, int cause)
|
||||
{
|
||||
|
||||
int rid = cw_get_byte(data);
|
||||
int state = cw_get_byte(data+1);
|
||||
if (rid != 255)
|
||||
return cw_radio_set_admin_state(conn->radios,rid,state,cause);
|
||||
|
||||
|
||||
MAVLITER_DEFINE(it,conn->radios);
|
||||
mavliter_foreach(&it){
|
||||
mbag_item_t *i = mavliter_get(&it);
|
||||
cw_radio_set_admin_state(conn->radios,i->u1.iid,state,cause);
|
||||
|
||||
}
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
int cw_in_cisco_radio_administrative_state(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
||||
struct sockaddr *from)
|
||||
{
|
||||
return cw_radio_cisco_set_state(conn,data,len,-1);
|
||||
}
|
||||
|
||||
|
||||
int cw_in_cisco_radio_administrative_state_wtp(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
||||
struct sockaddr *from)
|
||||
{
|
||||
return cw_radio_cisco_set_state(conn,data,len,3);
|
||||
}
|
||||
|
||||
|
||||
*/
|
@ -1,33 +0,0 @@
|
||||
|
||||
#include "capwap.h"
|
||||
|
||||
#include "conn.h"
|
||||
|
||||
#include "mavl.h"
|
||||
|
||||
/*
|
||||
void conn_clear_upd(struct conn *conn, int merge)
|
||||
{
|
||||
if (merge){
|
||||
mavl_merge(conn->config, conn->config_upd);
|
||||
|
||||
MAVLITER_DEFINE (it,conn->radios_upd);
|
||||
|
||||
mavliter_foreach(&it){
|
||||
struct mbag_item * ruitem = mavliter_get(&it);
|
||||
mavl_t radio_upd = ruitem->u2.data;
|
||||
|
||||
mbag_t radio = mbag_i_get_mbag(conn->radios,ruitem->u1.iid,NULL);
|
||||
if (radio){
|
||||
mavl_merge(radio,radio_upd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
mavl_del_all(conn->config_upd);
|
||||
mavl_del_all(conn->radios_upd);
|
||||
|
||||
}
|
||||
|
||||
*/
|
@ -1,26 +0,0 @@
|
||||
#include "capwap.h"
|
||||
#include "cw.h"
|
||||
|
||||
int cw_addelem_cisco_wtp_radio_cfg(uint8_t*dst,struct radioinfo *ri)
|
||||
{
|
||||
cw_put_byte(dst+10,ri->rid);
|
||||
cw_put_byte(dst+10+1,0);
|
||||
cw_put_word(dst+10+2,ri->occupancy_limit);
|
||||
cw_put_byte(dst+10+4,ri->cfp_period);
|
||||
cw_put_word(dst+10+5,ri->cfp_max_duration);
|
||||
|
||||
/* XXX catch rmac shorter or longer than 6*/
|
||||
|
||||
cw_put_bstr(dst+10+7,ri->rmac); /* length MUST be 6 */
|
||||
|
||||
cw_put_word(dst+10+13,ri->beacon_period);
|
||||
cw_put_data(dst+10+15,ri->country_str,3);
|
||||
cw_put_data(dst+10+18,ri->country_str2,3);
|
||||
|
||||
cw_put_byte(dst+10+21,10); // gPeriod
|
||||
|
||||
cw_put_dword(dst+10+22,0x3538); // ?
|
||||
|
||||
/* return 28+cw_put_elem_vendor_hdr(dst,CW_VENDOR_ID_CISCO,CW_CISCO_WTP_RADIO_CFG,28);*/
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
#include "cw.h"
|
||||
#include "dbg.h"
|
||||
#include "cw_80211.h"
|
||||
|
||||
/*
|
||||
int cw_in_80211_mac_operation(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
||||
int len, struct sockaddr *from)
|
||||
{
|
||||
int rid = cw_get_byte(data);
|
||||
mbag_t r = mbag_i_get_mbag(conn->radios,rid,NULL);
|
||||
if (!r){
|
||||
cw_dbg(DBG_ELEM_ERR,"Radio %d not defined. Can't set mac operation.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return cw_read_80211_mac_operation(data+2,r);
|
||||
}
|
||||
*/
|
@ -1,38 +0,0 @@
|
||||
|
||||
|
||||
#include "dbg.h"
|
||||
|
||||
#include "capwap.h"
|
||||
|
||||
|
||||
/*
|
||||
int cw_in_cisco_image_identifier(struct conn *conn,struct cw_action_in * a,uint8_t *data,int len,struct sockaddr *from)
|
||||
{
|
||||
|
||||
if (len<a->min_len) {
|
||||
cw_dbg(DBG_ELEM_ERR,"Message element too short, %d < %d", len,a->min_len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t vendor_id = cw_get_dword(data);
|
||||
int dstart;
|
||||
|
||||
switch (vendor_id) {
|
||||
case CW_VENDOR_ID_ZYXEL:
|
||||
case CW_VENDOR_ID_CISCO:
|
||||
case CW_VENDOR_ID_FSF:
|
||||
case 0:
|
||||
dstart=4;
|
||||
len-=4;
|
||||
break;
|
||||
default:
|
||||
vendor_id=CW_VENDOR_ID_CISCO;
|
||||
dstart=0;
|
||||
}
|
||||
|
||||
// mbag_set(conn->remote,a->item_id,a->itemtype,data+dstart,len);
|
||||
// mbag_set_bstrv(conn->incomming,a->item_id,vendor_id,data+dstart,len);
|
||||
return 1;
|
||||
}
|
||||
|
||||
*/
|
@ -1,22 +0,0 @@
|
||||
|
||||
|
||||
|
||||
#include "dbg.h"
|
||||
#include "log.h"
|
||||
|
||||
#include "cw.h"
|
||||
#include "radio.h"
|
||||
|
||||
|
||||
|
||||
int cw_in_radio_administrative_state(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
||||
struct sockaddr *from)
|
||||
{
|
||||
/* int rid = cw_get_byte(data);
|
||||
int state = cw_get_byte(data+1);
|
||||
return cw_radio_set_admin_state(conn->radios,rid,state,-1);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,26 +0,0 @@
|
||||
|
||||
|
||||
|
||||
#include "dbg.h"
|
||||
#include "log.h"
|
||||
|
||||
#include "capwap.h"
|
||||
#include "radio.h"
|
||||
|
||||
|
||||
|
||||
|
||||
int cw_in_radio_administrative_state_wtp(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
||||
struct sockaddr *from)
|
||||
{
|
||||
|
||||
if (!cw_in_radio_administrative_state(conn,a,data,len,from) )
|
||||
return 0;
|
||||
|
||||
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,123 +0,0 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
#include "cw.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#include "cw_util.h"
|
||||
#include "dbg.h"
|
||||
|
||||
|
||||
/*
|
||||
static void readsubelems_wtp_board_data(mbag_t itemstore, uint8_t * msgelem,
|
||||
int len)
|
||||
{
|
||||
if (len<4)
|
||||
return;
|
||||
|
||||
int i = 0;
|
||||
// uint32_t val;
|
||||
do {
|
||||
// val = ntohl(*((uint32_t *) (msgelem + i)));
|
||||
// int subtype = (val >> 16) & 0xffff;
|
||||
// int sublen = val & 0xffff;
|
||||
//
|
||||
int subtype = cw_get_word(msgelem+i);
|
||||
int sublen = cw_get_word(msgelem+i+2);
|
||||
i += 4;
|
||||
if (sublen + i > len) {
|
||||
cw_dbg(DBG_ELEM_ERR,
|
||||
"WTP Board data sub-element too long, type=%d,len=%d",
|
||||
subtype, sublen);
|
||||
return;
|
||||
}
|
||||
|
||||
cw_dbg(DBG_SUBELEM, "board data sub-element, type=%d (%s), len=%d",
|
||||
subtype, cw_strboardelem(subtype),sublen);
|
||||
|
||||
cw_dbg_dmp(DBG_SUBELEM,msgelem+i,sublen,"Dump...");
|
||||
|
||||
switch (subtype) {
|
||||
case CW_BOARDDATA_MODELNO:
|
||||
mbag_set_bstrn(itemstore,
|
||||
CW_ITEM_WTP_BOARD_MODELNO,
|
||||
msgelem + i, sublen);
|
||||
break;
|
||||
case CW_BOARDDATA_SERIALNO:
|
||||
mbag_set_bstrn(itemstore,
|
||||
CW_ITEM_WTP_BOARD_SERIALNO,
|
||||
msgelem + i, sublen);
|
||||
|
||||
break;
|
||||
case CW_BOARDDATA_MACADDRESS:
|
||||
mbag_set_bstrn(itemstore,
|
||||
CW_ITEM_WTP_BOARD_MACADDRESS,
|
||||
msgelem + i, sublen);
|
||||
|
||||
break;
|
||||
case CW_BOARDDATA_BOARDID:
|
||||
mbag_set_bstrn(itemstore, CW_ITEM_WTP_BOARD_ID,
|
||||
msgelem + i, sublen);
|
||||
break;
|
||||
case CW_BOARDDATA_REVISION:
|
||||
mbag_set_bstrn(itemstore,
|
||||
CW_ITEM_WTP_BOARD_REVISION,
|
||||
msgelem + i, sublen);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
i += sublen;
|
||||
|
||||
} while (i < len);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* Parse a WTP Board Data messag element and put results to itemstore.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
int cw_in_wtp_board_data(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
||||
int len, struct sockaddr *from)
|
||||
{
|
||||
|
||||
if (len < 4) {
|
||||
cw_dbg(DBG_ELEM_ERR,
|
||||
"Discarding WTP_BOARD_DATA msgelem, wrong size, type=%d, len=%d",
|
||||
a->elem_id, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
mbag_t itemstore = conn->incomming;
|
||||
mbag_set_dword(itemstore, CW_ITEM_WTP_BOARD_VENDOR, cw_get_dword(data));
|
||||
|
||||
readsubelems_wtp_board_data(itemstore, data + 4, len - 4);
|
||||
|
||||
return 1;
|
||||
}
|
||||
*/
|
@ -1,36 +0,0 @@
|
||||
#include "cw.h"
|
||||
#include "capwap80211.h"
|
||||
#include "radio.h"
|
||||
|
||||
/*
|
||||
int cw_put_elem_80211_supported_rates(uint8_t*dst,int radio_id,mbag_t radio)
|
||||
{
|
||||
|
||||
struct mbag_item * sr = mbag_get(radio,CW_RADIO_SUPPORTED_RATES);
|
||||
if (!sr)
|
||||
return 0;
|
||||
|
||||
int n = cw_put_byte(dst+4,radio_id);
|
||||
|
||||
n+=cw_put_mbag_item(dst+5,sr);
|
||||
return 5 + cw_put_elem_hdr(dst,CW_ELEM80211_SUPPORTED_RATES,5);
|
||||
}
|
||||
|
||||
|
||||
int cw_out_80211_supported_rates(struct conn *conn, struct cw_action_out *a, uint8_t * dst)
|
||||
{
|
||||
|
||||
int l=0;
|
||||
MAVLITER_DEFINE(it,conn->radios);
|
||||
mavliter_foreach(&it){
|
||||
struct mbag_item *i = mavliter_get(&it);
|
||||
if ( i->type != MBAG_MBAG ) {
|
||||
continue;
|
||||
}
|
||||
l+=cw_put_elem_80211_supported_rates(dst+l,i->u1.iid,i->u2.data);
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
|
||||
*/
|
@ -1,42 +0,0 @@
|
||||
|
||||
|
||||
#include "cw.h"
|
||||
|
||||
|
||||
#include "dbg.h"
|
||||
#include "log.h"
|
||||
|
||||
#include "acpriolist.h"
|
||||
|
||||
|
||||
|
||||
int cw_put_ac_name_with_priority(uint8_t *dst,cw_acprio_t * acprio)
|
||||
{
|
||||
int len = strlen(acprio->name);
|
||||
cw_put_byte(dst,acprio->prio);
|
||||
cw_put_data(dst+1,(uint8_t*)acprio->name,len);
|
||||
return len+1;
|
||||
|
||||
}
|
||||
|
||||
int cw_out_ac_name_with_priority(struct conn *conn, struct cw_action_out *a, uint8_t * dst)
|
||||
{
|
||||
/* cw_acpriolist_t prios = mbag_get_mavl(conn->config,CW_ITEM_AC_NAME_WITH_PRIORITY);
|
||||
if (!prios)
|
||||
return 0;
|
||||
|
||||
uint8_t *d = dst;
|
||||
|
||||
MAVLITER_DEFINE(it,prios);
|
||||
mavliter_foreach(&it){
|
||||
cw_acprio_t * ac = mavliter_get(&it);
|
||||
|
||||
int l = cw_put_ac_name_with_priority(d+4,ac);
|
||||
d+=cw_put_elem_hdr(d,CW_ELEM_AC_NAME_WITH_PRIORITY,l)+l;
|
||||
|
||||
}
|
||||
|
||||
return d-dst;
|
||||
*/
|
||||
}
|
||||
|
@ -1,57 +0,0 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implementation output handler of capwap cw_out_local_ip_address
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <string.h>
|
||||
#include "cw.h"
|
||||
|
||||
|
||||
#include "dbg.h"
|
||||
#include "log.h"
|
||||
#include "conn.h"
|
||||
|
||||
|
||||
/**
|
||||
* Output handler for Capwap Local IP Address message element.
|
||||
*
|
||||
* @param conn Connection object
|
||||
* @param action Pointer to action which called this handler
|
||||
* @param dst Destination buffer
|
||||
*
|
||||
* This handler determines the IP address from #conn->sock.
|
||||
* It can deal both with IPv4 and IPv6 sockets.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
int cw_out_capwap_local_ip_address(struct conn *conn, struct cw_action_out *action,
|
||||
uint8_t * dst)
|
||||
{
|
||||
return cw_put_local_ip_address(conn->sock,dst,CW_ELEM_CAPWAP_LOCAL_IPV4_ADDRESS,CW_ELEM_CAPWAP_LOCAL_IPV6_ADDRESS);
|
||||
}
|
||||
|
||||
*/
|
@ -1,58 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "cw.h"
|
||||
|
||||
|
||||
#include "log.h"
|
||||
#include "dbg.h"
|
||||
|
||||
|
||||
#include "sock.h"
|
||||
|
||||
#include "lwapp.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int cw_out_image_data(struct conn *conn, struct cw_action_out *a, uint8_t * dst)
|
||||
{
|
||||
/*
|
||||
mbag_item_t * item = mbag_get(conn->outgoing,CW_ITEM_IMAGE_FILEHANDLE);
|
||||
if (!item) {
|
||||
cw_log(LOG_ERR,"Can't put element Image Data, no image filehandle found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
FILE *infile = item->u2.data;
|
||||
if (infile==NULL){
|
||||
cw_log(LOG_ERR,"Image Data Request infile = NULL");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bytes=0;
|
||||
switch ( conn->capwap_mode_out){
|
||||
case CW_MODE_CISCO:
|
||||
bytes = lw_put_image_data(dst+4,infile);
|
||||
if ( bytes != LW_BLOCKSIZE_IMAGE_DATA + 3) {
|
||||
avltree_del(conn->outgoing, item);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
bytes = cw_put_image_data(dst+4,infile);
|
||||
if (dst[4] != 1){
|
||||
avltree_del(conn->outgoing, item);
|
||||
}
|
||||
}
|
||||
|
||||
if ( ferror(infile)){
|
||||
cw_log(LOG_ERROR,"Aborting image data transfer: %s",strerror(errno));
|
||||
}
|
||||
|
||||
return bytes + cw_put_elem_hdr(dst,a->elem_id,bytes);
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,50 +0,0 @@
|
||||
|
||||
|
||||
/*
|
||||
|
||||
#include "cw.h"
|
||||
#include "cw/dbg.h"
|
||||
|
||||
int cw_out_radio_generic(struct conn *conn, struct cw_action_out *a, uint8_t * dst)
|
||||
{
|
||||
cw_dbg(DBG_X,"Radio Generic out %s",a->item_id);
|
||||
|
||||
int l=0;
|
||||
MAVLITER_DEFINE(it,conn->radios_upd);
|
||||
mavliter_foreach(&it){
|
||||
struct mbag_item *radio = mavliter_get(&it);
|
||||
if ( radio->type != MBAG_MBAG ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Size for msg elem header depends on
|
||||
// vendor specific payload
|
||||
int start = a->vendor_id ? 10 : 4;
|
||||
|
||||
uint8_t * d = dst+l;
|
||||
|
||||
|
||||
|
||||
struct mbag_item * item = mbag_get(radio->u2.data,a->item_id);
|
||||
if (!item){
|
||||
cw_dbg(DBG_X,"Not found! %s for rid %d",a->item_id,radio->u1.iid);
|
||||
continue;
|
||||
}
|
||||
int len=0;
|
||||
len += cw_put_byte(d+start,radio->u1.iid);
|
||||
|
||||
cw_dbg(DBG_X, "Radio generic out '%s' fro rid %d",a->item_id,radio->u1.iid);
|
||||
len += cw_put_mbag_item(d + start+1, item);
|
||||
|
||||
if (a->vendor_id)
|
||||
l+= len + cw_put_elem_vendor_hdr(d, a->vendor_id, a->elem_id, len);
|
||||
else
|
||||
l += len + cw_put_elem_hdr(d, a->elem_id, len);
|
||||
|
||||
|
||||
|
||||
}
|
||||
return l;
|
||||
|
||||
}
|
||||
*/
|
@ -1,42 +0,0 @@
|
||||
|
||||
#include "cw.h"
|
||||
|
||||
|
||||
#include "radio.h"
|
||||
|
||||
#include "dbg.h"
|
||||
#include "log.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
int cw_put_elem_radio_info(uint8_t*dst,int radio_id,mbag_t radio)
|
||||
{
|
||||
cw_put_byte(dst+4,radio_id);
|
||||
cw_put_dword(dst+5,mbag_get_dword(radio,CW_RADIOITEM80211_WTP_RADIO_INFORMATION,0));
|
||||
return 5 + cw_put_elem_hdr(dst,CW_ELEM80211_WTP_RADIO_INFORMATION,5);
|
||||
|
||||
}
|
||||
|
||||
|
||||
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){
|
||||
struct mbag_item *i = mavliter_get(&it);
|
||||
if ( i->type != MBAG_MBAG ) {
|
||||
continue;
|
||||
}
|
||||
l+=cw_put_elem_radio_info(dst+l,i->u1.iid,i->u2.data);
|
||||
|
||||
}
|
||||
return l;
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,80 +0,0 @@
|
||||
#include "log.h"
|
||||
#include "capwap.h"
|
||||
#include "conn.h"
|
||||
#include "cw.h"
|
||||
|
||||
#define CW_MODE_CISCO 1
|
||||
|
||||
static int cw_put_encryption_subelems(uint8_t *dst,int capwap_mode)
|
||||
{
|
||||
if (capwap_mode==CW_MODE_CISCO){
|
||||
cw_put_word(dst,0x01);
|
||||
return 2;
|
||||
}
|
||||
|
||||
int n=2;
|
||||
|
||||
dst+=cw_put_byte(dst,n);
|
||||
|
||||
int i;
|
||||
for (i=0; i<n; i++){
|
||||
dst+=cw_put_byte(dst,0);
|
||||
dst+=cw_put_byte(dst,0);
|
||||
dst+=cw_put_byte(dst,0);
|
||||
}
|
||||
|
||||
return 3*n+1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
int cw_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a, uint8_t * dst)
|
||||
{
|
||||
|
||||
mbag_t mbag = conn->config;
|
||||
|
||||
// XXX Dummy WTP Descriptor Header
|
||||
uint8_t *d = dst+4;
|
||||
|
||||
d+=cw_put_byte(d,conn->radios->count); //max radios
|
||||
d+=cw_put_byte(d,2); //radios in use
|
||||
|
||||
d+=cw_put_encryption_subelems(d,conn->capwap_mode);
|
||||
|
||||
mbag_item_t * i;
|
||||
i = mbag_get(mbag,CW_ITEM_WTP_HARDWARE_VERSION);
|
||||
/* if ( i ) {
|
||||
d += cw_put_version(d,CW_SUBELEM_WTP_HARDWARE_VERSION,i->u2.data);
|
||||
}
|
||||
else {
|
||||
cw_log(LOG_ERR, "Can't send Hardware Version in WTP Descriptor, not set.");
|
||||
}
|
||||
|
||||
i = mbag_get(mbag,CW_ITEM_WTP_SOFTWARE_VERSION);
|
||||
if ( i ) {
|
||||
d += cw_put_version(d,CW_SUBELEM_WTP_SOFTWARE_VERSION,i->u2.data);
|
||||
}
|
||||
else {
|
||||
cw_log(LOG_ERR, "Can't send Software Version in WTP descriptor, not set.");
|
||||
}
|
||||
|
||||
i = mbag_get(mbag,CW_ITEM_WTP_BOOT_VERSION);
|
||||
if ( i ) {
|
||||
d += cw_put_version(d,CW_SUBELEM_WTP_BOOTLOADER_VERSION,i->u2.data);
|
||||
}
|
||||
else {
|
||||
cw_log(LOG_INFO, "Can't send Boot Version in WTP descriptor, not set.");
|
||||
}
|
||||
|
||||
i = mbag_get(mbag,CW_ITEM_WTP_OTHER_VERSION);
|
||||
if ( i ) {
|
||||
d += cw_put_version(d,CW_SUBELEM_WTP_OTHERSOFTWARE_VERSION,i->u2.data);
|
||||
}
|
||||
else {
|
||||
cw_log(LOG_INFO, "Can't send Other Version in WTP descriptor, not set.");
|
||||
}
|
||||
*
|
||||
// int len = d-dst-4;
|
||||
// return len + cw_put_elem_hdr(dst,a->elem_id,len);
|
||||
}
|
||||
*/
|
@ -1,56 +0,0 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implementation output handler of capwap cw_out_local_ip_address
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <string.h>
|
||||
#include "cw.h"
|
||||
|
||||
|
||||
#include "dbg.h"
|
||||
#include "log.h"
|
||||
#include "conn.h"
|
||||
|
||||
|
||||
/**
|
||||
* Output handler for Capwap Local IP Address message element.
|
||||
*
|
||||
* @param conn Connection object
|
||||
* @param action Pointer to action which called this handler
|
||||
* @param dst Destination buffer
|
||||
*
|
||||
* This handler determines the IP address from #conn->sock.
|
||||
* It can deal both with IPv4 and IPv6 sockets.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
int cw_out_wtp_ip_address(struct conn *conn, struct cw_action_out *action,
|
||||
uint8_t * dst)
|
||||
{
|
||||
return cw_put_local_ip_address(conn->sock,dst,CAPWAP_ELEM_WTP_IPV4_IP_ADDRESS,CAPWAP_ELEM_WTP_IPV6_IP_ADDRESS);
|
||||
}
|
||||
*/
|
@ -1,65 +0,0 @@
|
||||
/*
|
||||
This file is part of actube.
|
||||
|
||||
actube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
#include "log.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "cw.h"
|
||||
|
||||
/*
|
||||
int cw_out_wtp_reboot_statistics(struct conn *conn, struct cw_action_out *a,
|
||||
uint8_t * dst)
|
||||
{
|
||||
|
||||
if (!a->get) {
|
||||
cw_log(LOG_ERROR, "Can't set WTP resboot stats. No get method");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
struct mbag_item *i = a->get(conn, a);
|
||||
|
||||
|
||||
if (!i) {
|
||||
if (a->mand) {
|
||||
cw_log(LOG_ERR,
|
||||
"Can't put mandatory element WTP_REBOOT_STATISTICS");
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
mbag_t rs = (mbag_t) i->u2.data;
|
||||
|
||||
uint8_t *d = dst + 4;
|
||||
d += cw_put_word(d, mbag_get_word(rs, CW_ITEM_REBOOT_COUNT, 0));
|
||||
d += cw_put_word(d, mbag_get_word(rs, CW_ITEM_REBOOT_AC_INITIATED_COUNT, 0));
|
||||
d += cw_put_word(d, mbag_get_word(rs, CW_ITEM_REBOOT_LINK_FAILURE_COUNT, 0));
|
||||
d += cw_put_word(d, mbag_get_word(rs, CW_ITEM_REBOOT_SW_FAILURE_COUNT, 0));
|
||||
d += cw_put_word(d, mbag_get_word(rs, CW_ITEM_REBOOT_HW_FAILURE_COUNT, 0));
|
||||
d += cw_put_word(d, mbag_get_word(rs, CW_ITEM_REBOOT_OTHER_FAILURE_COUNT, 0));
|
||||
d += cw_put_word(d, mbag_get_word(rs, CW_ITEM_REBOOT_UNKNOWN_FAILURE_COUNT, 0));
|
||||
d += cw_put_byte(d, mbag_get_byte(rs, CW_ITEM_REBOOT_LAST_FAILURE_TYPE, 255));
|
||||
|
||||
int l = d - dst - 4;
|
||||
return l + cw_put_elem_hdr(dst, a->elem_id, l);
|
||||
}
|
||||
*/
|
@ -1,31 +0,0 @@
|
||||
#include "cw.h"
|
||||
|
||||
/**
|
||||
* Put an cw_ac_stauts structure to a buffer
|
||||
* @param dst destination buffer
|
||||
* @param s #cw_ac_status to put
|
||||
* @return number of bytes put
|
||||
* This function is only useful (used) in conjunction with
|
||||
* putting AC Descriptor message elements.
|
||||
*/
|
||||
int cw_put_ac_status(uint8_t * dst, struct cw_ac_status *s, struct conn * conn)
|
||||
{
|
||||
uint8_t *d;
|
||||
|
||||
d = dst;
|
||||
|
||||
d += cw_put_dword(d, (s->stations << 16) | (s->limit));
|
||||
d += cw_put_dword(d, (s->active_wtps << 16) | (s->max_wtps));
|
||||
|
||||
|
||||
int security = 0;
|
||||
security |= conn->dtls_cert_file ? CAPWAP_FLAG_AC_SECURITY_X : 0;
|
||||
security |= conn->dtls_psk ? CAPWAP_FLAG_AC_SECURITY_S : 0;
|
||||
|
||||
|
||||
d += cw_put_dword(d,
|
||||
(security << 24) | (s->rmac_field << 16) | (s->dtls_policy));
|
||||
return d - dst;
|
||||
}
|
||||
|
||||
|
@ -1,96 +0,0 @@
|
||||
/*
|
||||
This file is part of actube.
|
||||
|
||||
actube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implementation of cw_put_radio_operational_states
|
||||
*/
|
||||
|
||||
#include "cw.h"
|
||||
|
||||
#include "radio.h"
|
||||
|
||||
|
||||
/**
|
||||
* Put all radio operational states
|
||||
*/
|
||||
//int xxcw_put_radio_operational_states(struct xaaa * radios, uint8_t * dst, int *nerror, int d7mode)
|
||||
//{/
|
||||
//uint8_t *d=dst;
|
||||
|
||||
/* Iterate through all radios and send the CW_RADIO_OPER_STATE item if found.
|
||||
We assume, that any other processes, dealing with setting the
|
||||
the Radio Admin state, adds a CW_RADIO_OPER_STATE item to the radio,
|
||||
depending on results. */
|
||||
|
||||
// int nerror=0;
|
||||
|
||||
// *nerror=0;
|
||||
|
||||
// MAVLITER_DEFINE(it,radios);
|
||||
// mavliter_foreach(&it){
|
||||
|
||||
// mbag_item_t * radioitem = mavliter_get(&it);
|
||||
// mbag_item_t *ositem = mbag_get(radioitem->u2.data,CW_RADIOITEM_OPER_STATE);
|
||||
//if (!ositem){
|
||||
// (*nerror)++;
|
||||
// continue;//
|
||||
// }//
|
||||
|
||||
|
||||
/* Put the radio ID */
|
||||
// cw_put_byte(d+4,radioitem->u1.iid);
|
||||
|
||||
/* Get the operational state and cause */
|
||||
// uint16_t os = ositem->u2.word;
|
||||
|
||||
// if ( d7mode ){//
|
||||
// Isolate Oper Sate from cause
|
||||
// uint8_t o=os>>8;
|
||||
|
||||
// /* Invert oper state for Cisco, if oper state is 2 or 1 */
|
||||
// if (o!=0 && o<=2) {
|
||||
// /* 2 becomes 1 and 1 becomes 2 */
|
||||
// os = (os & 0x00ff ) | ((3-o)<<8);
|
||||
// }
|
||||
// }
|
||||
|
||||
// /* Put oper state */
|
||||
// cw_put_word(d+5,os);
|
||||
// d+=3+cw_put_elem_hdr(d,CW_ELEM_RADIO_OPERATIONAL_STATE,3);
|
||||
|
||||
/* delete the operational state item, so it won't be
|
||||
sent again, until it is set by a change through
|
||||
Set Radio Admin State */
|
||||
// mbag_del(radioitem->u2.data,CW_RADIOITEM_OPER_STATE);
|
||||
|
||||
// }
|
||||
|
||||
|
||||
/* if (nerror) {
|
||||
if (a->mand) {
|
||||
cw_log(LOG_ERROR,"Could not send Radio Operational State for all radios. Sent %d out of %d.",
|
||||
conn->radios->count-nerror,conn->radios->count);
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
// return d-dst;
|
||||
//}
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
#include "cw.h"
|
||||
|
||||
#include "dbg.h"
|
||||
|
||||
/*
|
||||
int cw_read_80211_mac_operation(uint8_t *data,mbag_t r)
|
||||
{
|
||||
mbag_set_word( r, CW_RADIOITEM80211_RTS_THRESHOLD,cw_get_word(data) );
|
||||
mbag_set_byte( r, CW_RADIOITEM80211_SHORT_RETRY,cw_get_byte(data+2) );
|
||||
mbag_set_byte( r, CW_RADIOITEM80211_LONG_RETRY,cw_get_byte(data+3) );
|
||||
mbag_set_word( r, CW_RADIOITEM80211_FRAGMENTATION_THRESHOLD,cw_get_word(data+4) );
|
||||
mbag_set_dword( r, CW_RADIOITEM80211_TX_MSDU_LIFETIME,cw_get_dword(data+6) );
|
||||
mbag_set_dword( r, CW_RADIOITEM80211_RX_MSDU_LIFETIME,cw_get_dword(data+10) );
|
||||
return 1;
|
||||
}
|
||||
*/
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
|
||||
#include "capwap_cisco.h"
|
||||
#include "cw_log.h"
|
||||
|
||||
int cw_readelem_cisco_wtp_radio_cfg(int elem_id,uint8_t *elem, int len,struct radioinfo *ri)
|
||||
{
|
||||
if (elem_id != CW_CISCO_WTP_RADIO_CFG)
|
||||
return 0;
|
||||
|
||||
if (len!=24){
|
||||
cw_dbg(DBG_ELEM,"LWAPP Radio Cfg element too short, %d < 21",len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ri->rid = lw_get_byte(elem);
|
||||
ri->occupancy_limit = lw_get_word(elem+2);
|
||||
bstr_replace(&ri->bssid,bstr_create(elem+7,6));
|
||||
ri->beacon_period = lw_get_word(elem+13);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
*/
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
/**
|
||||
* @file
|
||||
* @brief Implnts send echo response
|
||||
*/
|
||||
|
||||
#include "capwap.h"
|
||||
|
||||
/**
|
||||
* Send an echo response message
|
||||
* @param conn connection, see #conn
|
||||
* @param seqnum sequence number to use
|
||||
* @param radioinfo radioinfo to use, should me NULL
|
||||
* @return 1=Success\nOtherwise Error.
|
||||
*/
|
||||
|
||||
int cw_send_echo_response(struct conn * conn,int seqnum,struct radioinfo * radioinfo)
|
||||
{
|
||||
struct cwmsg * cwmsg = &conn->resp_msg;
|
||||
// cwmsg_init(cwmsg,conn->resp_buffer,CW_MSG_ECHO_RESPONSE,seqnum,radioinfo);
|
||||
|
||||
// conn_send_response(conn,cwmsg,seqnum);
|
||||
return 1;
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#include "capwap.h"
|
||||
#include "conn.h"
|
||||
#include "cwmsg.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void cwmsg_addelem_mtu_discovery_padding(struct cwmsg * msg, struct conn* conn)
|
||||
{
|
||||
int len = conn->mtu - (msg->msgelems-msg->buffer+msg->pos)-4;
|
||||
|
||||
printf("MTU discovery len %d %d and pos %d:\n",conn->mtu,len,msg->pos);
|
||||
|
||||
if (len < 0 )
|
||||
return;
|
||||
|
||||
uint32_t val = CAPWAP_ELEM_MTU_DISCOVERY_PADDING<<16|len;
|
||||
*((uint32_t*)(msg->msgelems+msg->pos))=htonl(val);
|
||||
memset(msg->msgelems+4+msg->pos,0xff,len);
|
||||
msg->pos+=4+len;
|
||||
|
||||
printf("Nenpos = %d\n",msg->pos);
|
||||
}
|
||||
|
@ -1,63 +0,0 @@
|
||||
|
||||
#include "lwapp_cisco.h"
|
||||
|
||||
const char * lw_cisco_id_to_str(int elem_id)
|
||||
{
|
||||
switch (elem_id){
|
||||
case LW_CISCO_AP_LOGHOST_CONFIG:
|
||||
return "AP Loghost Config and Last Joined Controller";
|
||||
case LW_CISCO_PATH_MTU:
|
||||
return "Path MTU";
|
||||
case LW_CISCO_MWAR_HASH_VALUE:
|
||||
return "MWAR Hash Value";
|
||||
case LW_CISCO_MWAR_HASH_VALUE_1:
|
||||
return "MWAR Hah Value 1";
|
||||
case LW_CISCO_AP_USERNAME_PASSWORD:
|
||||
return "AP Username and Password";
|
||||
case LW_CISCO_AC_IP_ADDR_WITH_INDEX:
|
||||
return "AC IP Addr with Index";
|
||||
case LW_CISCO_AP_SUBMODE:
|
||||
return "AP Submode";
|
||||
case LW_CISCO_SSC_HASH_VALIDATION:
|
||||
return "SSC Hash Validation";
|
||||
|
||||
case LW_CISCO_DOT11R_WLC_MAC_AND_IP:
|
||||
return "802.11r WLC MAC and IP";
|
||||
case LW_CISCO_AP_JOIN_IP_PREF_MODE:
|
||||
return "AP Join IP Pref Mode";
|
||||
|
||||
case LW_CISCO_MCAST_MGID_INFO:
|
||||
return "MCAST MGID Info";
|
||||
case LW_CISCO_RADIO_MODULE_INFO:
|
||||
return "Radio Module Info";
|
||||
case LW_CISCO_TELNET_SSH:
|
||||
return "Telnet SSH";
|
||||
case LW_CISCO_AP_DTLS_DATA_CFG:
|
||||
return "AP DTLS Data Config";
|
||||
|
||||
case LW_CISCO_PRIMED_JOIN_TIMEOUT:
|
||||
return "Primed Join Timeout";
|
||||
|
||||
case LW_CISCO_PRIMED_DISCOVERY_TIMEOUT:
|
||||
return "Primed Discovery Timeout";
|
||||
|
||||
case LW_CISCO_RAD_EXTENDED_CONFIG:
|
||||
return "RAD Extended Config";
|
||||
|
||||
case LW_CISCO_MANAGER_IP_ADDR:
|
||||
return "Manager IP Address";
|
||||
|
||||
case LW_CISCO_ADD_WLAN:
|
||||
return "Add WLAN?";
|
||||
|
||||
case LW_CISCO_DELETE_WLAN:
|
||||
return "Delete WLAN?";
|
||||
|
||||
default:
|
||||
return "Unknown";
|
||||
|
||||
}
|
||||
|
||||
return "Unknown";
|
||||
}
|
||||
|
@ -1,53 +0,0 @@
|
||||
|
||||
#include "cw.h"
|
||||
#include "dbg.h"
|
||||
#include "log.h"
|
||||
/*#include "stravltree.h"*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implementation of LWAPP Vendor Specific Payload
|
||||
*/
|
||||
|
||||
/**
|
||||
* Default handler for LWAPP Vendor Specific Payload message elements.
|
||||
*/
|
||||
|
||||
/*
|
||||
int lw_in_vendor_specific(struct conn *conn, struct cw_action_in *a,
|
||||
uint8_t * data, int len, struct sockaddr *from)
|
||||
{
|
||||
|
||||
cw_action_in_t as, *af;
|
||||
as = *a;
|
||||
|
||||
as.vendor_id = cw_get_dword(data);
|
||||
as.elem_id = cw_get_word(data + 4);
|
||||
as.proto = CW_ACTION_PROTO_LWAPP;
|
||||
|
||||
// TODO XXXX
|
||||
//af = cw_actionlist_in_get(conn->actions->in, &as);
|
||||
//
|
||||
af = 0;
|
||||
|
||||
if (!af) {
|
||||
cw_dbg(DBG_WARN,
|
||||
"Can't handle Vendor Specific LWAPP Payload %s/%d, in msg %d (%s) in %s state.",
|
||||
cw_strvendor(as.vendor_id), as.elem_id, as.msg_id,
|
||||
cw_strmsg(as.msg_id), cw_strstate(as.capwap_state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (af->start) {
|
||||
int afrc = af->start(conn, af, data + 6, len - 6, from);
|
||||
if (af->mand && afrc) {
|
||||
// add found mandatory message element
|
||||
//to mand list
|
||||
// XXXX stravltree_add(conn->mand, af->item_id);
|
||||
}
|
||||
return afrc;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
*/
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implementation of lw_put_cisco_path_mtu
|
||||
*/
|
||||
|
||||
#include "lwapp_cisco.h"
|
||||
#include "lw.h"
|
||||
#include "vendors.h"
|
||||
|
||||
/**
|
||||
* Put message element data for Cisco vendor specific LWAPP message
|
||||
* Csico Path MTU.
|
||||
* @param dst destination buffer
|
||||
* @param max maximum MTU
|
||||
* @param padding number of bytes to append
|
||||
* @return number of bytes put to buffer
|
||||
*/
|
||||
int lw_put_cisco_path_mtu(uint8_t *dst, uint16_t max, uint16_t padding)
|
||||
{
|
||||
lw_set_dword(dst,LW_VENDOR_ID_CISCO);
|
||||
lw_set_word(dst+4,LW_CISCO_PATH_MTU);
|
||||
lw_set_word(dst+6,max);
|
||||
lw_set_word(dst+8,padding+4);
|
||||
memset(dst+10,0,padding);
|
||||
return padding+10;
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
|
||||
|
||||
|
||||
|
||||
#include "log.h"
|
||||
|
||||
/*
|
||||
int mbag_get_upd(mbag_t b, mbag_t b_upd, const char *id, uint8_t *dst, int *found)
|
||||
{
|
||||
struct mbag_item *i = mbag_get(b_upd, id);
|
||||
if (i) {
|
||||
if (!i->type->put ){
|
||||
cw_log(LOG_ERROR,"No put method for %s",i->type->name);
|
||||
return -1;
|
||||
}
|
||||
(*found)++;
|
||||
return i->type->put(i, dst);
|
||||
}
|
||||
i = mbag_get(b,id);
|
||||
if (i) {
|
||||
if (!i->type->put){
|
||||
cw_log(LOG_ERROR,"No put method for %s",i->type->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return i->type->put(i, dst);
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
||||
}
|
||||
*/
|
@ -1,54 +0,0 @@
|
||||
|
||||
/*
|
||||
#include "radio.h"
|
||||
#include "dbg.h"
|
||||
|
||||
const char CW_RADIO_TYPE[]="radio_type";
|
||||
const char CW_RADIO_REG_DOMAIN[]="reg_domain";
|
||||
const char CW_RADIO_BSSID[]="bssid";
|
||||
const char CW_RADIO_SHORT_PREAMBLE[]="short_preamble";
|
||||
const char CW_RADIO_COUNTRY_STRING[]="country_string";
|
||||
const char CW_RADIO_DECRYPTION_ERROR_REPORT_PERIOD[]="decryption_error_report_period";
|
||||
|
||||
|
||||
const char CW_RADIO_SUPPORTED_RATES[]="supported_rates";
|
||||
|
||||
|
||||
|
||||
// Cisco
|
||||
|
||||
const char CW_RADIO_OCCUPANCY_LIMIT[]="occupancy_limit";
|
||||
const char CW_RADIO_CFP_PERIOD[]="cfp_period";
|
||||
const char CW_RADIO_CFP_MAX_DURATION[]="cfp_max_duration";
|
||||
|
||||
|
||||
struct cw_itemdef xxxcapwap_radioitemdefs[] = {
|
||||
//{CW_RADIO_ADMIN_STATE,CW_ITEM_NONE,MBAG_BYTE},
|
||||
{CW_RADIO_TYPE,CW_ITEM_NONE,MTYPE_DWORD},
|
||||
{CW_RADIO_DECRYPTION_ERROR_REPORT_PERIOD,CW_ITEM_NONE,MBAG_WORD},
|
||||
|
||||
{CW_RADIO_BSSID,CW_ITEM_NONE,MBAG_BSTR16},
|
||||
{CW_RADIO_SUPPORTED_RATES,CW_ITEM_NONE,MBAG_DATA},
|
||||
|
||||
{CW_ITEM_NONE}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int cw_radio_set_all_admin_states(mbag_t radios,int state, int cause)
|
||||
{
|
||||
MAVLITER_DEFINE(it,radios);
|
||||
mavliter_foreach(&it){
|
||||
mbag_item_t *i = mavliter_get(&it);
|
||||
cw_radio_set_admin_state(radios,i->u1.iid,state,cause);
|
||||
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
*/
|
@ -1,62 +0,0 @@
|
||||
#ifndef __CW_RADIO_H
|
||||
#define __CW_RADIO_H
|
||||
|
||||
|
||||
|
||||
#include "conn.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
//extern const char CW_RADIO_ADMIN_STATE[];
|
||||
//extern const char CW_RADIO_OPER_STATE[];
|
||||
*/
|
||||
|
||||
extern const char CW_RADIO_SUPPORTED_RATES[];
|
||||
|
||||
|
||||
extern const char CW_RADIO_TYPE[];
|
||||
extern const char CW_RADIO_REG_DOMAIN[];
|
||||
extern const char CW_RADIO_BSSID[];
|
||||
extern const char CW_RADIO_SHORT_PREAMBLE[];
|
||||
extern const char CW_RADIO_COUNTRY_STRING[];
|
||||
extern const char CW_RADIO_DECRYPTION_ERROR_REPORT_PERIOD[];
|
||||
|
||||
/* Cisco */
|
||||
|
||||
extern const char CW_RADIO_OCCUPANCY_LIMIT[];
|
||||
extern const char CW_RADIO_CFP_PERIOD[];
|
||||
extern const char CW_RADIO_CFP_MAX_DURATION[];
|
||||
|
||||
|
||||
/*
|
||||
enum radiodata{
|
||||
CW_RADIO_ADMIN_STATE=10000,
|
||||
CW_RADIO_OPER_STATE,
|
||||
CW_RADIO_TYPE,
|
||||
CW_RADIO_REG_DOMAIN,
|
||||
CW_RADIO_BSSID,
|
||||
CW_RADIO_SHORT_PREAMBLE,
|
||||
CW_RADIO_COUNTRY_STRING,
|
||||
|
||||
|
||||
CW_RADIO_OCCUPANCY_LIMIT,
|
||||
CW_RADIO_CFP_PERIOD,
|
||||
CW_RADIO_CFP_MAX_DURATION
|
||||
|
||||
|
||||
|
||||
}[];
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
int cw_radio_update_oper_states(mbag_t radios,int cause);
|
||||
extern struct cw_itemdef capwap_radioitemdefs[];
|
||||
extern int cw_radio_set_all_admin_states(mbag_t radios,int state, int cause);
|
||||
|
||||
int cw_out_80211_supported_rates(struct conn *conn, struct cw_action_out *a, uint8_t * dst);
|
||||
*/
|
||||
|
||||
|
||||
#endif
|
@ -429,10 +429,13 @@ static struct cw_ElemHandler handlers[] = {
|
||||
CAPWAP_ELEM_RADIO_OPERATIONAL_STATE, /* Element ID */
|
||||
0, 0, /* Vendor / Proto */
|
||||
3, 3, /* min/max length */
|
||||
radio_operational_state, /* type */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"capwap/operational-state", /* Key */
|
||||
cw_in_radio_generic_struct, /* get */
|
||||
cw_out_radio_generic_struct /* put */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
radio_operational_state
|
||||
}
|
||||
,
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "mod_capwap.h"
|
||||
|
||||
static int init(struct cw_Mod * mod, mavl_t global_cfg, int role)
|
||||
static int init(struct cw_Mod * mod, cw_Cfg_t * global_cfg, int role)
|
||||
{
|
||||
cw_dbg(DBG_INFO,"CAPWAP: Inititalizing mod_capwap.");
|
||||
|
||||
@ -51,7 +51,7 @@ int static setup_cfg(struct cw_Conn * conn)
|
||||
|
||||
|
||||
// stop();
|
||||
// cw_ktv_set_byte(conn->local_cfg,"ac-descriptor/security",security);
|
||||
cw_cfg_set_int(conn->local_cfg,"ac-descriptor/security",security);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ static int init()
|
||||
}
|
||||
|
||||
|
||||
static int detect(struct conn *conn, const uint8_t * rawmsg, int rawlen, int elems_len,
|
||||
static int detect(struct cw_Conn *conn, const uint8_t * rawmsg, int rawlen, int elems_len,
|
||||
struct sockaddr *from, int mode)
|
||||
{
|
||||
int wbid;
|
||||
@ -68,4 +68,4 @@ struct cw_Mod *mod_capwap80211_ac()
|
||||
{
|
||||
return &capwap80211_ac;
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
@ -47,14 +47,16 @@
|
||||
#define CISCO_ELEM_TX_POWER LW_ELEM_80211_TX_POWER /* 12 */
|
||||
#define CISCO_ELEM_TX_POWER_LEVELS LW_ELEM_80211_TX_POWER_LEVELS /* 13 */
|
||||
#define CISCO_ELEM_DIRECT_SEQUENCE_CONTROL LW_ELEM_DIRECT_SEQUENCE_CONTROL /* 14 */
|
||||
#define CW_CISCO_SUPPORTED_RATES LW_ELEM_80211_RATE_SET /* 16 */
|
||||
#define CISCO_ELEM_SUPPORTED_RATES LW_ELEM_80211_RATE_SET /* 16 */
|
||||
|
||||
#define CISCO_ELEM_15 15 /* 15 */
|
||||
#define CISCO_ELEM_16 16 /* 16 */
|
||||
#define CISCO_ELEM_19 19 /* 19 */
|
||||
#define CISCO_ELEM_22 22 /* 22 */
|
||||
#define CISCO_ELEM_24 24 /* 24 */
|
||||
|
||||
#define CISCO_ELEM_RRM_LOAD 25 /* 25 */
|
||||
|
||||
|
||||
#define CW_CISCO_80211_DELETE_WLAN LW_ELEM_80211_DELETE_WLAN /* 28 */
|
||||
|
||||
#define CW_CISCO_MWAR_NAME LW_ELEM_AC_NAME /* 31 */
|
||||
@ -69,8 +71,8 @@
|
||||
|
||||
#define CW_CISCO_CERTIFICATE LW_ELEM_CERTIFICATE /* 44 */
|
||||
|
||||
#define CISCO_ELEM_47 47 /* 47 */
|
||||
#define CISCO_ELEM_48 48 /* 47 */
|
||||
#define CISCO_ELEM_PERFORMANCE_PROFILE 47 /* 47 */
|
||||
#define CISCO_ELEM_SPAM_CFP_STATUS 48 /* 48 */
|
||||
|
||||
|
||||
#define CISCO_ELEM_WTP_BOARD_DATA LW_ELEM_WTP_BOARD_DATA /* 50 */
|
||||
|
@ -451,6 +451,48 @@ static cw_ValStruct_t cisco_lw_radio_module_info_stru[]={
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
static cw_ValStruct_t cisco_rrm_load_stru[]={
|
||||
{CW_TYPE_BYTE,"rx-load",1,-1},
|
||||
{CW_TYPE_BYTE,"tx-load",1,-1},
|
||||
{CW_TYPE_BYTE,"cca-load",1,-1},
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
static cw_ValStruct_t cisco_performance_profile_stru[]={
|
||||
{CW_TYPE_BYTE,"cfg-type",1,-1,cfg_type},
|
||||
{CW_TYPE_WORD,"rf-busy-threshold",2,-1},
|
||||
{CW_TYPE_WORD,"num-clients-threshold",2,-1},
|
||||
{CW_TYPE_WORD,"bytes-per-sec",2,-1},
|
||||
{CW_TYPE_WORD,"foreigh-threshold",2,-1},
|
||||
{CW_TYPE_WORD,"rssi-threshold",2,-1},
|
||||
{CW_TYPE_WORD,"min-perf-snr",2,-1},
|
||||
{CW_TYPE_WORD,"excpection-level",2,-1},
|
||||
{CW_TYPE_WORD,"min-num-clients",2,-1},
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
static cw_ValStruct_t cisco_phy_ht_cap_stru[]={
|
||||
{CW_TYPE_WORD,"ht-cap-info",2,-1},
|
||||
{CW_TYPE_WORD,"extendend-ht-cap-info",2,-1},
|
||||
{CW_TYPE_BSTR16,"rest",-1,-1},
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
static cw_ValStruct_t cisco_phy_ht_control_stru[]={
|
||||
{CW_TYPE_BYTE,"enable-ht",1,-1},
|
||||
{CW_TYPE_BYTE,"cfg-type",1,-1,cfg_type},
|
||||
{CW_TYPE_BYTE,"current-freq",1,-1},
|
||||
{CW_TYPE_BSTR16,"rest",-1,-1},
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
static cw_ValStruct_t cisco_station_cfg_stru[]={
|
||||
{CW_TYPE_BYTE,"cfg-type",1,-1,cfg_type},
|
||||
{CW_TYPE_BYTE,"current-freq",1,-1},
|
||||
{CW_TYPE_BSTR16,"rest",-1,-1},
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
|
||||
|
||||
static cw_ValStruct_t cisco_ap_qos[]={
|
||||
@ -1448,8 +1490,8 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco Elem 16 ", /* name */
|
||||
CISCO_ELEM_16, /* Element ID */
|
||||
"Cisco - Supported Rates", /* name */
|
||||
CISCO_ELEM_SUPPORTED_RATES, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
@ -1462,6 +1504,22 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco Elem 25 ", /* name */
|
||||
CISCO_ELEM_RRM_LOAD, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
4,4, /* min/max length */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/rrm", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
cisco_rrm_load_stru,
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
@ -1520,12 +1578,12 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco Elem 48", /* name */
|
||||
CISCO_ELEM_48, /* Element ID */
|
||||
"Cisco - Spam CFP Status", /* name */
|
||||
CISCO_ELEM_SPAM_CFP_STATUS, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/elem48", /* Key */
|
||||
2,2, /* min/max length */
|
||||
CW_TYPE_BOOL, /* type */
|
||||
"cisco/spam-cfp-status", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic /* put */
|
||||
},
|
||||
@ -1547,21 +1605,21 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco LWAPP Elem 11", /* name */
|
||||
"Cisco LWAPP AP MFP Cap. Sub-type", /* name */
|
||||
|
||||
CISCO_LWELEM_11, /* Element ID */
|
||||
CISCO_LWELEM_AP_MFP_CAP_SUBTYPE, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/lwelem11", /* Key */
|
||||
5,5, /* min/max length */
|
||||
CW_TYPE_DWORD, /* type */
|
||||
"cisco/ap-mfp-cap-subtype", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic /* put */
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco LWAP Elem 14", /* name */
|
||||
CISCO_LWELEM_14, /* Element ID */
|
||||
"Cisco AP MFP Config Subt.", /* name */
|
||||
CISCO_LWELEM_AP_MFP_CONFIG_SUBTYPE, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
|
||||
1,1024, /* min/max length */
|
||||
@ -1574,43 +1632,52 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
|
||||
|
||||
{
|
||||
"Cisco LWAP Elem 27", /* name */
|
||||
"Cisco LWAPP PHY HT Cap.", /* name */
|
||||
|
||||
CISCO_LWELEM_27, /* Element ID */
|
||||
CISCO_LWELEM_PHY_HT_CAP, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/lwelem27", /* Key */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/phy-ht-cap", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic /* put */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
cisco_phy_ht_cap_stru,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"Cisco LWAP Elem 28", /* name */
|
||||
"Cisco LWAPP Station Cfg 28 ???", /* name */
|
||||
|
||||
CISCO_LWELEM_28, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/lwelem28", /* Key */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/station-cfg", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic /* put */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
cisco_station_cfg_stru,
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco LWAPP Elem 29", /* name */
|
||||
"Cisco LWAPP PHY HT Control", /* name */
|
||||
|
||||
CISCO_LWELEM_29, /* Element ID */
|
||||
CISCO_LWELEM_PHY_HT_CONTROL, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/lwelem29", /* Key */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/phy-ht-control", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic /* put */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
cisco_phy_ht_control_stru
|
||||
},
|
||||
|
||||
|
||||
@ -1728,14 +1795,17 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco Elem 47", /* name */
|
||||
CISCO_ELEM_47, /* Element ID */
|
||||
"Cisco - Performance Profile", /* name */
|
||||
CISCO_ELEM_PERFORMANCE_PROFILE, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/elem47", /* Key */
|
||||
18,18, /* min/max length */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/proformance-profile", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic /* put */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
cisco_performance_profile_stru
|
||||
},
|
||||
|
||||
|
||||
@ -1763,10 +1833,13 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
CISCO_ELEM_AP_QOS, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
52,52, /* min/max length */
|
||||
cisco_ap_qos, /* type */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/ap-qos", /* Key */
|
||||
cw_in_radio_generic_struct, /* get */
|
||||
cw_out_radio_generic_struct /* put */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
cisco_ap_qos,
|
||||
},
|
||||
|
||||
{
|
||||
@ -1920,12 +1993,13 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
CISCO_LWELEM_ADD_WLAN, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
7,1117, /* min/max length */
|
||||
cisco_add_lwwlan, /* type */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"radio/wlan/add-lw-wlan", /* Key */
|
||||
cw_in_generic_struct, /* get */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_traverse, /* put */
|
||||
cisoc_add_lwwlan_mkkey,
|
||||
cisco_patch_add_lwwlan
|
||||
cisco_patch_add_lwwlan,
|
||||
cisco_add_lwwlan,
|
||||
}
|
||||
,
|
||||
|
||||
@ -2022,10 +2096,13 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
CISCO_LWELEM_RAD_EXTENDED_CONFIG, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
13,13, /* min/max length */
|
||||
cisco_rad_extended_config, /* type */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/rad-extended-config", /* Key */
|
||||
cw_in_radio_generic_struct, /* get */
|
||||
cw_out_radio_generic_struct /* put */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
cisco_rad_extended_config,
|
||||
},
|
||||
|
||||
{
|
||||
@ -2190,14 +2267,15 @@ static struct cw_ElemDef configuration_status_request_elements[] ={
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,0, CW_IGNORE},
|
||||
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_15, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_16, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SUPPORTED_RATES, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_19, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_22, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_24, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_RRM_LOAD, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_33, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_39, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_47, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_48, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_PERFORMANCE_PROFILE, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_CFP_STATUS, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_81, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_132, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_145, 0, 0},
|
||||
@ -2205,11 +2283,11 @@ static struct cw_ElemDef configuration_status_request_elements[] ={
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_153, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_156, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_9, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_11, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_14, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_27, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_MFP_CAP_SUBTYPE, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_MFP_CONFIG_SUBTYPE, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_PHY_HT_CAP, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_28, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_29, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_PHY_HT_CONTROL, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_33, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_48, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_55, 0, 0},
|
||||
@ -2274,14 +2352,15 @@ static struct cw_ElemDef configuration_status_response_elements[] ={
|
||||
|
||||
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_15, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_16, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SUPPORTED_RATES, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_19, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_22, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_24, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_RRM_LOAD, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_33, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_39, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_47, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_48, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_PERFORMANCE_PROFILE, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_CFP_STATUS, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_81, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_132, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_145, 0, 0},
|
||||
@ -2290,11 +2369,11 @@ static struct cw_ElemDef configuration_status_response_elements[] ={
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_156, 0, 0},
|
||||
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_9, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_11, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_14, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_27, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_MFP_CAP_SUBTYPE, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_MFP_CONFIG_SUBTYPE, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_PHY_HT_CAP, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_28, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_29, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_PHY_HT_CONTROL, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_33, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_48, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_55, 0, 0},
|
||||
@ -2337,14 +2416,15 @@ static struct cw_ElemDef configuration_update_request_elements[] ={
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,0, CW_IGNORE},
|
||||
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_15, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_16, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SUPPORTED_RATES, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_19, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_22, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_24, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_RRM_LOAD, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_33, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_39, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_47, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_48, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_PERFORMANCE_PROFILE, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_CFP_STATUS, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_81, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_132, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_145, 0, 0},
|
||||
@ -2352,11 +2432,11 @@ static struct cw_ElemDef configuration_update_request_elements[] ={
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_153, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_156, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_9, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_11, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_14, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_27, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_MFP_CAP_SUBTYPE, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_AP_MFP_CONFIG_SUBTYPE, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_PHY_HT_CAP, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_28, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_29, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_PHY_HT_CONTROL, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_33, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_48, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_55, 0, 0},
|
||||
@ -2438,10 +2518,13 @@ static struct cw_ElemDef configuration_update_request_elements[] ={
|
||||
static struct cw_ElemDef wtp_event_request_elements[] ={
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_SPAM_VENDOR_SPECIFIC,0, CW_IGNORE},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_ADD_WLAN, 0, CW_IGNORE},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_RRM_LOAD, 0, 0},
|
||||
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_ADD_WLAN, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_HARDWARE_INFO, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_RADIO_MODULE_INFO, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_29, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_PHY_HT_CONTROL, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_55, 0, 0},
|
||||
|
||||
{0,0,0,0,0}
|
||||
};
|
||||
@ -2656,10 +2739,13 @@ static struct cw_ElemHandler handlers73[] = {
|
||||
CISCO_ELEM_WTP_RADIO_CONFIGURATION, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
27,27, /* min/max length */
|
||||
cisco_wtp_radio_config73, /* type */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/wtp-radio-config", /* Key */
|
||||
cw_in_radio_generic_struct, /* get */
|
||||
cw_out_radio_generic_struct /* put */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
cisco_wtp_radio_config73,
|
||||
}
|
||||
,
|
||||
|
||||
@ -2689,10 +2775,13 @@ static struct cw_ElemHandler handlers75[] = {
|
||||
CISCO_ELEM_WTP_RADIO_CONFIGURATION, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
28,28, /* min/max length */
|
||||
cisco_wtp_radio_config75, /* type */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/wtp-radio-config", /* Key */
|
||||
cw_in_radio_generic_struct, /* get */
|
||||
cw_out_radio_generic_struct /* put */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
cisco_wtp_radio_config75,
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -2700,10 +2789,13 @@ static struct cw_ElemHandler handlers75[] = {
|
||||
CISCO_ELEM_MAC_OPERATION, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
17,17, /* min/max length */
|
||||
cisco_mac_operation75, /* type */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/mac-operation", /* Key */
|
||||
cw_in_radio_generic_struct, /* get */
|
||||
cw_out_radio_generic_struct /* put */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
cisco_mac_operation75,
|
||||
},
|
||||
|
||||
{0,0,0,0,0,0,0,0}
|
||||
|
@ -32,8 +32,8 @@ int cisco_out_radio_info(struct cw_ElemHandler * handler, struct cw_ElemHandlerP
|
||||
{
|
||||
if (! (params->msgdata->type & 1) ){
|
||||
int start = params->msgset->header_len(handler);
|
||||
cw_put_byte(dst+start,0);
|
||||
cw_put_dword(dst+start+1,7);
|
||||
cw_set_byte(dst+start,0);
|
||||
cw_set_dword(dst+start+1,7);
|
||||
return params->msgset->write_header(handler,dst,5);
|
||||
}
|
||||
return cw_out_radio_generic(handler,params,dst);
|
||||
|
@ -29,15 +29,16 @@
|
||||
*/
|
||||
|
||||
#define CISCO_LWELEM_9 9
|
||||
#define CISCO_LWELEM_11 11
|
||||
#define CISCO_LWELEM_14 14
|
||||
#define CISCO_LWELEM_AP_MFP_CAP_SUBTYPE 11
|
||||
#define CISCO_LWELEM_AP_MFP_CONFIG_SUBTYPE 14
|
||||
#define CISCO_LWELEM_AP_USERNAME_PASSWORD 18
|
||||
#define LW_CISCO_MANAGER_IP_ADDR 19
|
||||
#define CISCO_LWELEM_DISCOVERY_PROTOCOL 20
|
||||
#define CISCO_LWELEM_RADIO_MODULE_INFO 21
|
||||
#define CISCO_LWELEM_27 27
|
||||
#define CISCO_LWELEM_PHY_HT_CAP 27
|
||||
//#define CISCO_LWELEM_STATION_CFG 28
|
||||
#define CISCO_LWELEM_28 28
|
||||
#define CISCO_LWELEM_29 29
|
||||
#define CISCO_LWELEM_PHY_HT_CONTROL 29
|
||||
#define CISCO_LWELEM_AC_IP_ADDR_WITH_INDEX 32
|
||||
#define CISCO_LWELEM_33 33
|
||||
#define CISCO_LWELEM_AP_ETHERNET_PORT_SUBTYPE 34
|
||||
|
@ -1,44 +1,51 @@
|
||||
#
|
||||
# Join Request
|
||||
# 1142 startup
|
||||
#
|
||||
capwap-local-ip-address: 192.168.0.13
|
||||
|
||||
capwap/location-data: default location
|
||||
capwap/maximum-message-length: 14000
|
||||
capwap/session-id: .x45e59826
|
||||
capwap/wtp-board-data/board-id: .x0000
|
||||
capwap/wtp-board-data/mac-address: .xc47d4f3af8a6
|
||||
capwap/wtp-board-data/model-no: "AIR-LAP1142N-E-K9 "
|
||||
capwap/wtp-board-data/revision: A0
|
||||
capwap/wtp-board-data/serial-no: FCZ1406W232
|
||||
capwap/wtp-board-data/vendor: 4232704
|
||||
capwap/wtp-descriptor/bootloader/vendor: 4232704
|
||||
capwap/wtp-descriptor/bootloader/version: .x0c041200
|
||||
capwap/wtp-descriptor/hardware/vendor: 4232704
|
||||
capwap/wtp-descriptor/hardware/version: .x01000000
|
||||
capwap/wtp-descriptor/max-radios: 2
|
||||
capwap/wtp-descriptor/radios-in-use: 2
|
||||
capwap/wtp-descriptor/software/vendor: 4232704
|
||||
capwap/wtp-descriptor/software/version: .x07007400
|
||||
capwap/wtp-frame-tunnel-mode: 4
|
||||
capwap/wtp-mac-type: 1 - Split MAC
|
||||
capwap/wtp-name: APc47d.4f3a.f8a6
|
||||
cisco/ap-group-name: default-group
|
||||
cisco/lw-path-mtu/len: 1095
|
||||
cisco/lw-path-mtu/max: 1485
|
||||
cisco/mwar-addr/address: 192.168.0.14
|
||||
cisco/mwar-addr/address: 192.168.0.161
|
||||
cisco/mwar-addr/mwar-type: 0
|
||||
cisco/mwar-addr/unknown: 0
|
||||
cisco/wtp-board-data/options/ant-type: 1
|
||||
cisco/wtp-board-data/options/ap-type: 0
|
||||
cisco/wtp-board-data/options/failover-priority: 1
|
||||
cisco/wtp-board-data/options/flex-connect: 0
|
||||
location-data: default location
|
||||
maximum-message-length: 14000
|
||||
radio.0/wtp-radio-information: 1
|
||||
radio.1/wtp-radio-information: 2
|
||||
session-id: .x4a230869
|
||||
wtp-board-data/board-id: .x0000
|
||||
wtp-board-data/mac-address: .xc47d4f3af8a6
|
||||
wtp-board-data/model-no: "AIR-LAP1142N-E-K9 "
|
||||
wtp-board-data/revision: A0
|
||||
wtp-board-data/serial-no: FCZ1406W232
|
||||
wtp-board-data/vendor: 4232704
|
||||
wtp-descriptor/bootloader/vendor: 4232704
|
||||
wtp-descriptor/bootloader/version: .x0c041200
|
||||
wtp-descriptor/hardware/vendor: 4232704
|
||||
wtp-descriptor/hardware/version: .x01000000
|
||||
wtp-descriptor/max-radios: 2
|
||||
wtp-descriptor/radios-in-use: 2
|
||||
wtp-descriptor/software/vendor: 4232704
|
||||
wtp-descriptor/software/version: .x07007400
|
||||
wtp-frame-tunnel-mode: 4
|
||||
wtp-mac-type: 1 - Split MAC
|
||||
wtp-name: APc47d.4f3a.f8a6
|
||||
radio.0/capwap80211/wtp-radio-information: 1
|
||||
radio.1/capwap80211/wtp-radio-information: 2
|
||||
|
||||
|
||||
#
|
||||
# Configuration Status Request
|
||||
#
|
||||
capwap/ac-name:
|
||||
capwap/statistics-timer: 180
|
||||
capwap/wtp-reboot-statistics/ac-initiated-count: 1
|
||||
capwap/wtp-reboot-statistics/hw-failure-count: 0
|
||||
capwap/wtp-reboot-statistics/last-failure-type: 1
|
||||
capwap/wtp-reboot-statistics/link-failure-count: 0
|
||||
capwap/wtp-reboot-statistics/other-failure-count: 17
|
||||
capwap/wtp-reboot-statistics/reboot-count: 0
|
||||
capwap/wtp-reboot-statistics/sw-failure-count: 0
|
||||
capwap/wtp-reboot-statistics/unknown-failure-count: 0
|
||||
cisco/ap-backup-software-version: .x00000000
|
||||
cisco/ap-dtls-data-cfg/cabable: true
|
||||
cisco/ap-dtls-data-cfg/enabled: false
|
||||
@ -70,11 +77,11 @@ cisco/ap-static-ip-addr/unknown: 0.0.0.0
|
||||
cisco/ap-sub-mode: 0
|
||||
cisco/ap-telnet-ssh/ssh: false
|
||||
cisco/ap-telnet-ssh/telnet: false
|
||||
cisco/ap-uptime/current-uptime: 84
|
||||
cisco/ap-uptime/current-uptime: 291
|
||||
cisco/ap-uptime/last-uptime: 1
|
||||
cisco/ap-username-and-password/login-credentials/enable-password: $1$.q2F$Fkcs06gZJpIE3LnX8oxmN.
|
||||
cisco/ap-username-and-password/login-credentials/enable-password: $1$AmeO$sVDsj.7u2p72.6OD7ZxEo.
|
||||
cisco/ap-username-and-password/login-credentials/option: 1
|
||||
cisco/ap-username-and-password/login-credentials/password: $1$ZFkU$zIX6UG1NozXk2.V1lZNIV.
|
||||
cisco/ap-username-and-password/login-credentials/password: $1$5oz2$kFPn2Dsy576Q50Z3XwVVx.
|
||||
cisco/ap-username-and-password/login-credentials/username: Cisco
|
||||
cisco/cisco-discovery-protocol/data: 513
|
||||
cisco/cisco-discovery-protocol/enabled: false
|
||||
@ -97,7 +104,9 @@ cisco/wtp-board-data/options/flex-connect: 1
|
||||
cisco/wtp-board-data/wtp-model-hi: 0
|
||||
cisco/wtp-board-data/wtp-model-lo: 0
|
||||
cisco/wtp-board-data/wtp-serial-number: FCZ1406W232
|
||||
radio.0/admin-state: 1 - enabled
|
||||
radio.0/capwap/admin-state: 1 - enabled
|
||||
radio.0/capwap80211/tx-power/@cisco/cfg-type: 1 - global
|
||||
radio.0/capwap80211/tx-power/current-tx-power: 0
|
||||
radio.0/cisco/antenna-payload/802-11n-rx-antennas: 0
|
||||
radio.0/cisco/antenna-payload/802-11n-tx-antennas: 0
|
||||
radio.0/cisco/antenna-payload/antenna-1: 1
|
||||
@ -106,14 +115,9 @@ radio.0/cisco/antenna-payload/antenna-mode: 3
|
||||
radio.0/cisco/antenna-payload/diversity-selection: 255
|
||||
radio.0/cisco/antenna-payload/number-of-antennas: 2
|
||||
radio.0/cisco/antenna-payload/unknown: 0
|
||||
radio.0/cisco/ap-mfp-cap-subtype: 515
|
||||
radio.0/cisco/channel-power: .x08080d0108221c16100a04fefe0208221c16100a04fefe0308221c16100a04fefe0408221c16100a04fefe0508221c16100a04fefe0608221c16100a04fefe0708221c16100a04fefe0808221c16100a04fefe0908221c16100a04fefe0a08221c16100a04fefe0b08221c16100a04fefe0c08221c16100a04fefe0d08221c16100a04fefe
|
||||
radio.0/cisco/elem16: .x02040b0c
|
||||
radio.0/cisco/elem47: .x0100000000000000000000000000000000
|
||||
radio.0/cisco/elem48: .x00
|
||||
radio.0/cisco/lwelem11: .x00000203
|
||||
radio.0/cisco/lwelem27: .x00000000000000000000000000000000000000000000000000
|
||||
radio.0/cisco/lwelem28: .x0303020202000000000000000000000000000000000000000000313f01
|
||||
radio.0/cisco/lwelem29: .x00010000000000000200001400
|
||||
radio.0/cisco/mac-operation/fragmentation-threshold: 0
|
||||
radio.0/cisco/mac-operation/long-retry: 0
|
||||
radio.0/cisco/mac-operation/reserved: 1
|
||||
@ -125,9 +129,27 @@ radio.0/cisco/multi-domain-capability/first-channel: 1
|
||||
radio.0/cisco/multi-domain-capability/max-tx-power-level: 65535
|
||||
radio.0/cisco/multi-domain-capability/number-of-channels: 13
|
||||
radio.0/cisco/multi-domain-capability/reserved: 1
|
||||
radio.0/cisco/phy-ht-cap/extendend-ht-cap-info: 0
|
||||
radio.0/cisco/phy-ht-cap/ht-cap-info: 0
|
||||
radio.0/cisco/phy-ht-cap/rest: .x000000000000000000000000000000000000000000
|
||||
radio.0/cisco/phy-ht-control/cfg-type: 1 - global
|
||||
radio.0/cisco/phy-ht-control/current-freq: 0
|
||||
radio.0/cisco/phy-ht-control/enable-ht: 0
|
||||
radio.0/cisco/phy-ht-control/rest: .x00000000000200001400
|
||||
radio.0/cisco/proformance-profile/bytes-per-sec: 0
|
||||
radio.0/cisco/proformance-profile/cfg-type: 1 - global
|
||||
radio.0/cisco/proformance-profile/excpection-level: 0
|
||||
radio.0/cisco/proformance-profile/foreigh-threshold: 0
|
||||
radio.0/cisco/proformance-profile/min-num-clients: 0
|
||||
radio.0/cisco/proformance-profile/min-perf-snr: 0
|
||||
radio.0/cisco/proformance-profile/num-clients-threshold: 0
|
||||
radio.0/cisco/proformance-profile/rf-busy-threshold: 0
|
||||
radio.0/cisco/proformance-profile/rssi-threshold: 0
|
||||
radio.0/cisco/spam-cfp-status: false
|
||||
radio.0/cisco/station-cfg/cfg-type: 3
|
||||
radio.0/cisco/station-cfg/current-freq: 3
|
||||
radio.0/cisco/station-cfg/rest: .x020202000000000000000000000000000000000000000000313f01
|
||||
radio.0/cisco/tx-power-levels: .x070011000e000b000800050002ffff0000
|
||||
radio.0/cisco/tx-power/cfg-type: 1 - global
|
||||
radio.0/cisco/tx-power/current-tx-power: 0
|
||||
radio.0/cisco/wtp-radio-config/beacon-period: 0
|
||||
radio.0/cisco/wtp-radio-config/bss-id: .x04fe7f499b90
|
||||
radio.0/cisco/wtp-radio-config/cfg-period: 0
|
||||
@ -137,7 +159,9 @@ radio.0/cisco/wtp-radio-config/country-str1:
|
||||
radio.0/cisco/wtp-radio-config/country-str2:
|
||||
radio.0/cisco/wtp-radio-config/occupancy-limit: 0
|
||||
radio.0/cisco/wtp-radio-config/reg: 256
|
||||
radio.1/admin-state: 1 - enabled
|
||||
radio.1/capwap/admin-state: 1 - enabled
|
||||
radio.1/capwap80211/tx-power/@cisco/cfg-type: 1 - global
|
||||
radio.1/capwap80211/tx-power/current-tx-power: 0
|
||||
radio.1/cisco/antenna-payload/802-11n-rx-antennas: 0
|
||||
radio.1/cisco/antenna-payload/802-11n-tx-antennas: 0
|
||||
radio.1/cisco/antenna-payload/antenna-1: 1
|
||||
@ -146,14 +170,9 @@ radio.1/cisco/antenna-payload/antenna-mode: 3
|
||||
radio.1/cisco/antenna-payload/diversity-selection: 255
|
||||
radio.1/cisco/antenna-payload/number-of-antennas: 2
|
||||
radio.1/cisco/antenna-payload/unknown: 0
|
||||
radio.1/cisco/ap-mfp-cap-subtype: 66051
|
||||
radio.1/cisco/channel-power: .x0808102408221c16100a04fefe2808221c16100a04fefe2c08221c16100a04fefe3008221c16100a04fefe3408221c16100a04fefe3808221c16100a04fefe3c08221c16100a04fefe4008221c16100a04fefe6408221c16100a04fefe6808221c16100a04fefe6c08221c16100a04fefe7008221c16100a04fefe7408221c16100a04fefe8408221c16100a04fefe8808221c16100a04fefe8c08221c16100a04fefe
|
||||
radio.1/cisco/elem16: .x0c121824
|
||||
radio.1/cisco/elem47: .x0100000000000000000000000000000000
|
||||
radio.1/cisco/elem48: .x00
|
||||
radio.1/cisco/lwelem11: .x00010203
|
||||
radio.1/cisco/lwelem27: .x00000000000000000000000000000000000000000000000000
|
||||
radio.1/cisco/lwelem28: .x0303020202000000000000000000000000000000000000000000313f01
|
||||
radio.1/cisco/lwelem29: .x00010003000000000200001400
|
||||
radio.1/cisco/mac-operation/fragmentation-threshold: 0
|
||||
radio.1/cisco/mac-operation/long-retry: 0
|
||||
radio.1/cisco/mac-operation/reserved: 1
|
||||
@ -165,9 +184,27 @@ radio.1/cisco/multi-domain-capability/first-channel: 36
|
||||
radio.1/cisco/multi-domain-capability/max-tx-power-level: 65535
|
||||
radio.1/cisco/multi-domain-capability/number-of-channels: 16
|
||||
radio.1/cisco/multi-domain-capability/reserved: 1
|
||||
radio.1/cisco/phy-ht-cap/extendend-ht-cap-info: 0
|
||||
radio.1/cisco/phy-ht-cap/ht-cap-info: 0
|
||||
radio.1/cisco/phy-ht-cap/rest: .x000000000000000000000000000000000000000000
|
||||
radio.1/cisco/phy-ht-control/cfg-type: 1 - global
|
||||
radio.1/cisco/phy-ht-control/current-freq: 0
|
||||
radio.1/cisco/phy-ht-control/enable-ht: 0
|
||||
radio.1/cisco/phy-ht-control/rest: .x03000000000200001400
|
||||
radio.1/cisco/proformance-profile/bytes-per-sec: 0
|
||||
radio.1/cisco/proformance-profile/cfg-type: 1 - global
|
||||
radio.1/cisco/proformance-profile/excpection-level: 0
|
||||
radio.1/cisco/proformance-profile/foreigh-threshold: 0
|
||||
radio.1/cisco/proformance-profile/min-num-clients: 0
|
||||
radio.1/cisco/proformance-profile/min-perf-snr: 0
|
||||
radio.1/cisco/proformance-profile/num-clients-threshold: 0
|
||||
radio.1/cisco/proformance-profile/rf-busy-threshold: 0
|
||||
radio.1/cisco/proformance-profile/rssi-threshold: 0
|
||||
radio.1/cisco/spam-cfp-status: false
|
||||
radio.1/cisco/station-cfg/cfg-type: 3
|
||||
radio.1/cisco/station-cfg/current-freq: 3
|
||||
radio.1/cisco/station-cfg/rest: .x020202000000000000000000000000000000000000000000313f01
|
||||
radio.1/cisco/tx-power-levels: .x070011000e000b000800050002ffff0000
|
||||
radio.1/cisco/tx-power/cfg-type: 1 - global
|
||||
radio.1/cisco/tx-power/current-tx-power: 0
|
||||
radio.1/cisco/wtp-radio-config/beacon-period: 0
|
||||
radio.1/cisco/wtp-radio-config/bss-id: .x04fe7f499b90
|
||||
radio.1/cisco/wtp-radio-config/cfg-period: 0
|
||||
@ -177,25 +214,22 @@ radio.1/cisco/wtp-radio-config/country-str1:
|
||||
radio.1/cisco/wtp-radio-config/country-str2:
|
||||
radio.1/cisco/wtp-radio-config/occupancy-limit: 0
|
||||
radio.1/cisco/wtp-radio-config/reg: 256
|
||||
radio.255/admin-state: 1 - enabled
|
||||
statistics-timer: 180
|
||||
wtp-reboot-statistics/ac-initiated-count: 1
|
||||
wtp-reboot-statistics/hw-failure-count: 0
|
||||
wtp-reboot-statistics/last-failure-type: 1
|
||||
wtp-reboot-statistics/link-failure-count: 0
|
||||
wtp-reboot-statistics/other-failure-count: 15
|
||||
wtp-reboot-statistics/reboot-count: 0
|
||||
wtp-reboot-statistics/sw-failure-count: 0
|
||||
wtp-reboot-statistics/unknown-failure-count: 0
|
||||
radio.255/capwap/admin-state: 1 - enabled
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Local
|
||||
#
|
||||
wtp-name: Soft-WTP
|
||||
cisco/ssl-certfile: ../../ssl/certs/wtpc.crt
|
||||
cisco/ssl-cipher: SHA1
|
||||
cisco/ssl-keyfile: ../../ssl/certs/wtpc.key
|
||||
cisco/wtp-use-ac-version: true
|
||||
wtp-board-data/mac-address: .x0800276edf58
|
||||
capwap/wtp-board-data/mac-address: .x0800276edf58
|
||||
capwap/local-ip-address: 192.168.0.14
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,320 +0,0 @@
|
||||
#
|
||||
# This file is igenerated by WAT
|
||||
# If you edit this, your cahnges might be overwritten
|
||||
#
|
||||
capwap/ac-name:
|
||||
capwap/idle-timeout: 300
|
||||
capwap/local-ip-address: 192.168.0.24
|
||||
capwap/location-data: default location
|
||||
capwap/maximum-message-length: 14000
|
||||
capwap/session-id: .x14c4c46b
|
||||
capwap/statistics-timer: 180
|
||||
capwap/timers/echo-interval: 30
|
||||
capwap/timers/max-discovery-interval: 10
|
||||
capwap/wtp-board-data/board-id: .x0000
|
||||
capwap/wtp-board-data/mac-address: .x0800276edf58
|
||||
capwap/wtp-board-data/model-no: "AIR-LAP1142N-E-K9 "
|
||||
capwap/wtp-board-data/revision: A0
|
||||
capwap/wtp-board-data/serial-no: FCZ1406W232
|
||||
capwap/wtp-board-data/vendor: 4232704
|
||||
capwap/wtp-descriptor/bootloader/vendor: 4232704
|
||||
capwap/wtp-descriptor/bootloader/version: .x0c041200
|
||||
capwap/wtp-descriptor/hardware/vendor: 4232704
|
||||
capwap/wtp-descriptor/hardware/version: .x01000000
|
||||
capwap/wtp-descriptor/max-radios: 2
|
||||
capwap/wtp-descriptor/radios-in-use: 2
|
||||
capwap/wtp-descriptor/software/vendor: 4232704
|
||||
capwap/wtp-descriptor/software/version: .x07007400
|
||||
capwap/wtp-fallback: 1
|
||||
capwap/wtp-frame-tunnel-mode: 4
|
||||
capwap/wtp-mac-type: 1 - Split MAC
|
||||
capwap/wtp-name: Soft-WTP
|
||||
capwap/wtp-reboot-statistics/ac-initiated-count: 113
|
||||
capwap/wtp-reboot-statistics/hw-failure-count: 0
|
||||
capwap/wtp-reboot-statistics/last-failure-type: 1
|
||||
capwap/wtp-reboot-statistics/link-failure-count: 0
|
||||
capwap/wtp-reboot-statistics/other-failure-count: 1
|
||||
capwap/wtp-reboot-statistics/reboot-count: 0
|
||||
capwap/wtp-reboot-statistics/sw-failure-count: 0
|
||||
capwap/wtp-reboot-statistics/unknown-failure-count: 0
|
||||
cisco/8011-assoc-limit/enable: false
|
||||
cisco/8011-assoc-limit/interval: 500
|
||||
cisco/8011-assoc-limit/limit: 25
|
||||
cisco/ap-backup-software-version: .x00000000
|
||||
cisco/ap-dtls-data-cfg/cabable: true
|
||||
cisco/ap-dtls-data-cfg/enabled: false
|
||||
cisco/ap-ethernet-port-type: .x000000
|
||||
cisco/ap-group-name: default-group
|
||||
cisco/ap-led-state-config/led-state: 1
|
||||
cisco/ap-log-facility: 0
|
||||
cisco/ap-min-ios-version: .x08036f00
|
||||
cisco/ap-mode-and-type/mode: 0
|
||||
cisco/ap-mode-and-type/type: 15
|
||||
cisco/ap-model/image: 12.4(23c)JA2
|
||||
cisco/ap-model/model: "AIR-LAP1142N-E-K9 "
|
||||
cisco/ap-power-injector-config/selection: 0
|
||||
cisco/ap-power-injector-config/state: 17
|
||||
cisco/ap-power-injector-config/switch-mac-address: .x000000000000
|
||||
cisco/ap-pre-std-switch-config: 0
|
||||
cisco/ap-regulatory-domain.0/code0: 0
|
||||
cisco/ap-regulatory-domain.0/code1: 1
|
||||
cisco/ap-regulatory-domain.0/set: true
|
||||
cisco/ap-regulatory-domain.0/slot: 0
|
||||
cisco/ap-regulatory-domain.1/code0: 0
|
||||
cisco/ap-regulatory-domain.1/code1: 1
|
||||
cisco/ap-regulatory-domain.1/set: true
|
||||
cisco/ap-regulatory-domain.1/slot: 1
|
||||
cisco/ap-static-ip-addr/address: 192.168.0.13
|
||||
cisco/ap-static-ip-addr/enabled: false
|
||||
cisco/ap-static-ip-addr/gateway: 192.168.0.1
|
||||
cisco/ap-static-ip-addr/netmask: 255.255.255.0
|
||||
cisco/ap-static-ip-addr/unknown: 0.0.0.0
|
||||
cisco/ap-sub-mode: 0
|
||||
cisco/ap-telnet-ssh/ssh: false
|
||||
cisco/ap-telnet-ssh/telnet: false
|
||||
cisco/ap-uptime/current-uptime: 36527
|
||||
cisco/ap-uptime/last-uptime: 36513
|
||||
cisco/ap-username-and-password/login-credentials/enable-password: $1$qve.$obrsuC2vFk5/TepRMiMxa.
|
||||
cisco/ap-username-and-password/login-credentials/option: 1025
|
||||
cisco/ap-username-and-password/login-credentials/password: $1$MX4t$F19wCuY8yN5jBD7g2Qutr/
|
||||
cisco/ap-username-and-password/login-credentials/username: admin
|
||||
cisco/cisco-discovery-protocol/data: 513
|
||||
cisco/cisco-discovery-protocol/enabled: false
|
||||
cisco/elem132: .x0100000000
|
||||
cisco/loghost-config/last-joined-ap: actube_X
|
||||
cisco/loghost-config/loghost: 255.255.255.255
|
||||
cisco/lw-path-mtu/len: 1095
|
||||
cisco/lw-path-mtu/max: 1485
|
||||
cisco/lwelem105: .x000b
|
||||
cisco/lwelem14: .x000000000000000000000000000000000000
|
||||
cisco/mcast-mgid-info: .x0000000d0000000000000000000000000000000101000000
|
||||
cisco/mwar-addr/address: 192.168.0.24
|
||||
cisco/mwar-addr/mwar-type: 0
|
||||
cisco/mwar-addr/unknown: 0
|
||||
cisco/reset-button-state: true
|
||||
cisco/rouge-and-mss/enable: false
|
||||
cisco/rouge-and-mss/tcp-adjust-mss: 0
|
||||
cisco/rouge-detection/rest: .x0000000a
|
||||
cisco/rouge-detection/rouge-detection: true
|
||||
cisco/sig-toggle: true
|
||||
cisco/spam-domain-secret: .xe1ffd18a8f15b3b59c0a47a7f17a96e7cb36174f00
|
||||
cisco/ssl-certfile: ../../ssl/certs/wtpc.crt
|
||||
cisco/ssl-cipher: SHA1
|
||||
cisco/ssl-keyfile: ../../ssl/certs/wtpc.key
|
||||
cisco/wtp-board-data/card-id: 0
|
||||
cisco/wtp-board-data/card-revision: 0
|
||||
cisco/wtp-board-data/ethernet-mac-address: .xc47d4f3af8a6
|
||||
cisco/wtp-board-data/options/ant-type: 1
|
||||
cisco/wtp-board-data/options/ap-type: 1
|
||||
cisco/wtp-board-data/options/failover-priority: 0
|
||||
cisco/wtp-board-data/options/flex-connect: 1
|
||||
cisco/wtp-board-data/wtp-model-hi: 0
|
||||
cisco/wtp-board-data/wtp-model-lo: 0
|
||||
cisco/wtp-board-data/wtp-serial-number: FCZ1406W232
|
||||
cisco/wtp-use-ac-version: true
|
||||
radio.0/capwap/admin-state: 1 - enabled
|
||||
radio.0/capwap/decryption-error-report-period: 120
|
||||
radio.0/capwap/operational-state/cause: Normal
|
||||
radio.0/capwap/operational-state/state: enabled
|
||||
radio.0/capwap80211/rate-set: .x82848b960c1218243048606c
|
||||
radio.0/capwap80211/tx-power/@cisco/cfg-type: 1 - global
|
||||
radio.0/capwap80211/tx-power/current-tx-power: 1
|
||||
radio.0/capwap80211/wtp-radio-information: 1
|
||||
radio.0/cisco/air-space-capability: 0
|
||||
radio.0/cisco/antenna-payload/802-11n-rx-antennas: 3
|
||||
radio.0/cisco/antenna-payload/802-11n-tx-antennas: 7
|
||||
radio.0/cisco/antenna-payload/antenna-1: 1
|
||||
radio.0/cisco/antenna-payload/antenna-2: 1
|
||||
radio.0/cisco/antenna-payload/antenna-mode: 3
|
||||
radio.0/cisco/antenna-payload/diversity-selection: 255
|
||||
radio.0/cisco/antenna-payload/number-of-antennas: 2
|
||||
radio.0/cisco/antenna-payload/unknown: 0
|
||||
radio.0/cisco/channel-power: .x08080d0108221c16100a04fefe0208221c16100a04fefe0308221c16100a04fefe0408221c16100a04fefe0508221c16100a04fefe0608221c16100a04fefe0708221c16100a04fefe0808221c16100a04fefe0908221c16100a04fefe0a08221c16100a04fefe0b08221c16100a04fefe0c08221c16100a04fefe0d08221c16100a04fefe
|
||||
radio.0/cisco/direct-sequence-control/cfg-type: 1 - global
|
||||
radio.0/cisco/direct-sequence-control/current-cca-mode: 0
|
||||
radio.0/cisco/direct-sequence-control/current-channel: 1
|
||||
radio.0/cisco/direct-sequence-control/energy-detect-threshold: -50
|
||||
radio.0/cisco/direct-sequence-control/unknown: 1
|
||||
radio.0/cisco/elem145: .x01
|
||||
radio.0/cisco/elem146: .x690f
|
||||
radio.0/cisco/elem153: .x00
|
||||
radio.0/cisco/elem156: .x020100
|
||||
radio.0/cisco/elem16: .x02040b0c
|
||||
radio.0/cisco/elem19: .xc0a800a10001000cc0a800a103000101001ecd774fc43bd27db633509934957d3acb000000000000000052464d000000000000000000000000000000000000000000000000000000000001060b010101
|
||||
radio.0/cisco/elem22: .x0d00b400320102030405060708090a0b0c0d
|
||||
radio.0/cisco/elem24: .x003c000c
|
||||
radio.0/cisco/elem47: .x0100000000000000000000000000000000
|
||||
radio.0/cisco/elem48: .x00
|
||||
radio.0/cisco/elem81: .x00000000010101010a001e0a02051cbfffbfff0a00
|
||||
radio.0/cisco/lwelem11: .x00000203
|
||||
radio.0/cisco/lwelem27: .x182c0000000000000000000000000000ffff00000000000000
|
||||
radio.0/cisco/lwelem28: .x0303020202000000000000000000000000000000000000000000313f01
|
||||
radio.0/cisco/lwelem29: .x00010100000000000200001400
|
||||
radio.0/cisco/lwelem48: .x01055a0101a6c405b06432b03232
|
||||
radio.0/cisco/lwelem9: .x0100000000000000000000000000000000
|
||||
radio.0/cisco/mac-operation/fragmentation-threshold: 2346
|
||||
radio.0/cisco/mac-operation/long-retry: 4
|
||||
radio.0/cisco/mac-operation/reserved: 1
|
||||
radio.0/cisco/mac-operation/rts-threshold: 2347
|
||||
radio.0/cisco/mac-operation/rx-msdu-lifetime: 512
|
||||
radio.0/cisco/mac-operation/short-retry: 7
|
||||
radio.0/cisco/mac-operation/tx-msdu-lifetime: 512
|
||||
radio.0/cisco/multi-domain-capability/first-channel: 1
|
||||
radio.0/cisco/multi-domain-capability/max-tx-power-level: 20
|
||||
radio.0/cisco/multi-domain-capability/number-of-channels: 13
|
||||
radio.0/cisco/multi-domain-capability/reserved: 1
|
||||
radio.0/cisco/radio-module-info/descr: 802.11N 2.4GHz Radio
|
||||
radio.0/cisco/radio-module-info/name: UNKNOWN
|
||||
radio.0/cisco/radio-module-info/serial: FOC14053DBQ
|
||||
radio.0/cisco/radio-module-info/type: Dot11Radio0
|
||||
radio.0/cisco/tx-power-levels: .x070011000e000b000800050002ffff0000
|
||||
radio.0/cisco/wtp-radio-config/beacon-period: 100
|
||||
radio.0/cisco/wtp-radio-config/bss-id: .x04fe7f499b90
|
||||
radio.0/cisco/wtp-radio-config/cfg-period: 4
|
||||
radio.0/cisco/wtp-radio-config/cfg-type: 1
|
||||
radio.0/cisco/wtp-radio-config/cfp-maximum-duration: 60
|
||||
radio.0/cisco/wtp-radio-config/country-str1: "DE "
|
||||
radio.0/cisco/wtp-radio-config/country-str2: "DE "
|
||||
radio.0/cisco/wtp-radio-config/occupancy-limit: 100
|
||||
radio.0/cisco/wtp-radio-config/reg: 167772416
|
||||
radio.0/wlan.1/add-wlan/aironet-ie: true
|
||||
radio.0/wlan.1/add-wlan/broadcast-ssid: true
|
||||
radio.0/wlan.1/add-wlan/dtim-period: 1
|
||||
radio.0/wlan.1/add-wlan/encryption-policy: 4
|
||||
radio.0/wlan.1/add-wlan/hreap-local-switch: 0
|
||||
radio.0/wlan.1/add-wlan/profile-name: tubeC
|
||||
radio.0/wlan.1/add-wlan/qos: 0
|
||||
radio.0/wlan.1/add-wlan/radio-id: 0
|
||||
radio.0/wlan.1/add-wlan/scan-defer-period: 28784
|
||||
radio.0/wlan.1/add-wlan/scan-defer-time: 100
|
||||
radio.0/wlan.1/add-wlan/session-timout: 1800
|
||||
radio.0/wlan.1/add-wlan/ssid: tubeC
|
||||
radio.0/wlan.1/add-wlan/wep-encryption: false
|
||||
radio.0/wlan.1/add-wlan/wep-key: .x1978b2c072f90ff26e4e24c806
|
||||
radio.0/wlan.1/add-wlan/wep-key-index: 1
|
||||
radio.0/wlan.1/add-wlan/wlan-capability: 1073
|
||||
radio.0/wlan.1/add-wlan/wlan-id: 1
|
||||
radio.0/wlan.13/add-wlan/aironet-ie: true
|
||||
radio.0/wlan.13/add-wlan/broadcast-ssid: true
|
||||
radio.0/wlan.13/add-wlan/dtim-period: 19
|
||||
radio.0/wlan.13/add-wlan/encryption-policy: 1
|
||||
radio.0/wlan.13/add-wlan/hreap-local-switch: 16
|
||||
radio.0/wlan.13/add-wlan/profile-name: SuerWLAN
|
||||
radio.0/wlan.13/add-wlan/qos: 0
|
||||
radio.0/wlan.13/add-wlan/radio-id: 0
|
||||
radio.0/wlan.13/add-wlan/scan-defer-period: 15420
|
||||
radio.0/wlan.13/add-wlan/scan-defer-time: 100
|
||||
radio.0/wlan.13/add-wlan/session-timout: 1800
|
||||
radio.0/wlan.13/add-wlan/ssid: SuperSSID
|
||||
radio.0/wlan.13/add-wlan/wep-encryption: false
|
||||
radio.0/wlan.13/add-wlan/wep-key: .x1978b2c072f90ff26e4e24c806
|
||||
radio.0/wlan.13/add-wlan/wep-key-index: 1
|
||||
radio.0/wlan.13/add-wlan/wlan-capability: 1057
|
||||
radio.0/wlan.13/add-wlan/wlan-id: 13
|
||||
radio.1/capwap/admin-state: 1 - enabled
|
||||
radio.1/capwap/decryption-error-report-period: 120
|
||||
radio.1/capwap/operational-state/cause: Normal
|
||||
radio.1/capwap/operational-state/state: enabled
|
||||
radio.1/capwap80211/rate-set: .x8c129824b048606c
|
||||
radio.1/capwap80211/tx-power/@cisco/cfg-type: 1 - global
|
||||
radio.1/capwap80211/tx-power/current-tx-power: 6
|
||||
radio.1/capwap80211/wtp-radio-information: 2
|
||||
radio.1/cisco/air-space-capability: 0
|
||||
radio.1/cisco/antenna-payload/802-11n-rx-antennas: 3
|
||||
radio.1/cisco/antenna-payload/802-11n-tx-antennas: 7
|
||||
radio.1/cisco/antenna-payload/antenna-1: 1
|
||||
radio.1/cisco/antenna-payload/antenna-2: 1
|
||||
radio.1/cisco/antenna-payload/antenna-mode: 3
|
||||
radio.1/cisco/antenna-payload/diversity-selection: 255
|
||||
radio.1/cisco/antenna-payload/number-of-antennas: 2
|
||||
radio.1/cisco/antenna-payload/unknown: 0
|
||||
radio.1/cisco/channel-power: .x0808102408221c16100a04fefe2808221c16100a04fefe2c08221c16100a04fefe3008221c16100a04fefe3408221c16100a04fefe3808221c16100a04fefe3c08221c16100a04fefe4008221c16100a04fefe6408221c16100a04fefe6808221c16100a04fefe6c08221c16100a04fefe7008221c16100a04fefe7408221c16100a04fefe8408221c16100a04fefe8808221c16100a04fefe8c08221c16100a04fefe
|
||||
radio.1/cisco/elem145: .x01
|
||||
radio.1/cisco/elem15/cfg-type: 1 - global
|
||||
radio.1/cisco/elem15/channel: 56
|
||||
radio.1/cisco/elem15/rest: .x07ffffffce010001
|
||||
radio.1/cisco/elem153: .x00
|
||||
radio.1/cisco/elem156: .x020100
|
||||
radio.1/cisco/elem16: .x0c121824
|
||||
radio.1/cisco/elem19: .xc0a800a10001000bc0a800a110000101001ecd774fc43bd27db633509934957d3acb000000000000000052464d000000000000000000000000000000000000000000000000000000000024282c3034383c4064686c707484888c01010101010101010101010101010101
|
||||
radio.1/cisco/elem22: .x1000b4003224282c3034383c4064686c707484888c
|
||||
radio.1/cisco/elem24: .x003c000c
|
||||
radio.1/cisco/elem47: .x0100000000000000000000000000000000
|
||||
radio.1/cisco/elem48: .x00
|
||||
radio.1/cisco/elem81: .x00000000010101010a001e0a02050fbfffbfff0a00
|
||||
radio.1/cisco/lwelem11: .x00010203
|
||||
radio.1/cisco/lwelem27: .x186e0000000000000000000000000000ffff00000000000000
|
||||
radio.1/cisco/lwelem28: .x0303020202000000000000000000000000000000000000000000313f01
|
||||
radio.1/cisco/lwelem29: .x00018803000000000200002803
|
||||
radio.1/cisco/lwelem33: .x00
|
||||
radio.1/cisco/lwelem48: .x01055a0101a6c405b06432b03232
|
||||
radio.1/cisco/lwelem9: .x0100000000000000000000000000000000
|
||||
radio.1/cisco/mac-operation/fragmentation-threshold: 2346
|
||||
radio.1/cisco/mac-operation/long-retry: 4
|
||||
radio.1/cisco/mac-operation/reserved: 1
|
||||
radio.1/cisco/mac-operation/rts-threshold: 2347
|
||||
radio.1/cisco/mac-operation/rx-msdu-lifetime: 512
|
||||
radio.1/cisco/mac-operation/short-retry: 7
|
||||
radio.1/cisco/mac-operation/tx-msdu-lifetime: 512
|
||||
radio.1/cisco/multi-domain-capability/first-channel: 36
|
||||
radio.1/cisco/multi-domain-capability/max-tx-power-level: 20
|
||||
radio.1/cisco/multi-domain-capability/number-of-channels: 4
|
||||
radio.1/cisco/multi-domain-capability/reserved: 1
|
||||
radio.1/cisco/radio-module-info/descr: 802.11N 5GHz Radio
|
||||
radio.1/cisco/radio-module-info/name: UNKNOWN
|
||||
radio.1/cisco/radio-module-info/serial: FOC14053DBQ
|
||||
radio.1/cisco/radio-module-info/type: Dot11Radio1
|
||||
radio.1/cisco/tx-power-levels: .x070011000e000b000800050002ffff0000
|
||||
radio.1/cisco/wtp-radio-config/beacon-period: 100
|
||||
radio.1/cisco/wtp-radio-config/bss-id: .x04fe7f499b90
|
||||
radio.1/cisco/wtp-radio-config/cfg-period: 4
|
||||
radio.1/cisco/wtp-radio-config/cfg-type: 1
|
||||
radio.1/cisco/wtp-radio-config/cfp-maximum-duration: 60
|
||||
radio.1/cisco/wtp-radio-config/country-str1: "DE "
|
||||
radio.1/cisco/wtp-radio-config/country-str2: "DE "
|
||||
radio.1/cisco/wtp-radio-config/occupancy-limit: 100
|
||||
radio.1/cisco/wtp-radio-config/reg: 167772416
|
||||
radio.1/wlan.1/add-wlan/aironet-ie: true
|
||||
radio.1/wlan.1/add-wlan/broadcast-ssid: true
|
||||
radio.1/wlan.1/add-wlan/dtim-period: 1
|
||||
radio.1/wlan.1/add-wlan/encryption-policy: 4
|
||||
radio.1/wlan.1/add-wlan/hreap-local-switch: 0
|
||||
radio.1/wlan.1/add-wlan/profile-name: tubeC
|
||||
radio.1/wlan.1/add-wlan/qos: 0
|
||||
radio.1/wlan.1/add-wlan/radio-id: 1
|
||||
radio.1/wlan.1/add-wlan/scan-defer-period: 28784
|
||||
radio.1/wlan.1/add-wlan/scan-defer-time: 100
|
||||
radio.1/wlan.1/add-wlan/session-timout: 1800
|
||||
radio.1/wlan.1/add-wlan/ssid: tubeC
|
||||
radio.1/wlan.1/add-wlan/wep-encryption: false
|
||||
radio.1/wlan.1/add-wlan/wep-key: .x166ad266a0adea9f140cadf37f
|
||||
radio.1/wlan.1/add-wlan/wep-key-index: 1
|
||||
radio.1/wlan.1/add-wlan/wlan-capability: 17
|
||||
radio.1/wlan.1/add-wlan/wlan-id: 1
|
||||
radio.1/wlan.13/add-wlan/aironet-ie: true
|
||||
radio.1/wlan.13/add-wlan/broadcast-ssid: true
|
||||
radio.1/wlan.13/add-wlan/dtim-period: 19
|
||||
radio.1/wlan.13/add-wlan/encryption-policy: 1
|
||||
radio.1/wlan.13/add-wlan/hreap-local-switch: 16
|
||||
radio.1/wlan.13/add-wlan/profile-name: SuerWLAN
|
||||
radio.1/wlan.13/add-wlan/qos: 0
|
||||
radio.1/wlan.13/add-wlan/radio-id: 1
|
||||
radio.1/wlan.13/add-wlan/scan-defer-period: 15420
|
||||
radio.1/wlan.13/add-wlan/scan-defer-time: 100
|
||||
radio.1/wlan.13/add-wlan/session-timout: 1800
|
||||
radio.1/wlan.13/add-wlan/ssid: SuperSSID
|
||||
radio.1/wlan.13/add-wlan/wep-encryption: false
|
||||
radio.1/wlan.13/add-wlan/wep-key: .x166ad266a0adea9f140cadf37f
|
||||
radio.1/wlan.13/add-wlan/wep-key-index: 1
|
||||
radio.1/wlan.13/add-wlan/wlan-capability: 1
|
||||
radio.1/wlan.13/add-wlan/wlan-id: 13
|
||||
radio.2/cisco/lwelem33: .x00
|
||||
radio.255/capwap/admin-state: 1 - enabled
|
||||
radio.255/capwap/operational-state/cause: Normal
|
||||
radio.255/capwap/operational-state/state: enabled
|
||||
radio.255/cisco/radio-module-info/descr: Cisco Aironet 1140 Series (IEEE 802.11n) Access Point
|
||||
radio.255/cisco/radio-module-info/name: AIR-LAP1142N-E-K9 A0
|
||||
radio.255/cisco/radio-module-info/serial: FCZ1406W232
|
||||
radio.255/cisco/radio-module-info/type: AP1140
|
||||
wfat-rem/bind-addr: 0.0.0.0
|
||||
wfat-rem/discovery-addr: 255.255.255.255
|
@ -14,7 +14,7 @@ static int config_cb(struct cw_ElemHandlerParams * params, uint8_t * elems_ptr,
|
||||
{
|
||||
cw_dbg(DBG_X,"*** Configurations Status Response received ****");
|
||||
cw_cfg_copy(params->cfg, params->conn->global_cfg,DBG_CFG_UPDATES,"GlbalCfg");
|
||||
cw_cfg_save(bootcfg.cfgfilename, params->conn->global_cfg,
|
||||
cw_cfg_save(bootcfg.config_file, params->conn->global_cfg,
|
||||
"#\n# This file is igenerated by WAT\n# If you edit this, your cahnges might be overwritten\n#\n");
|
||||
cw_dbg(DBG_X,"*** Cnofig Saved ***");
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include "cw/cw.h"
|
||||
#include "cw/capwap.h"
|
||||
#include "cw/conn.h"
|
||||
#include "cw/radioinfo.h"
|
||||
#include "cw/log.h"
|
||||
#include "cw/dtls.h"
|
||||
#include "cw/sock.h"
|
||||
@ -36,7 +35,7 @@ static int update_cb(struct cw_ElemHandlerParams * params, uint8_t * elems_ptr,
|
||||
// cw_dbg(DBG_X," **** Configuration Update Request Received ***");
|
||||
// cw_cfg_dump(params->conn->global_cfg);
|
||||
cw_cfg_copy(params->cfg, params->conn->global_cfg,DBG_CFG_UPDATES,"GlobalCfg");
|
||||
cw_cfg_save(bootcfg.cfgfilename, params->conn->global_cfg,
|
||||
cw_cfg_save(bootcfg.config_file, params->conn->global_cfg,
|
||||
"#\n# This file is igenerated by WAT\n# If you edit this, your cahnges might be overwritten\n#\n");
|
||||
// cw_dbg(DBG_X," **** Configuration Update Request Received Saved ***");
|
||||
return 0;
|
||||
|
@ -27,7 +27,8 @@ struct bootcfg{
|
||||
const char * modnames[MAX_MODS];
|
||||
int nmods;
|
||||
const char * modpath;
|
||||
const char * cfgfilename;
|
||||
const char * config_file;
|
||||
const char * startup_file;
|
||||
};
|
||||
|
||||
extern struct bootcfg bootcfg;
|
||||
|
@ -32,9 +32,10 @@ static int parse_args (int argc, char *argv[], struct bootcfg * bootcfg)
|
||||
int c;
|
||||
opterr = 1;
|
||||
|
||||
bootcfg->cfgfilename = "config.ckv";
|
||||
bootcfg->config_file = "config.ckv";
|
||||
bootcfg->startup_file = "startup.ckv";
|
||||
|
||||
while ( (c = getopt (argc, argv, "p:d:vc:m:h")) != -1) {
|
||||
while ( (c = getopt (argc, argv, "s:p:d:vc:m:h")) != -1) {
|
||||
|
||||
switch (c) {
|
||||
case 'v':
|
||||
@ -59,7 +60,10 @@ static int parse_args (int argc, char *argv[], struct bootcfg * bootcfg)
|
||||
cw_mod_set_path(optarg);
|
||||
break;
|
||||
case 'c':
|
||||
bootcfg->cfgfilename = optarg;
|
||||
bootcfg->config_file = optarg;
|
||||
break;
|
||||
case 's':
|
||||
bootcfg->startup_file = optarg;
|
||||
break;
|
||||
case '?':
|
||||
exit(EXIT_FAILURE);
|
||||
@ -86,7 +90,7 @@ int main (int argc, char **argv)
|
||||
struct cw_Conn * conn=NULL;
|
||||
//FILE * file;
|
||||
cw_Cfg_t * global_cfg =NULL;
|
||||
//const cw_Type_t ** ti;
|
||||
cw_Cfg_t * cfg=NULL;
|
||||
int i;
|
||||
int rc=EXIT_FAILURE;
|
||||
struct cw_DiscoveryResults * results;
|
||||
@ -120,14 +124,31 @@ int main (int argc, char **argv)
|
||||
cw_log(LOG_ERR, "Error creating global_cfg: %s", strerror(errno));
|
||||
goto errX;
|
||||
}
|
||||
global_cfg->name = "Global CFG";
|
||||
|
||||
/* read the initial config file */
|
||||
rc = cw_cfg_load(bootcfg.cfgfilename,global_cfg);
|
||||
|
||||
/* read the startup config file */
|
||||
rc = cw_cfg_load(bootcfg.startup_file,global_cfg);
|
||||
if (rc){
|
||||
cw_log(LOG_ERR,"Can't open file '%s':%s",bootcfg.cfgfilename, strerror(errno));
|
||||
cw_log(LOG_ERR,"Can't open file '%s':%s",bootcfg.startup_file, strerror(errno));
|
||||
goto errX;
|
||||
}
|
||||
|
||||
/* Create a temp. cfg */
|
||||
cfg = cw_cfg_create();
|
||||
if (cfg==NULL)
|
||||
goto errX;
|
||||
|
||||
/* read the current config file into temp. cfg */
|
||||
rc = cw_cfg_load(bootcfg.config_file,cfg);
|
||||
if (rc){
|
||||
cw_cfg_destroy(cfg);
|
||||
cw_log(LOG_ERR,"Can't open file '%s':%s",bootcfg.config_file, strerror(errno));
|
||||
goto errX;
|
||||
}
|
||||
|
||||
/* copy the temp. cfg into startup cfg - and show debug messages */
|
||||
cw_cfg_copy(cfg, global_cfg,DBG_CFG_UPDATES,"Startup CFG");
|
||||
|
||||
/* create a connection object */
|
||||
conn = conn_create_noq(-1, NULL);
|
||||
@ -137,6 +158,8 @@ int main (int argc, char **argv)
|
||||
goto errX;
|
||||
}
|
||||
|
||||
cw_cfg_destroy(cfg);
|
||||
|
||||
|
||||
/* conn->mod=mod;*/
|
||||
conn->detected = 1;
|
||||
|
Reference in New Issue
Block a user