author | mjm <mjm> | 2002-11-27 22:06:43 (UTC) |
---|---|---|
committer | mjm <mjm> | 2002-11-27 22:06:43 (UTC) |
commit | 31a16f8dc73d79178a4840d9e7aa4a07bfd65a26 (patch) (side-by-side diff) | |
tree | 25ca113de74febde5d72a46d09315bd9d329ef8f /noncore/net/wellenreiter/daemon/source/sniffer.hh | |
parent | 2a84b561e50f8fd7973b56b3b0a87471f6b5f18c (diff) | |
download | opie-31a16f8dc73d79178a4840d9e7aa4a07bfd65a26.zip opie-31a16f8dc73d79178a4840d9e7aa4a07bfd65a26.tar.gz opie-31a16f8dc73d79178a4840d9e7aa4a07bfd65a26.tar.bz2 |
moved cardmode and sniffer to library to provide a generic lib.
Diffstat (limited to 'noncore/net/wellenreiter/daemon/source/sniffer.hh') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/daemon/source/sniffer.hh | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/noncore/net/wellenreiter/daemon/source/sniffer.hh b/noncore/net/wellenreiter/daemon/source/sniffer.hh deleted file mode 100644 index 7e1e3be..0000000 --- a/noncore/net/wellenreiter/daemon/source/sniffer.hh +++ b/dev/null @@ -1,64 +0,0 @@ -/* $Id$ */ - -#ifndef SNIFFER_HH -#define SNIFFER_HH - -#include <string.h> -#include <stdio.h> -#include <stdlib.h> -#include <pcap.h> -#include <errno.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <net/bpf.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")]; - char desthwaddr[sizeof("00:00:00:00:00:00")]; - char sndhwaddr[sizeof("00:00:00:00:00:00")]; - char *ssid; - int ssid_len; -}; - -void process_packets(u_char *useless,const struct pcap_pkthdr* pkthdr,const u_char* packet); -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 /* SNIFFER_HH */ |