actube/src/cw/cw_init_data_keep_alive_msg.c
7u83@mail.ru bb85f1c371 Renamed CW_FLAGS... -> CAPWAP_FLAGS...
FossilOrigin-Name: 8b713609a3b32597a7622fcfc5ddd74e223643615bdd28ccac322f9f0e82cc23
2018-02-23 08:30:10 +00:00

24 lines
420 B
C

#include "cw.h"
#include "capwap.h"
uint8_t *cw_init_data_keep_alive_msg(uint8_t * buffer,uint8_t *rmac)
{
/* zero the first 8 bytes */
memset(buffer,0,8);
/* put capwap header, unencrypted */
#if CAPWAP_PACKET_PREAMBLE != 0
cw_set_hdr_preamble(buffer, CAPWAP_PACKET_PREAMBLE);
#endif
cw_set_hdr_rmac(buffer, rmac);
cw_set_hdr_flags(buffer, CAPWAP_FLAG_HDR_K,1);
return cw_get_hdr_payload_ptr(buffer);
}