2 * main.h - main header file
4 * author: hackbard@hackdaworld.dyndns.org
15 #include <sys/socket.h>
17 #include <netinet/in.h>
18 #include <arpa/inet.h>
20 #include <sys/types.h>
24 #include <sys/ioctl.h>
27 #include <linux/wireless.h>
35 #define SYSCALL_MAX 32
36 #define CHANNEL_MAX 12
37 #define MAX_DEV_CHARS 6
38 #define MAX_SYSCALL_CHARS 64
41 #define HOP_USEC 200000
44 #define MODE_MONITOR (1<<0)
45 #define MODE_WLANNG (1<<1)
46 #define MODE_QUIT (1<<2)
47 #define MODE_HEXOUT (1<<3)
48 #define MODE_ASCIIOUT (1<<4)
50 #define MAX_BYTE_WEP 13 /* maximal 104 bit key */
52 /* type definitions */
53 typedef struct s_info {
57 int count; /* count packages */
58 unsigned char mode; /* monitoring/managed mode */
59 char device[MAX_DEV_CHARS]; /* sniffed devie */
60 int logfile_fd; /* file descriptof for logfile */
61 int pcap_fd; /* fd for reading pcap events */
64 char key[13]; /* wep key */
70 /* function prototypes */
71 void parse_package(unsigned char *ptr,const struct pcap_pkthdr *pcap_header,const unsigned char *package);