hostap/wlantest/wlantest.h
Jouni Malinen a149fcc77d wlantest: Add preliminary version of IEEE 802.11 protocol testing tool
This tool can be used to capture IEEE 802.11 frames either from a
monitor interface for realtime capturing or from pcap files for
offline analysis. This version is only adding basic infrastructure for
going through the frames and parsing their headers.
2010-11-07 23:29:00 +02:00

34 lines
922 B
C

/*
* wlantest - IEEE 802.11 protocol monitoring and testing tool
* Copyright (c) 2010, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Alternatively, this software may be distributed under the terms of BSD
* license.
*
* See README and COPYING for more details.
*/
#ifndef WLANTEST_H
#define WLANTEST_H
struct wlantest {
int monitor_sock;
unsigned int rx_mgmt;
unsigned int rx_ctrl;
unsigned int rx_data;
unsigned int fcs_error;
};
int read_cap_file(struct wlantest *wt, const char *fname);
void wlantest_process(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);
void monitor_deinit(struct wlantest *wt);
#endif /* WLANTEST_H */