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>
36 #define SYSCALL_MAX 32
37 #define CHANNEL_MAX 13
38 #define MAX_DEV_CHARS 6
39 #define MAX_SYSCALL_CHARS 64
42 #define HOP_USEC 200000
45 #define MODE_MONITOR (1<<0)
46 #define MODE_WLANNG (1<<1)
47 #define MODE_QUIT (1<<2)
48 #define MODE_HEXOUT (1<<3)
49 #define MODE_ASCIIOUT (1<<4)
51 #define MAX_BYTE_WEP 13 /* maximal 104 bit key */
53 /* type definitions */
54 typedef struct s_info {
58 int count; /* count packages */
62 unsigned char mode; /* monitoring/managed mode */
63 char device[MAX_DEV_CHARS]; /* sniffed devie */
64 int log_fd; /* file descriptor for logfile */
65 int pcap_fd; /* fd for reading pcap events */
66 int dump_fd; /* fd for dumping received packages */
74 /* function prototypes */
75 void parse_package(unsigned char *ptr,const struct pcap_pkthdr *pcap_header,const unsigned char *package);
76 int display_console(t_info *info,char *string);