introduced beacon header
[my-code/hdw-sniff.git] / hdw-sniff.h
1 #include <linux/wireless.h>
2
3 #define C_MAX 14
4
5 /* the pcap_process callback function */
6 void pcap_process(u_char *count,const struct pcap_pkthdr *pcap_header,
7                         const u_char *package);
8
9 /* snap header struct */
10 struct snaphdr {
11                 unsigned char snap[6];  /* the six magic snap chars */
12                 unsigned short proto;   /* protocol type */
13 } __attribute__ ((packed));
14
15 /* info struct */
16 struct info_struct {
17                 int count;      /* count packages */
18                 char dev[10];   /* device */
19                 char mmode;     /* monitor type ... and later more */
20                 int channel;    /* current freq channel */
21 };
22
23 /* hop_chanel function */
24 int hop_channel(struct info_struct *info,int foo_fd);
25
26 /* beacon header */
27 struct beacon_struct {
28                 long int timestamp;             /* time stamp */
29                 unsigned short interval;        /* beacon interval field */
30                 unsigned short capability;      /* capability field */
31                 unsigned char ssid;             /* ssid field */
32 } __attribute__ ((packed));
33