changes for actubent - not compiling!
FossilOrigin-Name: adf99bdc2ee784a4acf4066b90c33fb1e6124e8c49c255d3fd5011bb33852d52
This commit is contained in:
@ -25,7 +25,7 @@
|
||||
|
||||
#include "mod_capwap.h"
|
||||
|
||||
static struct cw_ElemHandler elements[] = {
|
||||
static struct cw_ElemHandler handlers[] = {
|
||||
|
||||
{
|
||||
"Discovery Type", /* name */
|
||||
@ -52,7 +52,11 @@ static struct cw_ElemHandler elements[] = {
|
||||
|
||||
static int discovery_request_states[] = {CAPWAP_STATE_DISCOVERY,0};
|
||||
static struct cw_ElemDef discovery_request_elements[] ={
|
||||
{CAPWAP_ELEM_DISCOVERY_TYPE, 1, 0}
|
||||
{0,0,CAPWAP_ELEM_DISCOVERY_TYPE, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_WTP_MAC_TYPE, 1, 0},
|
||||
{0,0,CAPWAP_ELEM_WTP_BOARD_DATA, 1, 0},
|
||||
{0,0,0,00}
|
||||
|
||||
};
|
||||
|
||||
static struct cw_MsgDef messages[] = {
|
||||
@ -108,11 +112,10 @@ static struct cw_MsgDef messages[] = {
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct cw_MsgSet * capwap_register_msg_set(struct cw_MsgSet * set, int mode){
|
||||
if (mode != CW_MOD_MODE_CAPWAP)
|
||||
return NULL;
|
||||
cw_msgset_add(set,messages, elements);
|
||||
cw_msgset_add(set,messages, handlers);
|
||||
return set;
|
||||
}
|
||||
|
||||
@ -124,7 +127,7 @@ void test_sets(){
|
||||
return;
|
||||
}
|
||||
|
||||
cw_msgset_add(set,messages, elements);
|
||||
cw_msgset_add(set,messages, handlers);
|
||||
}
|
||||
/*
|
||||
cw_msgset_add(set,messages);
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
|
||||
#include "cw/mbag.h"
|
||||
#include "cw/action.h"
|
||||
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "cw/mbag.h"
|
||||
#include "cw/log.h"
|
||||
#include "cw/conn.h"
|
||||
|
||||
@ -22,13 +23,13 @@ int capwap_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t
|
||||
return 0;
|
||||
}
|
||||
|
||||
d+=cw_put_ac_status(d ,(struct cw_ac_status*)(i->data),conn);
|
||||
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 ) {
|
||||
d += cw_put_version(d,CW_SUBELEM_AC_HARDWARE_VERSION,i->data);
|
||||
d += cw_put_version(d,CW_SUBELEM_AC_HARDWARE_VERSION,i->u2.data);
|
||||
}
|
||||
else {
|
||||
cw_log(LOG_ERR, "Can't send hard version in AC descriptor, not set.");
|
||||
@ -38,7 +39,7 @@ int capwap_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t
|
||||
i = mbag_get(conn->local,CW_ITEM_AC_SOFTWARE_VERSION);
|
||||
|
||||
if ( i ) {
|
||||
d += cw_put_version(d,CW_SUBELEM_AC_SOFTWARE_VERSION,i->data);
|
||||
d += cw_put_version(d,CW_SUBELEM_AC_SOFTWARE_VERSION,i->u2.data);
|
||||
}
|
||||
else {
|
||||
cw_log(LOG_ERR, "Can't send software version in AC descriptor, not set.");
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
|
||||
#include "cw/mbag.h"
|
||||
#include "cw/action.h"
|
||||
#include "cw/cw.h"
|
||||
#include "cw/mavl.h"
|
||||
|
@ -1,4 +1,5 @@
|
||||
|
||||
#include "cw/mbag.h"
|
||||
#include "cw/action.h"
|
||||
#include "cw/capwap_items.h"
|
||||
#include "cw/capwap.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
#include "cw/mbag.h"
|
||||
#include "cw/conn.h"
|
||||
#include "cw/rand.h"
|
||||
#include "cw/log.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "cw/mbag.h"
|
||||
#include "cw/log.h"
|
||||
#include "cw/conn.h"
|
||||
#include "cw/capwap_items.h"
|
||||
@ -41,12 +42,12 @@ 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 ) {
|
||||
d += cw_put_version(d,CW_SUBELEM_WTP_HARDWARE_VERSION,i->data);
|
||||
if (bstrv_get_vendor_id(i->data)){
|
||||
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);
|
||||
d += cw_put_word(d, CW_SUBELEM_WTP_HARDWARE_VERSION);
|
||||
d += cw_put_word(d, bstrv_len(i->data));
|
||||
d += cw_put_data(d, bstrv_data(i->data), bstrv_len(i->data));
|
||||
d += cw_put_word(d, bstrv_len(i->u2.data));
|
||||
d += cw_put_data(d, bstrv_data(i->u2.data), bstrv_len(i->u2.data));
|
||||
|
||||
}
|
||||
}
|
||||
@ -58,7 +59,7 @@ int capwap_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a, uint8_
|
||||
i = mbag_get(mbag,CW_ITEM_WTP_SOFTWARE_VERSION);
|
||||
|
||||
if ( i ) {
|
||||
d += cw_put_version(d,CW_SUBELEM_WTP_SOFTWARE_VERSION,i->data);
|
||||
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.");
|
||||
@ -66,7 +67,7 @@ int capwap_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a, uint8_
|
||||
|
||||
i = mbag_get(mbag,CW_ITEM_WTP_BOOTLOADER_VERSION);
|
||||
if ( i ) {
|
||||
d += cw_put_version(d,CW_SUBELEM_WTP_BOOTLOADER_VERSION,i->data);
|
||||
d += cw_put_version(d,CW_SUBELEM_WTP_BOOTLOADER_VERSION,i->u2.data);
|
||||
}
|
||||
else {
|
||||
cw_log(LOG_ERR, "Can't send Bootloader Version in WTP descriptor, not set.");
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
#include "cw/mbag.h"
|
||||
#include "cw/mod.h"
|
||||
#include "cw/log.h"
|
||||
#include "cw/dbg.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
#include "cw/mbag.h"
|
||||
#include "cw/mod.h"
|
||||
#include "cw/log.h"
|
||||
#include "cw/dbg.h"
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "include/cipwap_items.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
static cw_elem_handler_t _DISCOVERY_TYPE = {
|
||||
.id = CAPWAP_ELEM_DISCOVERY_TYPE,
|
||||
.name = "WTP Frame Tunnel Mode",
|
||||
@ -50,6 +50,7 @@ static cw_elem_handler_t _DISCOVERY_TYPE = {
|
||||
.min_len = 1,
|
||||
.max_len = 1
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
static cw_msgdef_t messages[] = {
|
||||
@ -96,7 +97,6 @@ static cw_msgdef_t messages[] = {
|
||||
|
||||
|
||||
|
||||
|
||||
static cw_action_in_t actions_in[] = {
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user