Compare commits
9 Commits
6dc8d80102
...
196f56b988
Author | SHA1 | Date | |
---|---|---|---|
196f56b988 | |||
aa3d83d8a4 | |||
ee16f3794f | |||
6405a937d2 | |||
c7a934c64b | |||
e26f9dbfd8 | |||
c422200a9a | |||
301298dcdc | |||
d4c80b5ebb |
9
INSTALL
9
INSTALL
@ -2,13 +2,9 @@ pre-requisites to build actube
|
||||
==============================
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
On FreeBSD 10.2
|
||||
----------------
|
||||
|
||||
pkg install libconfuse
|
||||
pkg install wget
|
||||
pkg install libnettle
|
||||
|
||||
@ -18,8 +14,8 @@ Ubuntu 14.04
|
||||
|
||||
apt-get install build-essential clang
|
||||
apt-get install nettle-dev
|
||||
apt-get install libgnutls28-dev
|
||||
apt-get install libssl-dev
|
||||
apt install bmake
|
||||
|
||||
|
||||
|
||||
@ -29,10 +25,7 @@ pre-requisites to build wtp
|
||||
Ubuntu 14.04
|
||||
------------
|
||||
|
||||
apt-get install cmake
|
||||
apt-get install libnl-genl-3-dev
|
||||
cd src/contrib
|
||||
sudo ./install_libuci.sh
|
||||
|
||||
|
||||
|
||||
|
@ -610,7 +610,7 @@ static void copy(struct cw_ElemHandlerParams * params)
|
||||
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);
|
||||
cw_cfg_copy(params->cfg,conn->local_cfg,0,"");
|
||||
cw_dbg(DBG_X,"Copying done.");
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@
|
||||
#define CAPWAP_ELEM_ECN_SUPPORT 53
|
||||
#define CAPWAP_ELEM_IDLE_TIMEOUT 23
|
||||
#define CW_ELEM_IMAGE_DATA 24
|
||||
#define CW_ELEM_IMAGE_IDENTIFIER 25
|
||||
#define CAPWAP_ELEM_IMAGE_IDENTIFIER 25
|
||||
#define CW_ELEM_IMAGE_INFORMATION 26
|
||||
#define CW_ELEM_INITIATE_DOWNLOAD 27
|
||||
#define CAPWAP_ELEM_LOCATION_DATA 28
|
||||
|
@ -32,7 +32,7 @@ struct cw_StrListElem capwap_strings_elem[] = {
|
||||
{CAPWAP_ELEM_ECN_SUPPORT, "ECN Support"},
|
||||
{CAPWAP_ELEM_IDLE_TIMEOUT, "Idle Timeout"},
|
||||
{CW_ELEM_IMAGE_DATA, "Image Data"},
|
||||
{CW_ELEM_IMAGE_IDENTIFIER, "Image Identifier"},
|
||||
{CAPWAP_ELEM_IMAGE_IDENTIFIER, "Image Identifier"},
|
||||
{CW_ELEM_IMAGE_INFORMATION, "Image Information"},
|
||||
{CW_ELEM_INITIATE_DOWNLOAD, "Initiate Download"},
|
||||
{CAPWAP_ELEM_LOCATION_DATA, "Location Data"},
|
||||
|
55
src/cw/cfg.c
55
src/cw/cfg.c
@ -83,12 +83,22 @@ static void del(void *ptr)
|
||||
|
||||
cw_Cfg_t *cw_cfg_create()
|
||||
{
|
||||
return mavl_create(cmp, del, sizeof(struct cw_Cfg_entry));
|
||||
cw_Cfg_t * cfg;
|
||||
cfg = malloc(sizeof(cw_Cfg_t));
|
||||
if (cfg == NULL)
|
||||
return NULL;
|
||||
memset(cfg,0,sizeof(cw_Cfg_t));
|
||||
cfg->cfg = mavl_create(cmp, del, sizeof(struct cw_Cfg_entry));
|
||||
if (cfg->cfg==NULL){
|
||||
cw_cfg_destroy(cfg);
|
||||
return NULL;
|
||||
}
|
||||
return cfg;
|
||||
}
|
||||
|
||||
int cw_cfg_set(cw_Cfg_t * cfg, const char *key, const char *val)
|
||||
{
|
||||
cw_dbg(DBG_CFG_SET, "%s: %s",key,val);
|
||||
cw_dbg(cfg->dbg_level, "%s%s: %s",cfg->dbg_prefix,key,val);
|
||||
|
||||
struct cw_Cfg_entry e;
|
||||
int replaced;
|
||||
@ -101,7 +111,7 @@ int cw_cfg_set(cw_Cfg_t * cfg, const char *key, const char *val)
|
||||
free((void *) e.key);
|
||||
return 0;
|
||||
}
|
||||
void *rc = mavl_replace(cfg, &e, &replaced);
|
||||
void *rc = mavl_replace(cfg->cfg, &e, &replaced);
|
||||
if (!rc) {
|
||||
del(&e);
|
||||
return 0;
|
||||
@ -116,7 +126,7 @@ const char *cw_cfg_get(cw_Cfg_t * cfg, const char *key, const char *def)
|
||||
{
|
||||
struct cw_Cfg_entry e, *r;
|
||||
e.key = key;
|
||||
r = mavl_get(cfg, &e);
|
||||
r = mavl_get(cfg->cfg, &e);
|
||||
if (!r)
|
||||
return def;
|
||||
return r->val;
|
||||
@ -129,7 +139,7 @@ const char *cw_cfg_get_l(cw_Cfg_t ** cfg, const char * key, const char *def)
|
||||
for(i=0; cfg[i]!=NULL; i++){
|
||||
// cw_dbg(DBG_X,"GET_L IN: %p",cfg[i]);
|
||||
e.key = key;
|
||||
r = mavl_get(cfg[i], &e);
|
||||
r = mavl_get(cfg[i]->cfg, &e);
|
||||
if (r!=NULL)
|
||||
return r->val;
|
||||
}
|
||||
@ -167,7 +177,7 @@ void cw_cfg_dump(cw_Cfg_t * cfg)
|
||||
{
|
||||
mavliter_t it;
|
||||
struct cw_Cfg_entry *e;
|
||||
mavliter_init(&it, cfg);
|
||||
mavliter_init(&it, cfg->cfg);
|
||||
mavliter_foreach(&it) {
|
||||
|
||||
e = mavliter_get(&it);
|
||||
@ -475,7 +485,7 @@ int cw_cfg_write_to_file(FILE *f, cw_Cfg_t * cfg)
|
||||
{
|
||||
mavliter_t it;
|
||||
struct cw_Cfg_entry *e;
|
||||
mavliter_init(&it, cfg);
|
||||
mavliter_init(&it, cfg->cfg);
|
||||
mavliter_foreach(&it) {
|
||||
int n;
|
||||
e = mavliter_get(&it);
|
||||
@ -519,7 +529,7 @@ void cw_cfg_iter_init(cw_Cfg_t * cfg, struct cw_Cfg_iter *cfi, const char *base)
|
||||
struct cw_Cfg_entry search;
|
||||
search.key = base;
|
||||
|
||||
mavliter_init(&(cfi->it), cfg);
|
||||
mavliter_init(&(cfi->it), cfg->cfg);
|
||||
mavliter_seek(&(cfi->it), &search, 0);
|
||||
cfi->base = base;
|
||||
}
|
||||
@ -642,7 +652,7 @@ int cw_cfg_get_next_index(cw_Cfg_t * cfg, const char *key)
|
||||
search.key=ikey;
|
||||
/*//result = ktvn(ktv,&search);*/
|
||||
|
||||
result = mavl_get_last(cfg,&search);
|
||||
result = mavl_get_last(cfg->cfg,&search);
|
||||
if (result == NULL){
|
||||
return 0;
|
||||
}
|
||||
@ -684,10 +694,10 @@ int cw_cfg_set_val(cw_Cfg_t * cfg, const char *key, const struct cw_Type *type,
|
||||
|
||||
|
||||
|
||||
void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst)
|
||||
void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst,int dbg_level,const char *dbg_prefix)
|
||||
{
|
||||
mavliter_t it;
|
||||
mavliter_init(&it, src);
|
||||
mavliter_init(&it, src->cfg);
|
||||
mavliter_foreach(&it) {
|
||||
int exists;
|
||||
struct cw_Cfg_entry * old_elem,*e, new_elem;
|
||||
@ -705,7 +715,7 @@ void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst)
|
||||
*/
|
||||
|
||||
|
||||
old_elem = mavl_insert(dst,&new_elem,&exists);
|
||||
old_elem = mavl_insert(dst->cfg,&new_elem,&exists);
|
||||
|
||||
/* cw_dbg(DBG_X, "CPY: %s: %s -> %s [%d]",new_elem.key,new_elem.val,old_elem->val,exists);
|
||||
if (exists){
|
||||
@ -716,9 +726,7 @@ void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst)
|
||||
*/
|
||||
|
||||
if (!exists){
|
||||
|
||||
|
||||
cw_dbg(DBG_CFG_SET, "New: %s: %s",new_elem.key,new_elem.val);
|
||||
cw_dbg(dbg_level, "%s: [undef] -> %s",new_elem.key,new_elem.val);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -730,11 +738,12 @@ void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst)
|
||||
continue;
|
||||
}
|
||||
|
||||
cw_dbg(DBG_CFG_SET, "Replace: %s: %s (old: %s)",new_elem.key, new_elem.val, old_elem->val);
|
||||
if(dst->del){
|
||||
dst->del(old_elem);
|
||||
cw_dbg(dbg_level, "%s: %s -> %s",new_elem.key,old_elem->val,new_elem.val);
|
||||
// cw_dbg(DBG_X, "Replace: %s: %s (old: %s)",new_elem.key, new_elem.val, old_elem->val);
|
||||
if(dst->cfg->del){
|
||||
dst->cfg->del(old_elem);
|
||||
}
|
||||
memcpy(old_elem,&new_elem,dst->data_size);
|
||||
memcpy(old_elem,&new_elem,dst->cfg->data_size);
|
||||
}
|
||||
|
||||
}
|
||||
@ -742,13 +751,15 @@ void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst)
|
||||
|
||||
void cw_cfg_destroy(cw_Cfg_t *cfg)
|
||||
{
|
||||
mavl_destroy(cfg);
|
||||
if (cfg->cfg)
|
||||
mavl_destroy(cfg->cfg);
|
||||
free(cfg);
|
||||
}
|
||||
|
||||
|
||||
void cw_cfg_clear(cw_Cfg_t *cfg)
|
||||
{
|
||||
mavl_del_all(cfg);
|
||||
mavl_del_all(cfg->cfg);
|
||||
}
|
||||
|
||||
|
||||
@ -757,7 +768,7 @@ int cw_cfg_base_exists(cw_Cfg_t * cfg, const char *key)
|
||||
struct cw_Cfg_entry e, *result;
|
||||
//cw_dbg(DBG_X,"LOOX FOR: %s",key);
|
||||
e.key=key;
|
||||
result = mavl_get_first(cfg,&e);
|
||||
result = mavl_get_first(cfg->cfg,&e);
|
||||
if (result == NULL)
|
||||
return 0;
|
||||
//cw_dbg(DBG_X,"BASEXXX: %s",result->key);
|
||||
|
11
src/cw/cfg.h
11
src/cw/cfg.h
@ -7,7 +7,14 @@
|
||||
|
||||
#define CW_CFG_MAX_KEY_LEN 1024
|
||||
|
||||
typedef struct mavl cw_Cfg_t;
|
||||
struct cw_Cfg {
|
||||
struct mavl * cfg;
|
||||
const char *name;
|
||||
int dbg_level;
|
||||
const char *dbg_prefix;
|
||||
};
|
||||
|
||||
typedef struct cw_Cfg cw_Cfg_t;
|
||||
|
||||
cw_Cfg_t * cw_cfg_create();
|
||||
int cw_cfg_set(cw_Cfg_t *cfg,const char *key, const char *val);
|
||||
@ -39,7 +46,7 @@ bstr16_t cw_cfg_get_bstr16(cw_Cfg_t * cfg, const char * key, const char *def);
|
||||
int cw_cfg_set_bstr16(cw_Cfg_t * cfg, const char * key, bstr16_t str);
|
||||
int cw_cfg_get_next_index(cw_Cfg_t * cfg, const char *key);
|
||||
const char *cw_cfg_get_l(cw_Cfg_t ** cfg, const char * key, const char *def);
|
||||
void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst);
|
||||
void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst,int dbg_level,const char *dbg_prefix);
|
||||
void cw_cfg_destroy(cw_Cfg_t *cfg);
|
||||
void cw_cfg_clear(cw_Cfg_t *cfg);
|
||||
int cw_cfg_base_exists(cw_Cfg_t * cfg, const char *key);
|
||||
|
@ -474,16 +474,20 @@ static int process_elements(struct cw_Conn *conn, uint8_t * rawmsg, int len,
|
||||
|
||||
elems_ptr = cw_get_msg_elems_ptr(msg_ptr);
|
||||
|
||||
|
||||
cw_dbg(DBG_MSG_PARSING, "*** Parsing message of type %d - (%s) ***",
|
||||
message->type, message->name);
|
||||
/* if (cw_dbg_is_level(DBG_ELEM_IN)){
|
||||
cw_dbg(DBG_MSG_PARSING, "Parsing message of type %d - (%s)",
|
||||
message->type, message->name);
|
||||
}*/
|
||||
|
||||
memset(¶ms,0,sizeof(struct cw_ElemHandlerParams));
|
||||
|
||||
params.mand_found = mavl_create_conststr();
|
||||
params.unrecognized = mlist_create(NULL, NULL, sizeof(uint8_t *));
|
||||
|
||||
params.cfg = cw_cfg_create();
|
||||
params.cfg = cw_cfg_create();
|
||||
params.cfg->dbg_level = DBG_ELEM_DETAIL_IN;
|
||||
params.cfg->dbg_prefix = " ";
|
||||
|
||||
params.cfg_list[0]=params.cfg;
|
||||
params.cfg_list[1]=conn->local_cfg;
|
||||
params.cfg_list[2]=conn->global_cfg;
|
||||
@ -493,6 +497,7 @@ static int process_elements(struct cw_Conn *conn, uint8_t * rawmsg, int len,
|
||||
params.msgdata = message;
|
||||
params.msgset=conn->msgset;
|
||||
params.conn = conn;
|
||||
params.dbg_level = DBG_ELEM_IN;
|
||||
|
||||
cw_decode_elements(¶ms,elems_ptr, elems_len);
|
||||
|
||||
@ -502,8 +507,8 @@ static int process_elements(struct cw_Conn *conn, uint8_t * rawmsg, int len,
|
||||
if (params.mand_found)
|
||||
cw_check_missing_mand(message, params.mand_found,conn->msgset->handlers_by_key);
|
||||
|
||||
cw_dbg(DBG_MSG_PARSING, "*** End parsing message of type %d (%s) ***",
|
||||
message->type, message->name);
|
||||
// cw_dbg(DBG_MSG_PARSING, "*** End parsing message of type %d (%s) ***",
|
||||
// message->type, message->name);
|
||||
|
||||
if (params.mand_found)
|
||||
mavl_destroy(params.mand_found);
|
||||
|
@ -78,14 +78,14 @@ struct cw_Conn {
|
||||
cw_Cfg_t * local_cfg; /**< local_cfg contains overrides for global_cfg
|
||||
wich are related to this conn object. */
|
||||
|
||||
mavl_t remote_cfg; /**< contains the configuration we now from the
|
||||
cw_Cfg_t * remote_cfg; /**< contains the configuration we now from the
|
||||
device this conn object ist connected to.
|
||||
Typically this is what we have got from discovery
|
||||
response or join response in WTP mode.
|
||||
And in AC mode this contains date receive from
|
||||
configuration status request. */
|
||||
|
||||
mavl_t update_cfg;
|
||||
cw_Cfg_t * update_cfg;
|
||||
|
||||
bstr16_t session_id;
|
||||
|
||||
|
@ -14,6 +14,43 @@ int conn_send_msg(struct cw_Conn * conn, uint8_t *rawmsg)
|
||||
packetlen = cw_get_hdr_msg_total_len(rawmsg);
|
||||
|
||||
cw_dbg_msg(DBG_MSG_OUT, conn,rawmsg, packetlen,(struct sockaddr*)&conn->addr);
|
||||
{
|
||||
int type;
|
||||
uint8_t *msgptr;
|
||||
msgptr = rawmsg + cw_get_hdr_msg_offset(rawmsg);
|
||||
struct cw_MsgData * msg;
|
||||
type = cw_get_msg_type(msgptr);
|
||||
msg = cw_msgset_get_msgdata(conn->msgset,type);
|
||||
uint8_t *elems_ptr;
|
||||
|
||||
int offset = cw_get_hdr_msg_offset(rawmsg);
|
||||
|
||||
uint8_t *msg_ptr = rawmsg + offset;
|
||||
int elems_len = cw_get_msg_elems_len(msg_ptr);
|
||||
elems_ptr = cw_get_msg_elems_ptr(msg_ptr);
|
||||
cw_Cfg_t * cfg = cw_cfg_create();
|
||||
cfg->dbg_level = DBG_ELEM_DETAIL_OUT;
|
||||
cfg->dbg_prefix = " ";
|
||||
|
||||
struct cw_ElemHandlerParams params;
|
||||
memset(¶ms,0,sizeof(struct cw_ElemHandlerParams));
|
||||
|
||||
params.cfg=cfg;
|
||||
params.msgset=conn->msgset;
|
||||
params.msgdata=msg;
|
||||
params.mand_found = mavl_create_conststr();
|
||||
params.dbg_level = DBG_ELEM_OUT;
|
||||
|
||||
cw_decode_elements( ¶ms, elems_ptr,elems_len);
|
||||
cw_cfg_destroy(cfg);
|
||||
if (params.mand_found){
|
||||
cw_check_missing_mand(msg, params.mand_found,conn->msgset->handlers_by_key);
|
||||
mavl_destroy(params.mand_found);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Zyxel doesn't count msg element length from
|
||||
|
@ -385,7 +385,7 @@ int cw_read_ac_descriptor(mavl_t store,
|
||||
struct cw_DescriptorSubelemDef *allowed);
|
||||
|
||||
|
||||
int cw_setup_dtls(struct cw_Conn * conn, mavl_t cfg, const char *prefix, char * default_cipher);
|
||||
int cw_setup_dtls(struct cw_Conn * conn, cw_Cfg_t * cfg, const char *prefix, char * default_cipher);
|
||||
|
||||
|
||||
|
||||
|
@ -18,9 +18,9 @@ void cw_dbg_set_level (int level, int on)
|
||||
break;
|
||||
default:
|
||||
if (on)
|
||||
cw_dbg_opt_level |= (1 << (level));
|
||||
cw_dbg_opt_level |= (level);
|
||||
else
|
||||
cw_dbg_opt_level &= (0xffffffff) ^ (1 << (level));
|
||||
cw_dbg_opt_level &= (0xffffffff) ^ (level);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ int cw_dbg_set_level_from_str(const char *level)
|
||||
switch(*level){
|
||||
case '-':
|
||||
case '!':
|
||||
case '~':
|
||||
on =0;
|
||||
slevel=level+1;
|
||||
break;
|
||||
|
@ -9,7 +9,7 @@ int cw_write_radio_element(struct cw_ElemHandler * handler, struct cw_ElemHandle
|
||||
{
|
||||
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
cw_Val_t *elem, search;
|
||||
// cw_Val_t *elem;
|
||||
int len;
|
||||
uint8_t * d;
|
||||
|
||||
|
119
src/cw/dbg.c
119
src/cw/dbg.c
@ -63,14 +63,13 @@ static struct cw_StrListElem theme0[] = {
|
||||
{DBG_PKT_DMP_OUT, ANSI_BYELLOW ANSI_ITALIC},
|
||||
|
||||
{DBG_MSG_IN, ANSI_BLUE ANSI_BOLD},
|
||||
{DBG_MSG_PARSING, ANSI_BLUE },
|
||||
|
||||
{DBG_MSG_OUT, ANSI_BLUE ANSI_BOLD ANSI_ITALIC},
|
||||
{DBG_MSG_ASSEMBLY, ANSI_BLUE ANSI_ITALIC},
|
||||
{DBG_MSG_COMPOSE, ANSI_BLUE ANSI_ITALIC},
|
||||
|
||||
|
||||
{DBG_MSG_IN_DMP, ANSI_BBLUE },
|
||||
{DBG_MSG_OUT_DMP, ANSI_BBLUE ANSI_ITALIC},
|
||||
{DBG_MSG_DMP_IN, ANSI_BBLUE },
|
||||
{DBG_MSG_DMP_OUT, ANSI_BBLUE ANSI_ITALIC},
|
||||
|
||||
{DBG_ELEM_IN, ANSI_DEFAULT},
|
||||
{DBG_ELEM_OUT, ANSI_DEFAULT ANSI_ITALIC},
|
||||
@ -79,7 +78,7 @@ static struct cw_StrListElem theme0[] = {
|
||||
{DBG_PKT_ERR, ANSI_RED},
|
||||
{DBG_ELEM_ERR, ANSI_RED},
|
||||
|
||||
{DBG_SUBELEM, ANSI_BBLACK},
|
||||
// {DBG_SUBELEM, ANSI_BBLACK},
|
||||
{DBG_DTLS, ANSI_MAGENTA ANSI_BOLD},
|
||||
{DBG_DTLS_DETAIL, ANSI_MAGENTA},
|
||||
{DBG_DTLS_BIO, ANSI_BMAGENTA},
|
||||
@ -92,9 +91,9 @@ static struct cw_StrListElem theme0[] = {
|
||||
{DBG_X, "\x1b[31m"},
|
||||
{DBG_WARN, ANSI_CYAN},
|
||||
{DBG_MOD, ANSI_WHITE},
|
||||
{DBG_CFG_DMP, ANSI_BCYAN },
|
||||
|
||||
|
||||
// {DBG_CFG_DMP, ANSI_BCYAN },
|
||||
{DBG_CFG_UPDATES,ANSI_BRED},
|
||||
|
||||
{CW_STR_STOP, ""}
|
||||
};
|
||||
|
||||
@ -104,7 +103,8 @@ static struct cw_StrListElem * color_on = theme0;
|
||||
struct cw_StrListElem color_ontext[] = {
|
||||
|
||||
/* {DBG_ELEM_DMP, "\x1b[37m"},*/
|
||||
{DBG_ELEM_DMP, ANSI_BBLACK ANSI_ITALIC},
|
||||
{DBG_ELEM_DMP_OUT, ANSI_BBLACK ANSI_ITALIC},
|
||||
{DBG_ELEM_DMP_IN, ANSI_BBLACK},
|
||||
|
||||
{CW_STR_STOP, ""}
|
||||
};
|
||||
@ -117,31 +117,31 @@ static struct cw_StrListElem color_off[] = {
|
||||
*/
|
||||
|
||||
static struct cw_StrListElem prefix[] = {
|
||||
{DBG_INFO, " Info -"},
|
||||
{DBG_PKT_IN, " Pkt IN -"},
|
||||
{DBG_PKT_OUT, " Pkt Out -"},
|
||||
{DBG_MSG_IN, " Msg IN -"},
|
||||
{DBG_MSG_OUT, " Msg Out -"},
|
||||
{DBG_INFO, "Info -"},
|
||||
{DBG_PKT_IN, "Pkt In -"},
|
||||
{DBG_PKT_OUT, "Pkt Out -"},
|
||||
{DBG_MSG_IN, "Msg In - "},
|
||||
{DBG_MSG_OUT, "Msg Out - "},
|
||||
|
||||
{DBG_ELEM_IN, " Msg Element -"},
|
||||
{DBG_ELEM_OUT, " Msg Element -"},
|
||||
{DBG_ELEM_IN, " Msg Element -"},
|
||||
{DBG_ELEM_OUT, " Msg Element -"},
|
||||
|
||||
{DBG_MSG_ERR, " Msg Error -"},
|
||||
{DBG_PKT_ERR, " Pkt Error -"},
|
||||
{DBG_ELEM_ERR, " Elem Error -"},
|
||||
{DBG_RFC, " RFC -"},
|
||||
{DBG_SUBELEM, " Sub-Element - "},
|
||||
{DBG_DTLS, " DTLS - "},
|
||||
{DBG_DTLS_DETAIL, " DTLS - "},
|
||||
{DBG_WARN, " Warning - "},
|
||||
{DBG_MOD, " Mod - "},
|
||||
{DBG_STATE, " STATEMACHINE - "},
|
||||
{DBG_CFG_SET, " Cfg Set - "},
|
||||
{DBG_MSG_ERR, " Msg Error -"},
|
||||
{DBG_PKT_ERR, " Pkt Error -"},
|
||||
{DBG_ELEM_ERR, " Elem Error -"},
|
||||
{DBG_RFC, " RFC -"},
|
||||
{DBG_DTLS, "DTLS - "},
|
||||
{DBG_DTLS_DETAIL, "DTLS - "},
|
||||
{DBG_WARN, " Warning - "},
|
||||
{DBG_MOD, "Mod - "},
|
||||
{DBG_STATE, "STATEMACHINE - "},
|
||||
{DBG_CFG_UPDATES, "Cfg - "},
|
||||
|
||||
|
||||
|
||||
{DBG_X, "XXXXX - "},
|
||||
|
||||
|
||||
{CW_STR_STOP, ""}
|
||||
};
|
||||
|
||||
@ -183,10 +183,13 @@ const char *get_dbg_color_ontext(int level)
|
||||
|
||||
int cw_dbg_is_level(int level)
|
||||
{
|
||||
if (level >= DBG_ALL ){
|
||||
if (level > 1 && (level &1))
|
||||
return 1;
|
||||
}
|
||||
return (cw_dbg_opt_level & (1<<level));
|
||||
|
||||
/* if (level >= DBG_ALL ){
|
||||
return 1;
|
||||
}*/
|
||||
return (cw_dbg_opt_level & (level));
|
||||
}
|
||||
|
||||
|
||||
@ -197,11 +200,11 @@ static void cw_dbg_vlog_line(struct cw_LogWriter * writer,
|
||||
char fbuf[512];
|
||||
|
||||
if ( writer->colored){
|
||||
sprintf(fbuf,"DBG: %s%s %s%s%s",
|
||||
sprintf(fbuf,"DBG: %s%s%s%s%s",
|
||||
prefix_color,prefix,textcolor,format,DBG_CLR_OFF);
|
||||
}
|
||||
else{
|
||||
sprintf(fbuf,"DBG: %s %s",
|
||||
sprintf(fbuf,"DBG: %s%s",
|
||||
prefix,format);
|
||||
|
||||
}
|
||||
@ -268,7 +271,7 @@ void cw_dbg_pkt(int level, struct cw_Conn *conn, uint8_t * packet, int len,
|
||||
|
||||
cw_dbg(level, "%s", buf);
|
||||
|
||||
if (cw_dbg_is_level(DBG_PKT_DMP)) {
|
||||
// if (cw_dbg_is_level(DBG_PKT_DMP)) {
|
||||
int dlevel;
|
||||
if (level == DBG_PKT_IN){
|
||||
dlevel=DBG_PKT_DMP_IN;
|
||||
@ -277,7 +280,7 @@ void cw_dbg_pkt(int level, struct cw_Conn *conn, uint8_t * packet, int len,
|
||||
dlevel=DBG_PKT_DMP_OUT;
|
||||
}
|
||||
cw_dbg_dmp(dlevel,packet,len,"");
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -352,16 +355,16 @@ void cw_dbg_msg(int level, struct cw_Conn *conn, uint8_t * packet, int len,
|
||||
cw_dbg(level, "%s", buf);
|
||||
|
||||
|
||||
if (cw_dbg_is_level(DBG_MSG_DMP)){
|
||||
// if (cw_dbg_is_level(DBG_MSG_DMP)){
|
||||
int dlevel;
|
||||
if(level==DBG_MSG_IN){
|
||||
dlevel = DBG_MSG_IN_DMP;
|
||||
dlevel = DBG_MSG_DMP_IN;
|
||||
}
|
||||
else{
|
||||
dlevel = DBG_MSG_OUT_DMP;
|
||||
dlevel = DBG_MSG_DMP_OUT;
|
||||
}
|
||||
cw_dbg_dmp(dlevel,packet,len,"");
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@ -410,9 +413,11 @@ void cw_dbg_elem(int level, struct cw_Conn *conn, int msg,
|
||||
handler->name,len);
|
||||
|
||||
if (cw_dbg_is_level(DBG_ELEM_DMP)) {
|
||||
/*dmp = cw_format_dump(msgbuf,len,NULL);*/
|
||||
|
||||
cw_dbg_dmp(DBG_ELEM_DMP,msgbuf,len,"");
|
||||
if (level == DBG_ELEM_OUT)
|
||||
cw_dbg_dmp(DBG_ELEM_DMP_OUT,msgbuf,len,"");
|
||||
else
|
||||
cw_dbg_dmp(DBG_ELEM_DMP_IN,msgbuf,len,"");
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
@ -421,38 +426,6 @@ void cw_dbg_elem(int level, struct cw_Conn *conn, int msg,
|
||||
|
||||
|
||||
|
||||
void cw_dbg_ktv_dump(mavl_t ktv, uint32_t dbglevel,
|
||||
const char *header, const char *prefix, const char *footer )
|
||||
{
|
||||
char value[500];
|
||||
struct cw_Val * data;
|
||||
mavliter_t it;
|
||||
const struct cw_Type * type;
|
||||
|
||||
if (header != NULL)
|
||||
cw_dbg (dbglevel, header);
|
||||
|
||||
mavliter_init(&it,ktv);
|
||||
|
||||
mavliter_foreach(&it){
|
||||
|
||||
data = mavliter_get(&it);
|
||||
type = data->type;
|
||||
type->to_str(data,value,0);
|
||||
|
||||
cw_dbg(dbglevel,"%s%s :%s: %s",prefix,data->key,type->get_type_name(data), value);
|
||||
}
|
||||
|
||||
if (footer != NULL)
|
||||
cw_dbg (dbglevel, footer);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
110
src/cw/dbg.h
110
src/cw/dbg.h
@ -47,95 +47,99 @@
|
||||
* Debug levels
|
||||
*/
|
||||
enum cw_dbg_levels{
|
||||
/** Show headers of incomming CAPWAP packets */
|
||||
DBG_PKT_IN=0,
|
||||
|
||||
/** Show headers of outgoing CAPWAP packets */
|
||||
DBG_PKT_OUT,
|
||||
/** Show headers of incomming/outgoing CAPWAP packets */
|
||||
DBG_PKT_IN = (1<<0),
|
||||
DBG_PKT_OUT = (1<<1),
|
||||
|
||||
/** Hex-dump incomming/outgoing CAPWAP packets */
|
||||
DBG_PKT_DMP_IN = (1<<3),
|
||||
DBG_PKT_DMP_OUT = (1<<4),
|
||||
|
||||
/** Incomming CAPWAP packets with errors, wich would
|
||||
usually silently discarded */
|
||||
DBG_PKT_ERR,
|
||||
|
||||
/** Dump content of incomming packets */
|
||||
DBG_PKT_DMP,
|
||||
|
||||
/** Display incomming CAPWAP/LWAPP messages */
|
||||
DBG_MSG_IN,
|
||||
|
||||
/** Display outgoing CAPWAP/LWAPP messages */
|
||||
DBG_MSG_OUT,
|
||||
|
||||
DBG_MSG_DMP,
|
||||
DBG_PKT_ERR = (1<<5),
|
||||
|
||||
|
||||
/** Display incomming/outgoing CAPWAP/LWAPP messages */
|
||||
DBG_MSG_IN = (1<<6),
|
||||
DBG_MSG_OUT = (1<<7),
|
||||
|
||||
/** Show hex-dump of messages */
|
||||
DBG_MSG_DMP_IN = (1<<8),
|
||||
DBG_MSG_DMP_OUT = (1<<9),
|
||||
|
||||
/** Message errors */
|
||||
DBG_MSG_ERR,
|
||||
DBG_MSG_ERR = (1<<10),
|
||||
|
||||
/** Show message elements in incomming messages */
|
||||
DBG_ELEM_IN,
|
||||
|
||||
/** Show message elements assembled for outgoing messages */
|
||||
DBG_ELEM_OUT,
|
||||
/** Show message elements in incomming/outgoing messages */
|
||||
DBG_ELEM_IN = (1<<11),
|
||||
DBG_ELEM_OUT = (1<<12),
|
||||
|
||||
/** Show message element details */
|
||||
DBG_ELEM_DETAIL,
|
||||
DBG_ELEM_DETAIL_IN = (1<<13),
|
||||
DBG_ELEM_DETAIL_OUT = (1<<14),
|
||||
|
||||
/** Error in msg elements */
|
||||
DBG_ELEM_ERR,
|
||||
|
||||
/** Show subelements */
|
||||
DBG_SUBELEM,
|
||||
|
||||
/** Show dump of subelements */
|
||||
DBG_SUBELEM_DMP,
|
||||
DBG_ELEM_ERR = (1<<15),
|
||||
|
||||
/** hex dump elements */
|
||||
DBG_ELEM_DMP,
|
||||
DBG_ELEM_DMP = (1<<16),
|
||||
|
||||
/** General infos, like CAPWAP state */
|
||||
DBG_INFO,
|
||||
DBG_INFO = (1<<17),
|
||||
|
||||
/** Misc. warnings */
|
||||
DBG_WARN,
|
||||
DBG_WARN = (1<<18),
|
||||
|
||||
/** RFC related */
|
||||
DBG_RFC,
|
||||
DBG_RFC = (1<<19),
|
||||
|
||||
/** DTLS related messages */
|
||||
DBG_DTLS,
|
||||
DBG_DTLS = (1<<20),
|
||||
|
||||
/** DTLS BIOs in/out */
|
||||
DBG_DTLS_BIO,
|
||||
DBG_DTLS_BIO = (1<<21),
|
||||
|
||||
/** Dump DTLS BIO i/o */
|
||||
DBG_DTLS_BIO_DMP,
|
||||
DBG_DTLS_BIO_DMP = (1<<22),
|
||||
|
||||
/** Show DTLS Details */
|
||||
DBG_DTLS_DETAIL,
|
||||
DBG_DTLS_DETAIL = (1<<23),
|
||||
|
||||
DBG_CFG_DMP,
|
||||
// DBG_CFG_DMP = (1<<20),
|
||||
|
||||
DBG_CFG_SET,
|
||||
// DBG_CFG_SET = (1<<21),
|
||||
|
||||
/** Debug Mods */
|
||||
DBG_MOD,
|
||||
DBG_MOD = (1<<24),
|
||||
|
||||
DBG_STATE, /**<Debug State machine */
|
||||
/**Debug State machine */
|
||||
DBG_STATE = (1<<25),
|
||||
|
||||
DBG_ALL,
|
||||
|
||||
DBG_PKT_DMP_OUT,
|
||||
DBG_PKT_DMP_IN,
|
||||
DBG_MSG_COMPOSE = (1<<26),
|
||||
|
||||
DBG_CFG_UPDATES = (1<<27),
|
||||
|
||||
DBG_MSG_IN_DMP,
|
||||
DBG_MSG_OUT_DMP,
|
||||
|
||||
DBG_MSG_ASSEMBLY,
|
||||
DBG_MSG_PARSING,
|
||||
|
||||
DBG_X
|
||||
|
||||
DBG_X = (1<<30),
|
||||
DBG_ALL = (0xffffffff),
|
||||
|
||||
|
||||
DBG_ELEM_DMP_IN = 7,
|
||||
DBG_ELEM_DMP_OUT = 9,
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define DBG_MSG (DBG_MSG_IN | DBG_MSG_OUT)
|
||||
#define DBG_PKT (DBG_PKT_IN | DBG_PKT_OUT)
|
||||
#define DBG_ELEM (DBG_ELEM_IN | DBG_ELEM_OUT)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define DBG_LN __FILE__,__LINE__
|
||||
|
||||
|
@ -35,44 +35,55 @@
|
||||
* Debug strings
|
||||
*/
|
||||
struct cw_StrListElem cw_dbg_strings[] = {
|
||||
{ DBG_INFO, "info", },
|
||||
{ DBG_PKT_IN, "pkt_in" },
|
||||
{ DBG_PKT_OUT, "pkt_out" },
|
||||
{ DBG_PKT_ERR, "pkt_err" },
|
||||
{ DBG_PKT_DMP, "pkt_dmp" },
|
||||
{ DBG_MSG_IN, "msg_in" },
|
||||
{ DBG_MSG_OUT, "msg_out" },
|
||||
{ DBG_MSG_DMP, "msg_dmp" },
|
||||
{ DBG_INFO, "info", },
|
||||
{ DBG_PKT_IN, "pkt_in" },
|
||||
{ DBG_PKT_OUT, "pkt_out" },
|
||||
{ DBG_PKT_ERR, "pkt_err" },
|
||||
{ DBG_PKT_DMP_IN, "pkt_dmp_in" },
|
||||
{ DBG_PKT_DMP_OUT, "pkt_dmp_out" },
|
||||
|
||||
{ DBG_MSG_IN, "msg_in" },
|
||||
{ DBG_MSG_OUT, "msg_out" },
|
||||
{ DBG_MSG_DMP_IN, "msg_dmp_in" },
|
||||
{ DBG_MSG_DMP_OUT, "msg_dmp_out" },
|
||||
|
||||
{ DBG_MSG_ERR, "msg_err"},
|
||||
|
||||
{ DBG_RFC, "rfc", },
|
||||
|
||||
{ DBG_ELEM_IN, "elem_in"},
|
||||
{ DBG_ELEM_OUT, "elem_out"},
|
||||
{ DBG_ELEM_DMP, "elem_dmp"},
|
||||
|
||||
{ DBG_SUBELEM, "subelem"},
|
||||
{ DBG_SUBELEM_DMP, "subelem_dmp" },
|
||||
|
||||
{ DBG_ELEM_DETAIL, "elem_detail"},
|
||||
|
||||
{ DBG_ELEM_ERR, "elem_err" },
|
||||
{ DBG_ELEM_DETAIL_IN, "elem_detail_in" },
|
||||
{ DBG_ELEM_DETAIL_OUT, "elem_detail_out" },
|
||||
|
||||
{ DBG_DTLS, "dtls" },
|
||||
{ DBG_DTLS_BIO, "dtls_bio" },
|
||||
{ DBG_DTLS_BIO_DMP, "dtls_bio_dmp"},
|
||||
{ DBG_DTLS_DETAIL, "dtls_detail"},
|
||||
|
||||
{ DBG_CFG_SET, "cfg_set" },
|
||||
{ DBG_CFG_UPDATES, "cfg_updates" },
|
||||
|
||||
|
||||
{DBG_CFG_DMP, "cfg_dmp" },
|
||||
// {DBG_CFG_DMP, "cfg_dmp" },
|
||||
|
||||
{ DBG_WARN, "warn" },
|
||||
|
||||
|
||||
{ DBG_MOD,"mod"},
|
||||
{ DBG_STATE, "state" },
|
||||
{ DBG_MSG_COMPOSE, "msg_compose" },
|
||||
|
||||
{ (DBG_MSG_IN | DBG_MSG_OUT), "msg" },
|
||||
{ (DBG_PKT_IN | DBG_PKT_OUT), "pkt" },
|
||||
{ (DBG_ELEM_IN | DBG_ELEM_OUT), "elem" },
|
||||
{ (DBG_ELEM_DETAIL_IN | DBG_ELEM_DETAIL_OUT), "elem_detail" },
|
||||
{ (DBG_ELEM_IN | DBG_ELEM_OUT | DBG_ELEM_DMP | DBG_ELEM_DETAIL_IN | DBG_ELEM_DETAIL_OUT), "elem_all" },
|
||||
{ (DBG_MSG_IN | DBG_MSG_OUT | DBG_ELEM_IN | DBG_ELEM_OUT | DBG_STATE), "std" },
|
||||
|
||||
{ DBG_ALL, "all"},
|
||||
|
||||
|
||||
{ CW_STR_STOP, NULL }
|
||||
};
|
||||
|
@ -98,7 +98,7 @@ void cw_discovery_results_add(struct cw_DiscoveryResults *dis,
|
||||
if (e.cfg == NULL)
|
||||
continue;
|
||||
|
||||
cw_cfg_copy(ac_cfg,e.cfg);
|
||||
cw_cfg_copy(ac_cfg,e.cfg,0,"");
|
||||
|
||||
strcpy(e.ip,ipval);
|
||||
|
||||
|
@ -20,8 +20,8 @@ int cw_encode_elements(struct cw_ElemHandlerParams *params, mlist_t elements_lis
|
||||
handler = cw_msgset_get_elemhandler(params->msgset,data->proto,data->vendor,data->id);
|
||||
params->elemdata = data;
|
||||
|
||||
cw_dbg(DBG_MSG_ASSEMBLY," Add Elem: %d %d %d %s", data->proto, data->vendor, data->id, handler->name);
|
||||
if (handler==NULL){
|
||||
cw_dbg(DBG_MSG_COMPOSE," Add Elem: %d %d %d %s", data->proto, data->vendor, data->id, handler->name);
|
||||
cw_log(LOG_ERR,"Can't put message element %d %d %d, no handler defined.",
|
||||
data->proto,data->vendor,data->id);
|
||||
continue;
|
||||
@ -29,6 +29,7 @@ int cw_encode_elements(struct cw_ElemHandlerParams *params, mlist_t elements_lis
|
||||
|
||||
if (handler->put == NULL){
|
||||
if (data->mand){
|
||||
cw_dbg(DBG_MSG_COMPOSE," Add Elem: %d %d %d %s", data->proto, data->vendor, data->id, handler->name);
|
||||
cw_log(LOG_ERR,"Error: Can't add mandatory message element %d - %s, no put method defined",
|
||||
handler->id, handler->name);
|
||||
|
||||
@ -38,24 +39,21 @@ int cw_encode_elements(struct cw_ElemHandlerParams *params, mlist_t elements_lis
|
||||
|
||||
if (!data->mand){
|
||||
if (!cw_cfg_base_exists(params->cfg_list[0],handler->key)){
|
||||
// cw_dbg(DBG_X,"nothing todo");
|
||||
cw_dbg(DBG_MSG_COMPOSE," Add Elem: %d %d %d %s - (skip)",
|
||||
data->proto, data->vendor, data->id, handler->name);
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
l = handler->put(handler,params,dst+len);
|
||||
cw_dbg(DBG_MSG_COMPOSE," Add Elem: %d %d %d %s - (%d bytes)",
|
||||
data->proto, data->vendor, data->id, handler->name,l);
|
||||
|
||||
|
||||
/* if(l>0)
|
||||
cw_dbg_elem(DBG_ELEM_OUT,conn,type,handler,dst+len,l);
|
||||
* if (strlen(details)){
|
||||
cw_dbg(DBG_ELEM_DETAIL," %s",params.debug_details);
|
||||
}
|
||||
*/ len += l;
|
||||
len += l;
|
||||
}
|
||||
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
@ -91,7 +89,7 @@ int cw_compose_message(struct cw_Conn *conn, uint8_t * rawout)
|
||||
msg->preprocess(conn);
|
||||
}
|
||||
|
||||
cw_dbg(DBG_MSG_ASSEMBLY,"*** Assembling message of type %d (%s) ***",
|
||||
cw_dbg(DBG_MSG_COMPOSE,"Composing message of type %d (%s) ***",
|
||||
msg->type, msg->name);
|
||||
|
||||
dst = msgptr+8;
|
||||
@ -114,7 +112,7 @@ int cw_compose_message(struct cw_Conn *conn, uint8_t * rawout)
|
||||
|
||||
data = mlistelem_dataptr(elem);
|
||||
handler = cw_msgset_get_elemhandler(conn->msgset,data->proto,data->vendor,data->id);
|
||||
cw_dbg(DBG_MSG_ASSEMBLY," Add Elem: %d %d %d %s", data->proto, data->vendor, data->id, handler->name);
|
||||
cw_dbg(DBG_MSG_COMPOSE," Add Elem: %d %d %d %s", data->proto, data->vendor, data->id, handler->name);
|
||||
if (handler==NULL){
|
||||
cw_log(LOG_ERR,"Can't put message element %d %d %d, no handler defined.",
|
||||
data->proto,data->vendor,data->id);
|
||||
@ -151,8 +149,8 @@ int cw_compose_message(struct cw_Conn *conn, uint8_t * rawout)
|
||||
// }
|
||||
|
||||
cw_set_msg_elems_len(msgptr, len);
|
||||
cw_dbg(DBG_MSG_ASSEMBLY,"*** Done assenmbling message of type %d (%s) ***",
|
||||
msg->type, msg->name);
|
||||
//cw_dbg(DBG_MSG_COMPOSE,"*** Done assenmbling message of type %d (%s) ***",
|
||||
// msg->type, msg->name);
|
||||
if (type & 1) {
|
||||
/* It's a request, so we have to set seqnum */
|
||||
int s = conn_get_next_seqnum(conn);
|
||||
@ -161,8 +159,8 @@ int cw_compose_message(struct cw_Conn *conn, uint8_t * rawout)
|
||||
|
||||
|
||||
{
|
||||
printf ("----------------------------------- redecode -----------------------------\n");
|
||||
uint8_t *elems_ptr;
|
||||
// printf ("----------------------------------- redecode -----------------------------\n");
|
||||
/* uint8_t *elems_ptr;
|
||||
|
||||
int offset = cw_get_hdr_msg_offset(rawout);
|
||||
|
||||
@ -178,7 +176,7 @@ int cw_compose_message(struct cw_Conn *conn, uint8_t * rawout)
|
||||
params.msgset=conn->msgset;
|
||||
params.msgdata=msg;
|
||||
params.mand_found = mavl_create_conststr();
|
||||
|
||||
params.dbg_level = DBG_ELEM_OUT;
|
||||
|
||||
cw_decode_elements( ¶ms, elems_ptr,elems_len);
|
||||
cw_cfg_destroy(cfg);
|
||||
@ -186,8 +184,8 @@ int cw_compose_message(struct cw_Conn *conn, uint8_t * rawout)
|
||||
cw_check_missing_mand(msg, params.mand_found,conn->msgset->handlers_by_key);
|
||||
mavl_destroy(params.mand_found);
|
||||
}
|
||||
|
||||
printf ("----------------------------------- end redecode -----------------------------\n");
|
||||
*/
|
||||
// printf ("----------------------------------- end redecode -----------------------------\n");
|
||||
|
||||
}
|
||||
|
||||
@ -251,8 +249,9 @@ int cw_decode_element(struct cw_ElemHandlerParams *params, int proto,
|
||||
return -1;
|
||||
}
|
||||
|
||||
cw_dbg_elem(DBG_ELEM_IN, NULL, params->msgdata->type, handler,
|
||||
data, len);
|
||||
if (!handler->flags)
|
||||
cw_dbg_elem(params->dbg_level, NULL, params->msgdata->type, handler,
|
||||
data, len);
|
||||
|
||||
if (handler->get == NULL) {
|
||||
cw_log(LOG_ERR, "No get method defined for %d %s", handler->id,
|
||||
|
@ -33,6 +33,7 @@ struct cw_ElemHandlerParams {
|
||||
mlist_t unrecognized;
|
||||
// cw_Val_t * elem;
|
||||
char * debug_details;
|
||||
uint32_t dbg_level;
|
||||
cw_Cfg_t * cfg;
|
||||
cw_Cfg_t * cfg_list[10];
|
||||
};
|
||||
@ -57,7 +58,7 @@ struct cw_ElemHandler {
|
||||
int (*mkkey)(const char *pkey, uint8_t*data, int len, char *dst);
|
||||
int (*patch)(uint8_t *dst, void *data );
|
||||
void * param;
|
||||
|
||||
uint8_t flags;
|
||||
};
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
//#define CW_KTV_MAX_KEY_LEN 1024
|
||||
|
||||
typedef struct mavl cw_Cfg_t;
|
||||
typedef struct cw_Cfg cw_Cfg_t;
|
||||
|
||||
/**
|
||||
* @struct cw_Val
|
||||
|
@ -56,6 +56,12 @@ static cw_ValStruct_t radio_operational_state[] = {
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
static cw_ValStruct_t image_identifier_stru[] = {
|
||||
{CW_TYPE_DWORD, "vendor-id", 4,-1},
|
||||
{CW_TYPE_BSTR16, "identifier", -1,-1},
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
|
||||
static cw_ValValRange_t radio_admin_state_valguard[]={
|
||||
{0,0,"0 - reserved"},
|
||||
@ -160,7 +166,13 @@ static struct cw_ElemHandler handlers[] = {
|
||||
NULL, /* type */
|
||||
"vendor_specific_payload", /* Key */
|
||||
capwap_in_vendor_specific_payload, /* get */
|
||||
NULL /* put */
|
||||
NULL, /* put */
|
||||
NULL, /* mkkey*/
|
||||
NULL, /* patch*/
|
||||
NULL, /* param */
|
||||
1 /* flags */
|
||||
|
||||
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -435,6 +447,21 @@ static struct cw_ElemHandler handlers[] = {
|
||||
cw_out_generic_with_index /* put */
|
||||
}
|
||||
,
|
||||
|
||||
{
|
||||
"Image Identifier", /* name */
|
||||
CAPWAP_ELEM_IMAGE_IDENTIFIER, /* Element ID */
|
||||
0,0, /* Vendor / Proto */
|
||||
5,1028, /* min/max length */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"capwap/image-identifier", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
image_identifier_stru /* param */
|
||||
}
|
||||
,
|
||||
{0,0,0,0,0,0,0,0}
|
||||
|
||||
};
|
||||
@ -552,8 +579,8 @@ static struct cw_ElemDef configuration_update_request_elements[] ={
|
||||
|
||||
{0,0,CAPWAP_ELEM_RADIO_ADMINISTRATIVE_STATE, 0, 0},
|
||||
{0,0,CAPWAP_ELEM_STATISTICS_TIMER, 0, 0},
|
||||
{0,0,CAPWAP_ELEM_IMAGE_IDENTIFIER, 0, 0},
|
||||
|
||||
|
||||
{0,0,CAPWAP_ELEM_VENDOR_SPECIFIC_PAYLOAD, 0, CW_IGNORE},
|
||||
{0,0,0,0,0}
|
||||
};
|
||||
|
@ -50,6 +50,7 @@
|
||||
#define CW_CISCO_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 */
|
||||
|
@ -34,6 +34,12 @@ static int postprocess_discovery();
|
||||
static int preprocess_join_request();
|
||||
static int postprocess_join_request();
|
||||
|
||||
static cw_ValValRange_t cfg_type[]={
|
||||
{1,1,"1 - global"},
|
||||
{2,2,"2 - custom"},
|
||||
{0,0,NULL}
|
||||
};
|
||||
|
||||
|
||||
static cw_ValStruct_t ap_time_sync[] = {
|
||||
{CW_TYPE_DWORD, "timestamp", 4,-1},
|
||||
@ -76,6 +82,19 @@ static cw_ValStruct_t cisco_8021xlogin[] = {
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static cw_ValStruct_t cisco_elem_15[] = {
|
||||
{CW_TYPE_BYTE, "cfg-type", 1, -1, cfg_type},
|
||||
{CW_TYPE_BYTE, "channel", 1,-1},
|
||||
{CW_TYPE_BSTR16, "rest",-1,-1},
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
static cw_ValEnum_t cisco_ap_username_and_password_enum[] ={
|
||||
{2, "802.1x-credentials", CW_TYPE_STRUCT, cw_in_generic, cw_out_generic, cisco_8021xlogin },
|
||||
|
||||
@ -264,7 +283,7 @@ int cisco_out_ap_regulatory_domain(struct cw_ElemHandler * eh,
|
||||
|
||||
{
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
char testkey[CW_CFG_MAX_KEY_LEN];
|
||||
// char testkey[CW_CFG_MAX_KEY_LEN];
|
||||
int idx;
|
||||
void * type;
|
||||
cw_Val_t * result;
|
||||
@ -305,9 +324,9 @@ int cisco_out_ap_regulatory_domain(struct cw_ElemHandler * eh,
|
||||
break;
|
||||
|
||||
if(type == NULL){
|
||||
sprintf(testkey,"%s/%s",key,"band-id");
|
||||
// sprintf(testkey,"%s/%s",key,"band-id");
|
||||
stop();
|
||||
result = cw_ktv_get_val_l(params->cfg_list,key,CW_TYPE_BYTE);
|
||||
// result = cw_ktv_get_val_l(params->cfg_list,key,CW_TYPE_BYTE);
|
||||
if (result==NULL){
|
||||
type = cisco_ap_regulatory_domain4;
|
||||
}
|
||||
@ -340,7 +359,7 @@ static cw_ValStruct_t cisco_ap_model[]={
|
||||
|
||||
|
||||
static cw_ValStruct_t cisco_direct_sequence_control70[]={
|
||||
{CW_TYPE_BYTE,"cfg-type",1,-1},
|
||||
{CW_TYPE_BYTE,"cfg-type",1,-1,cfg_type},
|
||||
{CW_TYPE_BYTE,"current-channel",1,-1},
|
||||
{CW_TYPE_BYTE,"current-cca-mode",1,-1},
|
||||
{CW_TYPE_DWORD,"energy-detect-threshold",4,-1},
|
||||
@ -413,7 +432,7 @@ static cw_ValStruct_t cisco_wtp_radio_config75[]={
|
||||
|
||||
|
||||
static cw_ValStruct_t cisco_tx_power[]={
|
||||
{CW_TYPE_BYTE,"reserved",1,-1},
|
||||
{CW_TYPE_BYTE,"cfg-type",1,-1,cfg_type},
|
||||
{CW_TYPE_WORD,"current-tx-power",2,-1},
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
@ -512,6 +531,17 @@ static cw_ValStruct_t cisco_ap_mode_and_type[]={
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
|
||||
static cw_ValStruct_t dtls_data_cfg[]={
|
||||
{CW_TYPE_BOOL,"cabable",1,-1},
|
||||
{CW_TYPE_BOOL,"enabled",1,-1},
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
static cw_ValStruct_t cisco_add_wlan[]={
|
||||
{CW_TYPE_BYTE,"radio-id",1,-1},
|
||||
{CW_TYPE_WORD,"wlan-capability",2,-1},
|
||||
@ -530,7 +560,7 @@ static cw_ValStruct_t cisco_add_wlan[]={
|
||||
|
||||
{NULL,NULL,0,0}
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
static cw_ValStruct_t cisco_add_wlan70[]={
|
||||
{CW_TYPE_BYTE,"radio-id",1,-1},
|
||||
@ -580,14 +610,14 @@ static int cisco_in_lw_del_wlan(struct cw_ElemHandler *eh,
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
static int cw_mkradiokey(const char *pkey, uint8_t*data, int len, char *dst)
|
||||
{
|
||||
int radio_id;
|
||||
radio_id = cw_get_byte(data);
|
||||
sprintf(dst,"radio.%d/%s",radio_id,pkey);
|
||||
return 1;
|
||||
}
|
||||
}*/
|
||||
|
||||
/*
|
||||
static int cisoc_add_wlan_mkkey(const char *pkey, uint8_t*data, int len, char *dst)
|
||||
@ -601,16 +631,18 @@ static int cisoc_add_wlan_mkkey(const char *pkey, uint8_t*data, int len, char *d
|
||||
}
|
||||
*/
|
||||
|
||||
static int cisoc_add_wlan_mkkey70(const char *pkey, uint8_t*data, int len, char *dst)
|
||||
|
||||
static int cisco_add_wlan_mkkey70(const char *pkey, uint8_t*data, int len, char *dst)
|
||||
{
|
||||
int wlan_id,radio_id;
|
||||
stop();
|
||||
radio_id = cw_get_byte(data);
|
||||
wlan_id = cw_get_byte(data+4);
|
||||
sprintf(dst,"radio.%d/wlan.%d/add-wlan",radio_id,wlan_id);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
static int cisco_patch_add_wlan70(uint8_t * data, void * st)
|
||||
{
|
||||
stop();
|
||||
@ -620,7 +652,7 @@ static int cisco_patch_add_wlan70(uint8_t * data, void * st)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
|
||||
static cw_ValStruct_t cisco_add_lwwlan[]={
|
||||
{CW_TYPE_BSTR16, "misc", 8, 2},
|
||||
@ -915,7 +947,11 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
NULL, /* type */
|
||||
"cisco_spam_vendor_specific", /* Key */
|
||||
cisco_in_spam_vendor_specific, /* get */
|
||||
NULL /* put */
|
||||
NULL, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL, /* param */
|
||||
1
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -1381,16 +1417,37 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco Elem 15", /* name */
|
||||
"Cisco Elem 15 - Channel Setting (?)", /* name */
|
||||
CISCO_ELEM_15, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/elem15", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic /* put */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
cisco_elem_15
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco Elem 16 ", /* name */
|
||||
CISCO_ELEM_16, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/elem16", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
"Cisco Elem 39", /* name */
|
||||
CISCO_ELEM_39, /* Element ID */
|
||||
@ -1473,6 +1530,75 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
cw_out_radio_generic /* put */
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco LWAP Elem 11", /* name */
|
||||
|
||||
CISCO_LWELEM_11, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/lwelem11", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic /* put */
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco LWAP Elem 14", /* name */
|
||||
CISCO_LWELEM_14, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/lwelem14", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_generic /* put */
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
"Cisco LWAP Elem 27", /* name */
|
||||
|
||||
CISCO_LWELEM_27, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/lwelem27", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic /* put */
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"Cisco LWAP Elem 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_in_radio_generic, /* get */
|
||||
cw_out_radio_generic /* put */
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco LWAP Elem 29", /* name */
|
||||
|
||||
CISCO_LWELEM_29, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/lwelem29", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic /* put */
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
"Cisco LWAP Elem 33", /* name */
|
||||
|
||||
@ -1499,6 +1625,35 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
cw_out_radio_generic /* put */
|
||||
},
|
||||
|
||||
{
|
||||
"Cisco LWAP Elem 55", /* name */
|
||||
|
||||
CISCO_LWELEM_55, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/lwelem55", /* Key */
|
||||
cw_in_radio_generic, /* get */
|
||||
cw_out_radio_generic /* put */
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
"Cisco LWAPP Elem 105", /* name */
|
||||
|
||||
CISCO_LWELEM_105, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
|
||||
1,1024, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
"cisco/lwelem105", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_generic /* put */
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1714,19 +1869,20 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
}
|
||||
,
|
||||
|
||||
// {
|
||||
// "Add Cisco WLAN", /* name */
|
||||
/// CISCO_ELEM_ADD_WLAN, /* Element ID */
|
||||
/// CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
/// 7,1117, /* min/max length */
|
||||
// cisco_add_wlan70, /* type */
|
||||
// "radio/wlan/add-wlan", /* Key */
|
||||
/// cw_in_generic_struct, /* get */
|
||||
// cw_out_traverse, /* put */
|
||||
// cisoc_add_wlan_mkkey70,
|
||||
// cisco_patch_add_wlan70
|
||||
// }
|
||||
// ,
|
||||
{
|
||||
"Add Cisco WLAN", /* name */
|
||||
CISCO_ELEM_ADD_WLAN, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO,0, /* Vendor / Proto */
|
||||
7,1117, /* min/max length */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"radio/wlan/add-wlan", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_traverse, /* put */
|
||||
cisco_add_wlan_mkkey70,
|
||||
NULL, // cisco_patch_add_wlan70
|
||||
cisco_add_wlan70
|
||||
}
|
||||
,
|
||||
|
||||
{
|
||||
"Add Cisco WLAN (LWAPP)", /* name */
|
||||
@ -1902,11 +2058,14 @@ static struct cw_ElemHandler handlers70[] = {
|
||||
"AP DTLS Data CFG", /* name */
|
||||
CISCO_LWELEM_AP_DTLS_DATA_CFG, /* Element ID */
|
||||
CW_VENDOR_ID_CISCO, CW_PROTO_LWAPP, /* Vendor / Proto */
|
||||
3, 3, /* min/max length */
|
||||
CW_TYPE_BSTR16, /* type */
|
||||
2, 2, /* min/max length */
|
||||
CW_TYPE_STRUCT, /* type */
|
||||
"cisco/ap-dtls-data-cfg", /* Key */
|
||||
cw_in_generic, /* get */
|
||||
cw_out_generic /* put */
|
||||
cw_out_generic, /* put */
|
||||
NULL,
|
||||
NULL,
|
||||
dtls_data_cfg
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -2002,6 +2161,7 @@ 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_19, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_22, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_24, 0, 0},
|
||||
@ -2016,8 +2176,15 @@ 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_28, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_29, 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},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_105, 0, 0},
|
||||
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_CAPWAP_TIMERS, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_DIRECT_SEQUENCE_CONTROL, 0, 0},
|
||||
@ -2077,6 +2244,7 @@ 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_19, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_22, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_24, 0, 0},
|
||||
@ -2092,8 +2260,15 @@ 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_28, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_29, 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},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_105, 0, 0},
|
||||
|
||||
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_CAPWAP_TIMERS, 0, 0},
|
||||
@ -2132,6 +2307,7 @@ 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_19, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_22, 0, 0},
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_24, 0, 0},
|
||||
@ -2146,8 +2322,15 @@ 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_28, 0, 0},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_29, 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},
|
||||
{CW_PROTO_LWAPP, CW_VENDOR_ID_CISCO, CISCO_LWELEM_105, 0, 0},
|
||||
|
||||
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_CAPWAP_TIMERS, 0, 0},
|
||||
@ -2155,6 +2338,7 @@ static struct cw_ElemDef configuration_update_request_elements[] ={
|
||||
|
||||
|
||||
{0,0, CAPWAP_ELEM_RADIO_OPERATIONAL_STATE, 0,0},
|
||||
{0, CW_VENDOR_ID_CISCO, CW_CISCO_ANTENNA_PAYLOAD, 0,0},
|
||||
|
||||
|
||||
{0, CW_VENDOR_ID_CISCO, CISCO_ELEM_AP_UPTIME, 0, 0},
|
||||
|
@ -15,7 +15,7 @@
|
||||
static int put_ac_status(cw_Cfg_t * cfg1, cw_Cfg_t * cfg2, uint8_t *dst, const char * parent_key){
|
||||
|
||||
uint8_t *d = dst;
|
||||
uint8_t security;
|
||||
// uint8_t security;
|
||||
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
|
||||
@ -55,7 +55,7 @@ static int put_ac_status(cw_Cfg_t * cfg1, cw_Cfg_t * cfg2, uint8_t *dst, const c
|
||||
int cisco_out_ac_descriptor(struct cw_ElemHandler * eh,
|
||||
struct cw_ElemHandlerParams * params, uint8_t * dst)
|
||||
{
|
||||
int len,l;
|
||||
int len;
|
||||
uint8_t *d = dst+4;
|
||||
char key[CW_CFG_MAX_KEY_LEN];
|
||||
|
||||
@ -77,9 +77,9 @@ int cisco_out_ac_descriptor(struct cw_ElemHandler * eh,
|
||||
|
||||
len = d-dst-4;
|
||||
|
||||
l = len + cw_put_elem_hdr(dst,eh->id,len);
|
||||
cw_dbg_elem(DBG_ELEM_OUT,NULL,params->msgdata->type,eh,dst,l);
|
||||
return len + cw_put_elem_hdr(dst,eh->id,len);
|
||||
// cw_dbg_elem(DBG_ELEM_OUT,NULL,params->msgdata->type,eh,dst,l);
|
||||
|
||||
return l;
|
||||
// return l;
|
||||
|
||||
}
|
||||
|
@ -29,10 +29,15 @@
|
||||
*/
|
||||
|
||||
#define CISCO_LWELEM_9 9
|
||||
#define CISCO_LWELEM_11 11
|
||||
#define CISCO_LWELEM_14 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_28 28
|
||||
#define CISCO_LWELEM_29 29
|
||||
#define CISCO_LWELEM_AC_IP_ADDR_WITH_INDEX 32
|
||||
#define CISCO_LWELEM_33 33
|
||||
#define CISCO_LWELEM_AP_ETHERNET_PORT_SUBTYPE 34
|
||||
@ -41,6 +46,7 @@
|
||||
|
||||
#define CISCO_LWELEM_AP_TELNET_SSH 44
|
||||
#define CISCO_LWELEM_48 48
|
||||
#define CISCO_LWELEM_55 55
|
||||
#define CISCO_LWELEM_AP_SUBMODE 67
|
||||
#define LW_CISCO_AP_HEARTBEAT_TIMEOUT 68
|
||||
|
||||
@ -54,6 +60,8 @@
|
||||
#define LW_CISCO_PRIMED_JOIN_TIMEOUT 85
|
||||
#define CISCO_LWELEM_AP_DTLS_DATA_CFG 74
|
||||
|
||||
#define CISCO_LWELEM_105 105
|
||||
|
||||
#define CISCO_LWELEM_RAD_EXTENDED_CONFIG 111
|
||||
#define CISCO_LWELEM_ADD_WLAN 128
|
||||
#define CISCO_LWELEM_AP_DNS_SERV_IP_ADD 121
|
||||
|
201
src/wtp/1142-factroy-70.ckv
Normal file
201
src/wtp/1142-factroy-70.ckv
Normal file
@ -0,0 +1,201 @@
|
||||
#
|
||||
# Join Request
|
||||
#
|
||||
capwap-local-ip-address: 192.168.0.13
|
||||
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/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
|
||||
|
||||
#
|
||||
# Configuration Status Request
|
||||
#
|
||||
capwap/ac-name:
|
||||
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-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: 84
|
||||
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/option: 1
|
||||
cisco/ap-username-and-password/login-credentials/password: $1$ZFkU$zIX6UG1NozXk2.V1lZNIV.
|
||||
cisco/ap-username-and-password/login-credentials/username: Cisco
|
||||
cisco/cisco-discovery-protocol/data: 513
|
||||
cisco/cisco-discovery-protocol/enabled: false
|
||||
cisco/loghost-config/last-joined-ap: None
|
||||
cisco/loghost-config/loghost: 255.255.255.255
|
||||
cisco/lwelem105: .x0000
|
||||
cisco/lwelem14: .x000100000000000000000000000000000000
|
||||
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/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
|
||||
radio.0/admin-state: 1 - enabled
|
||||
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
|
||||
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/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
|
||||
radio.0/cisco/mac-operation/rts-threshold: 2347
|
||||
radio.0/cisco/mac-operation/rx-msdu-lifetime: 1000
|
||||
radio.0/cisco/mac-operation/short-retry: 0
|
||||
radio.0/cisco/mac-operation/tx-msdu-lifetime: 5000
|
||||
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/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
|
||||
radio.0/cisco/wtp-radio-config/cfg-type: 1
|
||||
radio.0/cisco/wtp-radio-config/cfp-maximum-duration: 0
|
||||
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/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
|
||||
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/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
|
||||
radio.1/cisco/mac-operation/rts-threshold: 2347
|
||||
radio.1/cisco/mac-operation/rx-msdu-lifetime: 1000
|
||||
radio.1/cisco/mac-operation/short-retry: 0
|
||||
radio.1/cisco/mac-operation/tx-msdu-lifetime: 5000
|
||||
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/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
|
||||
radio.1/cisco/wtp-radio-config/cfg-type: 1
|
||||
radio.1/cisco/wtp-radio-config/cfp-maximum-duration: 0
|
||||
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
|
||||
|
||||
#
|
||||
# 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
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "wtp_interface.h"
|
||||
|
||||
|
||||
int changestate(struct conn * conn)
|
||||
int changestate(struct cw_Conn * conn)
|
||||
{
|
||||
|
||||
|
||||
|
@ -2,14 +2,25 @@
|
||||
# This file is igenerated by WAT
|
||||
# If you edit this, your cahnges might be overwritten
|
||||
#
|
||||
capwap-local-ip-address: 192.168.0.14
|
||||
ac-name-with-index.0:
|
||||
ac-name-with-index.1:
|
||||
ac-name-with-index.2:
|
||||
capwap-local-ip-address: 192.168.0.13
|
||||
capwap-timers/echo-interval: 30
|
||||
capwap-timers/max-discovery-interval: 10
|
||||
capwap/ac-name:
|
||||
cisco-8011-assoc-limit/enable: false
|
||||
cisco-8011-assoc-limit/interval: 500
|
||||
cisco-8011-assoc-limit/limit: 25
|
||||
cisco/ac-ip-addr-with-index.0: 0.0.0.0
|
||||
cisco/ac-ip-addr-with-index.1: 0.0.0.0
|
||||
cisco/ac-ip-addr-with-index.2: 0.0.0.0
|
||||
cisco/ap-backup-software-version: .x00000000
|
||||
cisco/ap-core-dump/compression: false
|
||||
cisco/ap-core-dump/filename:
|
||||
cisco/ap-core-dump/tftp-server: 0.0.0.0
|
||||
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
|
||||
@ -20,7 +31,7 @@ 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/state: 34
|
||||
cisco/ap-power-injector-config/switch-mac-address: .x000000000000
|
||||
cisco/ap-pre-std-switch-config: 0
|
||||
cisco/ap-regulatory-domain.0/code0: 0
|
||||
@ -31,27 +42,33 @@ 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.14
|
||||
cisco/ap-static-ip-addr/enabled: false
|
||||
cisco/ap-static-domain/enable: true
|
||||
cisco/ap-static-domain/name: planix.org
|
||||
cisco/ap-static-ip-addr/address: 192.168.0.13
|
||||
cisco/ap-static-ip-addr/enabled: true
|
||||
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: 120
|
||||
cisco/ap-uptime/current-uptime: 84
|
||||
cisco/ap-uptime/last-uptime: 1
|
||||
cisco/ap-username-and-password/login-credentials/enable-password: $1$IMuO$BHTjaFsUF.X3g3Q9YDmcS0
|
||||
cisco/ap-username-and-password/login-credentials/option: 1
|
||||
cisco/ap-username-and-password/login-credentials/password: $1$SL3y$sc6giltX5bNe5mzHT8Gwy1
|
||||
cisco/ap-username-and-password/login-credentials/username: Cisco
|
||||
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: None
|
||||
cisco/loghost-config/loghost: 255.255.255.255
|
||||
cisco/lw-path-mtu/len: 1095
|
||||
cisco/lw-path-mtu/max: 1485
|
||||
cisco/lwelem105: .x0000
|
||||
cisco/lwelem14: .x000100000000000000000000000000000000
|
||||
cisco/mcast-mgid-info: .x0000000d0000000000000000000000000000000101000000
|
||||
cisco/mwar-addr/address: 192.168.0.162
|
||||
cisco/mwar-addr/address: 192.168.0.14
|
||||
cisco/mwar-addr/mwar-type: 0
|
||||
cisco/mwar-addr/unknown: 0
|
||||
cisco/reset-button-state: true
|
||||
@ -68,9 +85,9 @@ 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: 0
|
||||
cisco/wtp-board-data/options/ap-type: 1
|
||||
cisco/wtp-board-data/options/failover-priority: 1
|
||||
cisco/wtp-board-data/options/flex-connect: 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
|
||||
@ -89,7 +106,7 @@ radio.0/cisco/antenna-payload/diversity-selection: 255
|
||||
radio.0/cisco/antenna-payload/number-of-antennas: 2
|
||||
radio.0/cisco/antenna-payload/unknown: 3
|
||||
radio.0/cisco/channel-power: .x08080d0108221c16100a04fefe0208221c16100a04fefe0308221c16100a04fefe0408221c16100a04fefe0508221c16100a04fefe0608221c16100a04fefe0708221c16100a04fefe0808221c16100a04fefe0908221c16100a04fefe0a08221c16100a04fefe0b08221c16100a04fefe0c08221c16100a04fefe0d08221c16100a04fefe
|
||||
radio.0/cisco/direct-sequence-control/cfg-type: 1
|
||||
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
|
||||
@ -98,13 +115,19 @@ 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: .xc0a800a10001000cc0a800a103000101003ccd774fc43bd27db633509934957d3acb000000000000000052464d000000000000000000000000000000000000000000000000000000000001060b010101
|
||||
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: .x00000000000000000000000000000000000000000000000000
|
||||
radio.0/cisco/lwelem28: .x0303020202000000000000000000000000000000000000000000313f01
|
||||
radio.0/cisco/lwelem29: .x00010000000000000200001400
|
||||
radio.0/cisco/lwelem48: .x01055a0101a6c405b06432b03232
|
||||
radio.0/cisco/lwelem55: .x000000000000000000000000
|
||||
radio.0/cisco/lwelem9: .x0100000000000000000000000000000000
|
||||
radio.0/cisco/mac-operation/fragmentation-threshold: 2346
|
||||
radio.0/cisco/mac-operation/long-retry: 4
|
||||
@ -118,8 +141,8 @@ 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/tx-power-levels: .x070011000e000b000800050002ffff0000
|
||||
radio.0/cisco/tx-power/cfg-type: 1 - global
|
||||
radio.0/cisco/tx-power/current-tx-power: 1
|
||||
radio.0/cisco/tx-power/reserved: 1
|
||||
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
|
||||
@ -133,6 +156,40 @@ radio.0/decryption-error-report-period: 120
|
||||
radio.0/operational-state/cause: Normal
|
||||
radio.0/operational-state/state: enabled
|
||||
radio.0/rate_set: .x82848b960c1218243048606c
|
||||
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: .xc214aef5bd4c4e1ff2574303a4
|
||||
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: .xc214aef5bd4c4e1ff2574303a4
|
||||
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.0/wtp-radio-information: 1
|
||||
radio.1/admin-state: 1 - enabled
|
||||
radio.1/cisco/air-space-capability: 0
|
||||
@ -146,15 +203,22 @@ radio.1/cisco/antenna-payload/number-of-antennas: 2
|
||||
radio.1/cisco/antenna-payload/unknown: 3
|
||||
radio.1/cisco/channel-power: .x0808102408221c16100a04fefe2808221c16100a04fefe2c08221c16100a04fefe3008221c16100a04fefe3408221c16100a04fefe3808221c16100a04fefe3c08221c16100a04fefe4008221c16100a04fefe6408221c16100a04fefe6808221c16100a04fefe6c08221c16100a04fefe7008221c16100a04fefe7408221c16100a04fefe8408221c16100a04fefe8808221c16100a04fefe8c08221c16100a04fefe
|
||||
radio.1/cisco/elem145: .x01
|
||||
radio.1/cisco/elem15: .x012407ffffffce000000
|
||||
radio.1/cisco/elem15/cfg-type: 1 - global
|
||||
radio.1/cisco/elem15/channel: 124
|
||||
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: .xc0a800a10001000bc0a800a110000101003ccd774fc43bd27db633509934957d3acb000000000000000052464d000000000000000000000000000000000000000000000000000000000024282c3034383c4064686c707484888c01010101010101010101010101010101
|
||||
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: .x00000000000000000000000000000000000000000000000000
|
||||
radio.1/cisco/lwelem28: .x0303020202000000000000000000000000000000000000000000313f01
|
||||
radio.1/cisco/lwelem29: .x00010003000000000200001400
|
||||
radio.1/cisco/lwelem33: .x00
|
||||
radio.1/cisco/lwelem48: .x01055a0101a6c405b06432b03232
|
||||
radio.1/cisco/lwelem9: .x0100000000000000000000000000000000
|
||||
@ -170,8 +234,8 @@ 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/tx-power-levels: .x070011000e000b000800050002ffff0000
|
||||
radio.1/cisco/tx-power/cfg-type: 1 - global
|
||||
radio.1/cisco/tx-power/current-tx-power: 1
|
||||
radio.1/cisco/tx-power/reserved: 1
|
||||
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
|
||||
@ -185,12 +249,46 @@ radio.1/decryption-error-report-period: 120
|
||||
radio.1/operational-state/cause: Normal
|
||||
radio.1/operational-state/state: enabled
|
||||
radio.1/rate_set: .x8c129824b048606c
|
||||
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: .xc97bf74c5a6b5d327384ac9065
|
||||
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: .xc97bf74c5a6b5d327384ac9065
|
||||
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.1/wtp-radio-information: 2
|
||||
radio.2/cisco/lwelem33: .x00
|
||||
radio.255/admin-state: 1 - enabled
|
||||
radio.255/operational-state/cause: Normal
|
||||
radio.255/operational-state/state: enabled
|
||||
session-id: .xd328ad6c
|
||||
session-id: .x4a230869
|
||||
statistics-timer: 180
|
||||
wtp-board-data/board-id: .x0000
|
||||
wtp-board-data/mac-address: .x0800276edf58
|
||||
@ -209,12 +307,12 @@ wtp-descriptor/software/version: .x07007400
|
||||
wtp-fallback: 1
|
||||
wtp-frame-tunnel-mode: 4
|
||||
wtp-mac-type: 1 - Split MAC
|
||||
wtp-name: SoftWTP-Tube
|
||||
wtp-name: Soft-WTP
|
||||
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: 17
|
||||
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
|
||||
|
@ -13,7 +13,7 @@
|
||||
static int config_cb(struct cw_ElemHandlerParams * params, uint8_t * elems_ptr, int elems_len)
|
||||
{
|
||||
cw_dbg(DBG_X,"*** Configurations Status Response received ****");
|
||||
cw_cfg_copy(params->cfg, params->conn->global_cfg);
|
||||
cw_cfg_copy(params->cfg, params->conn->global_cfg,DBG_CFG_UPDATES,"GlbalCfg");
|
||||
cw_cfg_save(bootcfg.cfgfilename, 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 ***");
|
||||
@ -31,7 +31,7 @@ int configure(struct cw_Conn * conn)
|
||||
cw_conn_set_msg_cb(conn,CAPWAP_MSG_CONFIGURATION_STATUS_RESPONSE,config_cb);
|
||||
|
||||
int rc;
|
||||
cw_cfg_copy(conn->global_cfg,conn->update_cfg);
|
||||
cw_cfg_copy(conn->global_cfg,conn->update_cfg,0,"");
|
||||
rc = cw_send_request(conn, CAPWAP_MSG_CONFIGURATION_STATUS_REQUEST);
|
||||
cw_cfg_clear(conn->update_cfg);
|
||||
|
||||
|
@ -213,7 +213,7 @@ int join(struct cw_Conn * conn, struct cw_DiscoveryResults * results)
|
||||
sock_setport((struct sockaddr*)&sockaddr,5246);
|
||||
|
||||
cw_cfg_clear(conn->remote_cfg);
|
||||
cw_cfg_copy(e->cfg,conn->remote_cfg);
|
||||
cw_cfg_copy(e->cfg,conn->remote_cfg,0,"");
|
||||
rc = run_join_d(conn,(struct sockaddr*)(&sockaddr),e->cfg);
|
||||
if (rc)
|
||||
return 1;
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "wtp_interface.h"
|
||||
|
||||
#include "cw/dbg.h"
|
||||
#include "cfg.h"
|
||||
|
||||
int update =1;
|
||||
|
||||
@ -34,12 +33,12 @@ int update =1;
|
||||
|
||||
static int update_cb(struct cw_ElemHandlerParams * params, uint8_t * elems_ptr, int elems_len)
|
||||
{
|
||||
cw_dbg(DBG_X," **** Configuration Update Request Received ***");
|
||||
// cw_dbg(DBG_X," **** Configuration Update Request Received ***");
|
||||
// cw_cfg_dump(params->conn->global_cfg);
|
||||
cw_cfg_copy(params->cfg, 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,
|
||||
"#\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 ***");
|
||||
// cw_dbg(DBG_X," **** Configuration Update Request Received Saved ***");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -98,7 +97,7 @@ int run(struct cw_Conn * conn)
|
||||
|
||||
|
||||
while (!cw_timer_timeout(timer) && conn->capwap_state == CAPWAP_STATE_RUN) {
|
||||
mavl_del_all(conn->remote_cfg);
|
||||
cw_cfg_clear(conn->remote_cfg);
|
||||
rc = cw_read_messages(conn);
|
||||
if (rc < 0 && errno == EAGAIN) {
|
||||
continue;
|
||||
|
@ -101,6 +101,8 @@ int main (int argc, char **argv)
|
||||
bootcfg.modnames[1]="capwap80211";
|
||||
bootcfg.nmods=2;
|
||||
}
|
||||
|
||||
cw_dbg_set_level(DBG_X,0);
|
||||
|
||||
|
||||
/* create an empty message set */
|
||||
|
Loading…
Reference in New Issue
Block a user