Rename CW_VERSION -> CAPWAP_VERSION
FossilOrigin-Name: ce9db85dbf2ae1600681dbe82b5c6c9105333433e5cb7166fe0787f2a1ff172e
This commit is contained in:
parent
cea7e10c37
commit
6eb7bea900
@ -46,7 +46,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/** CAPWAP Version */
|
/** CAPWAP Version */
|
||||||
#define CW_VERSION (0)
|
#define CAPWAP_VERSION (0)
|
||||||
|
|
||||||
#define CW_IANA_ENTERPRISE_NUMBER 0
|
#define CW_IANA_ENTERPRISE_NUMBER 0
|
||||||
|
|
||||||
@ -94,8 +94,8 @@
|
|||||||
#define CW_WBID_EPCGLOBAL 3
|
#define CW_WBID_EPCGLOBAL 3
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
#define CAPWAP_PACKET_PREAMBLE (CW_VERSION<<4)
|
#define CAPWAP_PACKET_PREAMBLE (CAPWAP_VERSION<<4)
|
||||||
#define CAPWAP_DTLS_PACKET_PREAMBLE (CW_VERSION<<4|1)
|
#define CAPWAP_DTLS_PACKET_PREAMBLE (CAPWAP_VERSION<<4|1)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* control header stuff
|
* control header stuff
|
||||||
|
@ -75,7 +75,7 @@ void cw_init_request(struct conn *conn, int msg_id)
|
|||||||
cw_put_dword(buffer + 4, 0);
|
cw_put_dword(buffer + 4, 0);
|
||||||
|
|
||||||
/* unencrypted */
|
/* 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_rmac(buffer, conn->base_rmac);
|
||||||
//cw_set_hdr_hlen(buffer, 2);
|
//cw_set_hdr_hlen(buffer, 2);
|
||||||
@ -99,7 +99,7 @@ void cw_init_data_msg(struct conn *conn)
|
|||||||
cw_put_dword(buffer + 4, 0);
|
cw_put_dword(buffer + 4, 0);
|
||||||
|
|
||||||
/* unencrypted */
|
/* 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);
|
int preamble = cw_get_hdr_preamble(packet);
|
||||||
|
|
||||||
if ((preamble & 0xf0) != (CW_VERSION << 4)) {
|
if ((preamble & 0xf0) != (CAPWAP_VERSION << 4)) {
|
||||||
/* wrong version */
|
/* wrong version */
|
||||||
cw_dbg(DBG_PKT_ERR,
|
cw_dbg(DBG_PKT_ERR,
|
||||||
"Discarding packet from %s, wrong version, version=%d, version %d expected.",
|
"Discarding packet from %s, wrong version, version=%d, version %d expected.",
|
||||||
sock_addr2str(&conn->addr), (preamble & 0xf0) >> 4,
|
sock_addr2str(&conn->addr), (preamble & 0xf0) >> 4,
|
||||||
CW_VERSION);
|
CAPWAP_VERSION);
|
||||||
errno = EAGAIN;
|
errno = EAGAIN;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -248,12 +248,12 @@ int netconn_process_packet(struct netconn *nc, uint8_t * packet, int len,
|
|||||||
|
|
||||||
int preamble = cw_get_hdr_preamble(packet);
|
int preamble = cw_get_hdr_preamble(packet);
|
||||||
|
|
||||||
if ((preamble & 0xf0) != (CW_VERSION << 4)) {
|
if ((preamble & 0xf0) != (CAPWAP_VERSION << 4)) {
|
||||||
/* wrong version */
|
/* wrong version */
|
||||||
cw_dbg(DBG_PKT_ERR,
|
cw_dbg(DBG_PKT_ERR,
|
||||||
"Discarding packet from %s, wrong version, version=%d, version %d expected.",
|
"Discarding packet from %s, wrong version, version=%d, version %d expected.",
|
||||||
sock_addr2str(&nc->addr), (preamble & 0xf0) >> 4,
|
sock_addr2str(&nc->addr), (preamble & 0xf0) >> 4,
|
||||||
CW_VERSION);
|
CAPWAP_VERSION);
|
||||||
errno = EAGAIN;
|
errno = EAGAIN;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user