From 349a801c0dc37c7111e6ab5157f8dc130e059dae Mon Sep 17 00:00:00 2001 From: "user@SRH-Linux-01.(none)" Date: Tue, 29 Jul 2014 17:29:40 +0000 Subject: [PATCH] declaration for hdr_print - function added. FossilOrigin-Name: c4b32159fffb99ae4af5ae49427df46769360540959af20cdb94e19e8ffea734 --- src/capwap/capwap.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/capwap/capwap.h b/src/capwap/capwap.h index cd5f7374..16f018d6 100644 --- a/src/capwap/capwap.h +++ b/src/capwap/capwap.h @@ -47,6 +47,18 @@ #define CWTH_FLAGS_F 0x80 /* bit 7 fragment */ #define CWTH_FLAGS_T 0x100 /* bit 8 type of payload frame */ + +#define CWTH_GET_FLAG_R1(th) ((ntohl( *((uint32_t*)th)) % CWTH_FLAGS_R1 ) ? 1:0) +#define CWTH_GET_FLAG_R2(th) ((ntohl( *((uint32_t*)th)) % CWTH_FLAGS_R2 ) ? 1:0) +#define CWTH_GET_FLAG_R3(th) ((ntohl( *((uint32_t*)th)) % CWTH_FLAGS_R3 ) ? 1:0) + +#define CWTH_GET_FLAG_K(th) ((ntohl( *((uint32_t*)th)) % CWTH_FLAGS_K ) ? 1:0) +#define CWTH_GET_FLAG_M(th) ((ntohl( *((uint32_t*)th)) % CWTH_FLAGS_M ) ? 1:0) +#define CWTH_GET_FLAG_W(th) ((ntohl( *((uint32_t*)th)) % CWTH_FLAGS_W ) ? 1:0) +#define CWTH_GET_FLAG_L(th) ((ntohl( *((uint32_t*)th)) % CWTH_FLAGS_L ) ? 1:0) +#define CWTH_GET_FLAG_F(th) ((ntohl( *((uint32_t*)th)) % CWTH_FLAGS_F ) ? 1:0) +#define CWTH_GET_FLAG_T(th) ((ntohl( *((uint32_t*)th)) % CWTH_FLAGS_T ) ? 1:0) + /* wireless binding ids */ #define CWTH_WBID_RESERVED1 0 #define CWTH_WBID_IEEE80211 1 @@ -329,6 +341,7 @@ void cwread_discovery_response(struct ac_info * acinfo, uint8_t * msg, int len); extern int cwsend_echo_response(struct conn * conn,int seqnum,struct radioinfo * radioinfo); //,struct wtpinfo * wtpinfo extern const char * cw_msgelemtostr(int elem); +extern int hdr_print(char *str, uint8_t *packet, int len); #endif