author | max <max> | 2002-11-23 20:12:57 (UTC) |
---|---|---|
committer | max <max> | 2002-11-23 20:12:57 (UTC) |
commit | 2f11392ab9292df21a6e1374800954a6b405ee9b (patch) (unidiff) | |
tree | 4a3b90822b3cfe18ee95165f45b9fc4d46ea4385 /noncore/net/wellenreiter/daemon/source/sniffer.hh | |
parent | 19a08a4585abf1d6f66101d41374dd5441c5754e (diff) | |
download | opie-2f11392ab9292df21a6e1374800954a6b405ee9b.zip opie-2f11392ab9292df21a6e1374800954a6b405ee9b.tar.gz opie-2f11392ab9292df21a6e1374800954a6b405ee9b.tar.bz2 |
*** empty log message ***
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 | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/noncore/net/wellenreiter/daemon/source/sniffer.hh b/noncore/net/wellenreiter/daemon/source/sniffer.hh index 7f45be6..d262353 100644 --- a/noncore/net/wellenreiter/daemon/source/sniffer.hh +++ b/noncore/net/wellenreiter/daemon/source/sniffer.hh | |||
@@ -10,25 +10,15 @@ | |||
10 | #include <errno.h> | 10 | #include <errno.h> |
11 | #include <sys/socket.h> | 11 | #include <sys/socket.h> |
12 | #include <netinet/in.h> | 12 | #include <netinet/in.h> |
13 | #include <arpa/inet.h> | 13 | #include <arpa/inet.h> |
14 | #include <net/bpf.h> | 14 | #include <net/bpf.h> |
15 | 15 | ||
16 | #define DEFAULT_PATH "/proc/driver/aironet/%s/Config" | ||
17 | #define CARD_TYPE_CISCO1 | ||
18 | #define CARD_TYPE_NG2 | ||
19 | #define CARD_TYPE_HOSTAP3 | ||
20 | 16 | ||
21 | #define NONBROADCASTING "non-broadcasting" | 17 | #define NONBROADCASTING "non-broadcasting" |
22 | 18 | ||
23 | /* only for now, until we have the daemon running */ | ||
24 | /*the config file should provide these information */ | ||
25 | #define SNIFFER_DEVICE "wlan0" | ||
26 | #define CARD_TYPE CARD_TYPE_CISCO | ||
27 | #define SBIN_PATH"/sbin/ifconfig %s promisc up" | ||
28 | #define WLANCTL_PATH "/sbin/wlanctl-ng" | ||
29 | 19 | ||
30 | /* holds all the interresting data */ | 20 | /* holds all the interresting data */ |
31 | struct packetinfo | 21 | struct packetinfo |
32 | { | 22 | { |
33 | int isvalid; | 23 | int isvalid; |
34 | int pktlen; | 24 | int pktlen; |
@@ -45,16 +35,13 @@ struct packetinfo | |||
45 | char *ssid; | 35 | char *ssid; |
46 | int ssid_len; | 36 | int ssid_len; |
47 | }; | 37 | }; |
48 | 38 | ||
49 | 39 | ||
50 | /* Prototypes */ | 40 | /* Prototypes */ |
51 | |||
52 | int sniffer(void); | 41 | int sniffer(void); |
53 | int card_into_monitormode (char * device, int cardtype); | ||
54 | int card_set_promisc_up (char * device); | ||
55 | int start_sniffing (char * device); | 42 | int start_sniffing (char * device); |
56 | void process_packets(u_char *useless,const struct pcap_pkthdr* pkthdr,const u_char* packet); | 43 | void process_packets(u_char *useless,const struct pcap_pkthdr* pkthdr,const u_char* packet); |
57 | int decode_80211b_hdr(const u_char *p,struct packetinfo *ppinfo); | 44 | int decode_80211b_hdr(const u_char *p,struct packetinfo *ppinfo); |
58 | void etheraddr_string(register const u_char *ep,char * text); | 45 | void etheraddr_string(register const u_char *ep,char * text); |
59 | int handle_beacon(u_int16_t fc, const u_char *p,struct packetinfo *ppinfo); | 46 | int handle_beacon(u_int16_t fc, const u_char *p,struct packetinfo *ppinfo); |
60 | 47 | ||