17#include "../misc/byteswap.h"
28 unsigned int byte, crc, mask;
31 while (i < message_len) {
34 for (j = 7; j >= 0; j--) {
36 crc = (crc >> 1) ^ (0xEDB88320 & mask);
57 uint32_t oCRC = *((uint32_t *) ((
char *) frame + (frame_len - 4)));
int libwifi_frame_verify(void *frame, size_t frame_len)
Check if the given raw 802.11 frame has a valid FCS.
uint32_t libwifi_crc32(const unsigned char *message, int message_len)
Calculate the CRC32 sum of a given buffer.
uint32_t libwifi_calculate_fcs(const unsigned char *frame, size_t frame_len)
Calculate the frame checksum for an 802.11 frame.