From 6eb7bea9009009a1ae466f905e16634c79afe423 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Fri, 23 Feb 2018 08:12:39 +0000 Subject: [PATCH] Rename CW_VERSION -> CAPWAP_VERSION FossilOrigin-Name: ce9db85dbf2ae1600681dbe82b5c6c9105333433e5cb7166fe0787f2a1ff172e --- src/cw/capwap.h | 6 +++--- src/cw/conn_process_packet.c | 8 ++++---- src/cw/netconn.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cw/capwap.h b/src/cw/capwap.h index cc4577c6..5abe9ced 100644 --- a/src/cw/capwap.h +++ b/src/cw/capwap.h @@ -46,7 +46,7 @@ */ /** CAPWAP Version */ -#define CW_VERSION (0) +#define CAPWAP_VERSION (0) #define CW_IANA_ENTERPRISE_NUMBER 0 @@ -94,8 +94,8 @@ #define CW_WBID_EPCGLOBAL 3 /**@}*/ -#define CAPWAP_PACKET_PREAMBLE (CW_VERSION<<4) -#define CAPWAP_DTLS_PACKET_PREAMBLE (CW_VERSION<<4|1) +#define CAPWAP_PACKET_PREAMBLE (CAPWAP_VERSION<<4) +#define CAPWAP_DTLS_PACKET_PREAMBLE (CAPWAP_VERSION<<4|1) /* * control header stuff diff --git a/src/cw/conn_process_packet.c b/src/cw/conn_process_packet.c index aa6270f6..ffea24a8 100644 --- a/src/cw/conn_process_packet.c +++ b/src/cw/conn_process_packet.c @@ -75,7 +75,7 @@ void cw_init_request(struct conn *conn, int msg_id) cw_put_dword(buffer + 4, 0); /* unencrypted */ - cw_set_hdr_preamble(buffer, CW_VERSION << 4 | 0); + cw_set_hdr_preamble(buffer, CAPWAP_VERSION << 4 | 0); cw_set_hdr_rmac(buffer, conn->base_rmac); //cw_set_hdr_hlen(buffer, 2); @@ -99,7 +99,7 @@ void cw_init_data_msg(struct conn *conn) cw_put_dword(buffer + 4, 0); /* unencrypted */ - cw_set_hdr_preamble(buffer, CW_VERSION << 4 | 0); + cw_set_hdr_preamble(buffer, CAPWAP_VERSION << 4 | 0); @@ -579,12 +579,12 @@ int conn_process_packet2(struct conn *conn, uint8_t * packet, int len, int preamble = cw_get_hdr_preamble(packet); - if ((preamble & 0xf0) != (CW_VERSION << 4)) { + if ((preamble & 0xf0) != (CAPWAP_VERSION << 4)) { /* wrong version */ cw_dbg(DBG_PKT_ERR, "Discarding packet from %s, wrong version, version=%d, version %d expected.", sock_addr2str(&conn->addr), (preamble & 0xf0) >> 4, - CW_VERSION); + CAPWAP_VERSION); errno = EAGAIN; return -1; } diff --git a/src/cw/netconn.c b/src/cw/netconn.c index 424f12f1..b249682f 100644 --- a/src/cw/netconn.c +++ b/src/cw/netconn.c @@ -248,12 +248,12 @@ int netconn_process_packet(struct netconn *nc, uint8_t * packet, int len, int preamble = cw_get_hdr_preamble(packet); - if ((preamble & 0xf0) != (CW_VERSION << 4)) { + if ((preamble & 0xf0) != (CAPWAP_VERSION << 4)) { /* wrong version */ cw_dbg(DBG_PKT_ERR, "Discarding packet from %s, wrong version, version=%d, version %d expected.", sock_addr2str(&nc->addr), (preamble & 0xf0) >> 4, - CW_VERSION); + CAPWAP_VERSION); errno = EAGAIN; return -1; }