Move CRC-32 routine from wlantest to src/utils

This allows the CRC-32 routine to be shared for other purposes in
addition to the WEP/TKIP/FCS within wlantest.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
master
Jouni Malinen 9 years ago committed by Jouni Malinen
parent a8ef83f49d
commit e2991ee580

@ -17,6 +17,7 @@ LIB_OBJS= \
base64.o \
bitfield.o \
common.o \
crc32.o \
ip_addr.o \
radiotap.o \
trace.o \

@ -9,6 +9,7 @@
#include "utils/includes.h"
#include "utils/common.h"
#include "utils/crc32.h"
/*
* IEEE 802.11 FCS CRC32

@ -0,0 +1,14 @@
/*
* 32-bit CRC for FCS calculation
* Copyright (c) 2010, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#ifndef CRC32_H
#define CRC32_H
u32 crc32(const u8 *frame, size_t frame_len);
#endif /* CRC32_H */

@ -69,7 +69,6 @@ OBJS += rx_ip.o
OBJS += rx_tdls.o
OBJS += bss.o
OBJS += sta.o
OBJS += crc32.o
OBJS += ccmp.o
OBJS += tkip.o
OBJS += ctrl.o
@ -81,7 +80,6 @@ OBJS += gcmp.o
LIBS += -lpcap
TOBJS += test_vectors.o
TOBJS += crc32.o
TOBJS += ccmp.o
TOBJS += tkip.o
TOBJS += wep.o

@ -9,6 +9,7 @@
#include "utils/includes.h"
#include "utils/common.h"
#include "utils/crc32.h"
#include "utils/radiotap.h"
#include "utils/radiotap_iter.h"
#include "common/ieee802_11_defs.h"

@ -9,6 +9,7 @@
#include "utils/includes.h"
#include "utils/common.h"
#include "utils/crc32.h"
#include "utils/eloop.h"
#include "common/ieee802_11_defs.h"
#include "wlantest.h"

@ -9,6 +9,7 @@
#include "utils/includes.h"
#include "utils/common.h"
#include "utils/crc32.h"
#include "common/ieee802_11_defs.h"
#include "wlantest.h"

@ -9,6 +9,7 @@
#include "utils/includes.h"
#include "utils/common.h"
#include "utils/crc32.h"
#include "common/ieee802_11_defs.h"
#include "wlantest.h"

@ -237,7 +237,6 @@ void wlantest_process(struct wlantest *wt, const u8 *data, size_t len);
void wlantest_process_prism(struct wlantest *wt, const u8 *data, size_t len);
void wlantest_process_80211(struct wlantest *wt, const u8 *data, size_t len);
void wlantest_process_wired(struct wlantest *wt, const u8 *data, size_t len);
u32 crc32(const u8 *frame, size_t frame_len);
int monitor_init(struct wlantest *wt, const char *ifname);
int monitor_init_wired(struct wlantest *wt, const char *ifname);
void monitor_deinit(struct wlantest *wt);

Loading…
Cancel
Save