author | mickeyl <mickeyl> | 2003-03-30 01:51:14 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-03-30 01:51:14 (UTC) |
commit | d11a0154e2d9732854c9a3d598857bc20f359849 (patch) (side-by-side diff) | |
tree | af0e0273d01f4f6c64c9f230f22bb91a7a8a21d8 /noncore/net/wellenreiter/libwellenreiter/source/sniff.hh | |
parent | 99899abc80a8aa05044eeecd8a061b0a8efaa713 (diff) | |
download | opie-d11a0154e2d9732854c9a3d598857bc20f359849.zip opie-d11a0154e2d9732854c9a3d598857bc20f359849.tar.gz opie-d11a0154e2d9732854c9a3d598857bc20f359849.tar.bz2 |
- the network work for libopie2 pays off...
- good bye to wellenreiterd, t'was fun but always too unstable and too hard to maintain
- good bye to libwellenreiter
Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter/source/sniff.hh') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/sniff.hh | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/sniff.hh b/noncore/net/wellenreiter/libwellenreiter/source/sniff.hh deleted file mode 100644 index a4cf4b7..0000000 --- a/noncore/net/wellenreiter/libwellenreiter/source/sniff.hh +++ b/dev/null @@ -1,73 +0,0 @@ -/* $Id$ */ - -#ifndef SNIFF_HH -#define SNIFF_HH - -#include <string.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> -#include <sys/types.h> -#include <sys/time.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> - -extern "C" -{ -#include <net/bpf.h> -#include <pcap.h> -} - -#define NONBROADCASTING "non-broadcasting" - -/* holds all the interresting data */ -struct packetinfo -{ - int isvalid; - int pktlen; - int fctype; - int fcsubtype; - int fc_wep; - int cap_WEP; - int cap_IBSS; - int cap_ESS; - int channel; - char bssid[sizeof("00:00:00:00:00:00") + 1]; - char desthwaddr[sizeof("00:00:00:00:00:00") + 1]; - char sndhwaddr[sizeof("00:00:00:00:00:00") + 1]; - char ssid[128]; - int ssid_len; -}; - -/* Function definitions */ -/* Used for stoping and starting the sniffer process */ -int start_sniffer(const char *device, int cardtype); -int stop_sniffer(const char *device, int cardtype); -void process_packets(const struct pcap_pkthdr* pkthdr,const u_char* packet, char *, int); -int decode_80211b_hdr(const u_char *p,struct packetinfo *ppinfo); -void etheraddr_string(register const u_char *ep,char * text); -int handle_beacon(u_int16_t fc, const u_char *p,struct packetinfo *ppinfo); -int GetHeaderLength(u_int16_t fc); - -/* - * True if "l" bytes of "var" were captured. - * - * The "snapend - (l) <= snapend" checks to make sure "l" isn't so large - * that "snapend - (l)" underflows. - * - * The check is for <= rather than < because "l" might be 0. - */ -#define TTEST2(var, l) (snapend - (l) <= snapend && \ - (const u_char *)&(var) <= snapend - (l)) - -/* True if "var" was captured */ -#define TTEST(var) TTEST2(var, sizeof(var)) - -/* Bail if "l" bytes of "var" were not captured */ -#define TCHECK2(var, l) if (!TTEST2(var, l)) goto trunc - -/* Bail if "var" was not captured */ -#define TCHECK(var) TCHECK2(var, sizeof(var)) - -#endif /* SNIFF_HH */ |