Some work on wtp and ktv config files

FossilOrigin-Name: 3747732055809fd587f96cff65c389a0878a09a197947c1e68a76f605bdb44a0
This commit is contained in:
7u83@mail.ru
2018-03-12 10:22:06 +00:00
parent 27869b8c11
commit d6133e0434
74 changed files with 775 additions and 565 deletions

View File

@ -18,10 +18,10 @@
#include "cw/cw.h"
#include "cw/kvt.h"
#include "cw/ktv.h"
#include "cw/log.h"
#include "cw/msget.h"
#include "cw/msgset.h"
#include "mod_capwap.h"

View File

@ -17,7 +17,7 @@
*/
#include "cw/capwap.h"
#include "cw/msget.h"
#include "cw/msgset.h"
#include "cw/dbg.h"

View File

@ -34,7 +34,9 @@ int capwap_in_vendor_specific_payload(struct cw_ElemHandler *handler,
}
cw_dbg_elem(DBG_ELEM,params->conn,0,vhandler,data+6,len-6);
vhandler->get(vhandler, params, data+6, len-6);
//vhandler->get(vhandler, params, data+6, len-6);
cw_process_element(params,0,vendor_id,elem_id,data+6,len-6);
return 1;

View File

@ -24,7 +24,7 @@
#include "cw/dbg.h"
#include "cw/cw.h"
#include "cw/kvt.h"
#include "cw/ktv.h"
#include "cw/keys.h"
@ -99,7 +99,7 @@ static void readsubelems_wtp_board_data(mavl_t cfg, uint8_t * msgelem,
if (key){
char add_key[256];
sprintf(add_key,"wtp_board_data/%s",key);
cw_kvt_add(cfg,add_key,CW_TYPE_BSTR16,msgelem+i,sublen);
cw_ktv_add(cfg,add_key,CW_TYPE_BSTR16,msgelem+i,sublen);
}
@ -134,7 +134,7 @@ int capwap_in_wtp_board_data(struct cw_ElemHandler *eh, struct cw_ElemHandlerPar
sprintf(vendor_key,"%s/%s",eh->key,CW_KEY_VENDOR);
cw_kvt_add(cfg,vendor_key,CW_TYPE_DWORD,data,len);
cw_ktv_add(cfg,vendor_key,CW_TYPE_DWORD,data,len);
/*
mbag_t itemstore = conn->incomming;

View File

@ -25,7 +25,7 @@ int capwap_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t
d+=cw_put_ac_status(d ,(struct cw_ac_status*)(i->u2.data),conn);
/*
i = mbag_get(conn->local,CW_ITEM_AC_HARDWARE_VERSION);
if ( i ) {
@ -44,7 +44,7 @@ int capwap_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t
else {
cw_log(LOG_ERR, "Can't send software version in AC descriptor, not set.");
}
*/
int len = d-dst-4;
return len + cw_put_elem_hdr(dst,a->elem_id,len);

View File

@ -41,7 +41,7 @@ int capwap_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a, uint8_
mbag_item_t * i;
i = mbag_get(mbag,CW_ITEM_WTP_HARDWARE_VERSION);
if ( i ) {
/* if ( i ) {
d += cw_put_version(d,CW_SUBELEM_WTP_HARDWARE_VERSION,i->u2.data);
if (bstrv_get_vendor_id(i->u2.data)){
d += cw_put_dword(d, 0);
@ -55,10 +55,10 @@ int capwap_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a, uint8_
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 ) {
/* if ( i ) {
d += cw_put_version(d,CW_SUBELEM_WTP_SOFTWARE_VERSION,i->u2.data);
}
else {
@ -73,7 +73,7 @@ int capwap_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a, uint8_
cw_log(LOG_ERR, "Can't send Bootloader Version in WTP descriptor, not set.");
}
*/
int len = d-dst-4;
return len + cw_put_elem_hdr(dst,a->elem_id,len);
}

View File

@ -4,7 +4,7 @@
struct cw_Mod *mod_capwap_ac();
struct cw_Mod *mod_capwap_wtp();
#include "cw/msget.h"
#include "cw/msgset.h"
#include "cw/conn.h"

View File

@ -17,7 +17,7 @@ extern int capwap_register_actions_ac(struct cw_actiondef *def);
static int init()
{
cw_dbg(DBG_MOD, "Initialiazing mod_capwap.");
cw_dbg(DBG_MOD, "CAPWAP: Initialiazing mod_capwap.");
return 0;
}