Work on mods.

FossilOrigin-Name: 5c56ae361f2c31ef33603f8b657f3d4768c67a8bb2135b82b0933ba65fd3c985
This commit is contained in:
7u83@mail.ru 2016-03-05 09:11:39 +00:00
parent 304ee17e4f
commit 1885f82f42
8 changed files with 42 additions and 30 deletions

View File

@ -143,7 +143,6 @@ CAPWAPOBJS= \
cw_in_check_img_data_req_wtp.o \
cw_in_check_img_data_resp.o \
cw_out_generic.o \
cw_out_ac_descriptor.o \
cw_out_wtp_descriptor.o \
cw_in_cisco_image_identifier.o\
cw_out_radio_operational_state.o\
@ -159,6 +158,7 @@ CAPWAPOBJS= \
format.o \
cw_in_cisco_add_wlan.o
# cw_out_ac_descriptor.o \

View File

@ -199,7 +199,7 @@ static inline uint8_t * bstrv_create(uint32_t vendor_id, uint8_t *data, uint8_t
uint8_t * bstrv_create_from_str(uint32_t vendor_id,const char *s);
uint8_t * bstr16cfgstr(const char * s);
//uint8_t * bstr16cfgstr(const char * s);
#endif

View File

@ -6,7 +6,8 @@ OBJS=\
capwap_actions_wtp.o \
capwap_in_wtp_descriptor.o \
capwap_in_wtp_board_data.o \
capwap_out_wtp_descriptor.o
capwap_out_wtp_descriptor.o \
capwap_out_ac_descriptor.o
NAME=libcapwap.a

View File

@ -132,7 +132,8 @@ static cw_action_in_t actions_in[] = {
.item_id = CW_ITEM_LOCATION_DATA,
.start = cw_in_generic2,
.max_len = 1024,
.min_len = 1
.min_len = 1,
.mand = 1
}
,
@ -242,14 +243,16 @@ static cw_action_in_t actions_in[] = {
static cw_action_out_t actions_out[]={
/* Message Discovery Response */
/* ---------------------------------------------------
* Discovery Response Message
*/
/* Discovery Response AC Descriptor */
{
.msg_id = CW_MSG_DISCOVERY_RESPONSE,
.item_id = CW_ITEM_AC_DESCRIPTOR,
.elem_id = CW_ELEM_AC_DESCRIPTOR,
.out = cw_out_ac_descriptor,
.out = capwap_out_ac_descriptor,
.mand = 1
}
,
@ -265,7 +268,11 @@ static cw_action_out_t actions_out[]={
}
,
/* List of CAPWAP Control IPv4 and IPv6 addresses */
/* List of CAPWAP Control IPv4 and IPv6 addresses
* The handler cw_out_capwap_control_ip_addr_list puts
* ipv4 and ipv6 message elements, so the definition
* of .elem_id isn't needed.
*/
{
.msg_id = CW_MSG_DISCOVERY_RESPONSE,
.item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST,
@ -275,6 +282,19 @@ static cw_action_out_t actions_out[]={
}
,
/* ---------------------------------------------------
* Join Response Message
*/
{
.msg_id = CW_MSG_JOIN_RESPONSE,
.elem_id = CW_ELEM_RESULT_CODE,
.item_id = CW_ITEM_RESULT_CODE,
.out = cw_out_generic,
.get = cw_out_get_outgoing,
.mand = 1
}
,
{0,0}

View File

@ -1,28 +1,16 @@
#include "log.h"
#include "conn.h"
#include "cw/log.h"
#include "cw/conn.h"
#include "mbag.h"
#include "capwap_items.h"
#include "capwap.h"
#include "cw/mbag.h"
#include "cw/capwap_items.h"
#include "cw/capwap.h"
#include "cw.h"
#include "cw/cw.h"
/*
int cw_put_subelem_version(uint8_t *dst,uint16_t subelem_id, uint32_t vendor_id,bstr16_t data)
{
uint8_t *d=dst;
d += cw_put_dword(d,vendor_id);
d += cw_put_dword(d, (subelem_id<<16) | bstr16_len(data));
d += cw_put_data(d,bstr16_data(data),bstr16_len(data));
return d-dst;
}
*/
int cw_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t *dst)
int capwap_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t *dst)
{
uint8_t *d = dst+4;

View File

@ -60,7 +60,7 @@ int capwap_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a, uint8_
d += cw_put_version(d,CW_SUBELEM_WTP_BOOTLOADER_VERSION,i->data);
}
else {
cw_log(LOG_ERR, "Can't send Software Version in WTP descriptor, not set.");
cw_log(LOG_ERR, "Can't send Bootloader Version in WTP descriptor, not set.");
}

View File

@ -14,5 +14,7 @@ extern int capwap_in_wtp_board_data(struct conn *conn, struct cw_action_in *a,
extern int capwap_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a,
uint8_t * dst);
extern int capwap_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t *dst);
#endif

View File

@ -106,8 +106,9 @@ static cw_action_out_t actions_out[]={
/* Message Discovery Response */
/* Cisco AP Timesync - Important to get the WTP a DTLS
* connection established*/
/* Cisco AP Timesync - Discovery Request
* Important to get the WTP a DTLS connection established
*/
{
.msg_id = CW_MSG_DISCOVERY_RESPONSE,
.item_id = CW_ITEM_AC_TIMESTAMP,
@ -117,7 +118,7 @@ static cw_action_out_t actions_out[]={
.mand = 1
}
,
/* Discovery Response AC Descriptor */
/* AC Descriptor - Discovery Response */
{
.msg_id = CW_MSG_DISCOVERY_RESPONSE,
.item_id = CW_ITEM_AC_DESCRIPTOR,