1 #include <linux/wireless.h>
5 #define IVLINE "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n"
6 #define cs(n) crypted_snap[n]
7 #define IVL_ARGS cs(0),cs(1),cs(2),cs(3),cs(4),cs(5),cs(6),cs(7),cs(8),cs(9)
9 /* the pcap_process callback function */
10 void pcap_process(u_char *count,const struct pcap_pkthdr *pcap_header,
11 const u_char *package);
13 /* snap header struct */
15 unsigned char snap[6]; /* the six magic snap chars */
16 unsigned short proto; /* protocol type */
17 } __attribute__ ((packed));
21 int count; /* count packages */
22 char dev[10]; /* device */
23 char mmode; /* monitor type ... and later more */
24 int channel; /* current freq channel */
25 struct list *ssid_list; /* pointer to ssid list */
28 /* hop_chanel function */
29 int hop_channel(struct info_struct *info,int foo_fd);
30 int parse_ip(char *ip_o);
31 int parse_tcp(char *tcp_o);
35 unsigned char elementid; /* element id */
36 unsigned char length; /* length of ssid */
37 unsigned char ssid[32]; /* ssid */
38 } __attribute__ ((packed));
41 struct beacon_struct {
42 long long timestamp; /* time stamp */
43 unsigned short interval; /* beacon interval field */
44 unsigned short capability; /* capability field */
45 struct ssid_struct ssid_s; /* ssid field */
46 } __attribute__ ((packed));
48 /* association request header */
49 struct asso_req_struct {
50 unsigned short capability; /* capability field */
51 unsigned short listeninterval; /* listen interval field */
52 unsigned short ssid; /* ssid field */
53 /* supported rates missing */
54 } __attribute__ ((packed));