From 0a3ffcf2807bf9222887d17947999da9b9284b22 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Mon, 11 Apr 2016 02:17:23 +0000 Subject: [PATCH] cw_out_radio_generic added. FossilOrigin-Name: fcb869eff341bed095bf9c7252add72a7d72cd38cec876bd992b1018314be2c2 --- src/cw/Makefile | 2 ++ src/cw/cw.h | 3 +++ src/cw/cw_out_generic.c | 41 +---------------------------------------- 3 files changed, 6 insertions(+), 40 deletions(-) diff --git a/src/cw/Makefile b/src/cw/Makefile index bfef060a..ba9a4312 100644 --- a/src/cw/Makefile +++ b/src/cw/Makefile @@ -182,6 +182,7 @@ CAPWAPOBJS= \ cw_check_missing_mand.o \ md5sum.o \ format.o \ +# action_sources.o \ # cw_in_cisco_add_wlan.o DOT11OBJS = \ @@ -280,6 +281,7 @@ CWACTION=action.o \ cisco.o \ radio.o \ cw_in_radio_generic.o\ + cw_out_radio_generic.o \ cw_out_radio_info.o \ capwap_items.o \ item.o \ diff --git a/src/cw/cw.h b/src/cw/cw.h index a01479b6..80b494d8 100644 --- a/src/cw/cw.h +++ b/src/cw/cw.h @@ -572,6 +572,9 @@ static inline int cw_put_elem_session_id(uint8_t *dst, uint8_t *session_id, int return len+cw_put_elem_hdr(dst,CW_ELEM_SESSION_ID,len); } +int cw_out_radio_generic(struct conn *conn, struct cw_action_out *a, uint8_t * dst); + + /** * @} */ diff --git a/src/cw/cw_out_generic.c b/src/cw/cw_out_generic.c index 83d15a83..dea96586 100644 --- a/src/cw/cw_out_generic.c +++ b/src/cw/cw_out_generic.c @@ -1,51 +1,12 @@ - - #include "cw.h" #include "capwap_items.h" #include "dbg.h" #include "log.h" -/* -int cw_put_item(uint8_t * dst, struct mbag_item *item) -{ - if (MBAG_STR == item->type ){ - return cw_put_data(dst, item->data, strlen((char *) item->data)); - } - if (MBAG_BYTE == item->type){ - return cw_put_byte(dst, item->byte); - } - if (MBAG_WORD == item->type){ - return cw_put_word(dst, item->word); - } - if (MBAG_DWORD == item->type){ - return cw_put_dword(dst, item->dword); - } - if (MBAG_BSTR == item->type) { - return cw_put_bstr(dst, item->data); - } - - if ( MBAG_BSTR16 == item->type) - return cw_put_bstr16(dst,item->data); - - if (MBAG_VENDORSTR == item->type) - { - int l=0; - l+=cw_put_dword(dst, bstrv_get_vendor_id(item->data)); - l+=cw_put_data(dst+4, bstrv_data(item->data),bstrv_len(item->data)); - return l; - } - cw_log(LOG_ERR,"No method to put items of type %d",item->type); - - - return 0; -} -*/ - - -int cw_out_generic(struct conn *conn, struct cw_action_out *a, uint8_t * dst) // ,struct mbag_item * item) +int cw_out_generic(struct conn *conn, struct cw_action_out *a, uint8_t * dst) {