Work on mods.
FossilOrigin-Name: 5c56ae361f2c31ef33603f8b657f3d4768c67a8bb2135b82b0933ba65fd3c985
This commit is contained in:
@ -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 \
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,66 +0,0 @@
|
||||
#include "log.h"
|
||||
#include "conn.h"
|
||||
|
||||
#include "mbag.h"
|
||||
#include "capwap_items.h"
|
||||
#include "capwap.h"
|
||||
|
||||
|
||||
#include "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)
|
||||
{
|
||||
|
||||
uint8_t *d = dst+4;
|
||||
struct mbag_item * i;
|
||||
i = mbag_get(conn->local,CW_ITEM_AC_STATUS);
|
||||
|
||||
if (!i) {
|
||||
cw_log(LOG_ERR,"Can't send AC Descriptor, no AC Status Item found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
d+=cw_put_ac_status(d ,(struct cw_ac_status*)(i->data));
|
||||
|
||||
|
||||
|
||||
i = mbag_get(conn->local,CW_ITEM_AC_HARDWARE_VERSION);
|
||||
if ( i ) {
|
||||
d += cw_put_version(d,CW_SUBELEM_AC_HARDWARE_VERSION,i->data);
|
||||
}
|
||||
else {
|
||||
cw_log(LOG_ERR, "Can't send hard version in AC descriptor, not set.");
|
||||
}
|
||||
|
||||
|
||||
i = mbag_get(conn->local,CW_ITEM_AC_SOFTWARE_VERSION);
|
||||
|
||||
if ( i ) {
|
||||
d += cw_put_version(d,CW_SUBELEM_AC_SOFTWARE_VERSION,i->data);
|
||||
}
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user