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>
31 #define SYSCALL_MAX 32
32 #define CHANNEL_MAX 13
33 #define MAX_DEV_CHARS 6
34 #define MAX_SYSCALL_CHARS 64
37 #define HOP_USEC 200000
40 #define MODE_MONITOR (1<<0)
41 #define MODE_WLANNG (1<<1)
42 #define MODE_QUIT (1<<2)
43 #define MODE_HEXOUT (1<<3)
44 #define MODE_ASCIIOUT (1<<4)
46 #define MAX_BYTE_WEP 13 /* maximal 104 bit key */
48 /* type definitions */
49 typedef struct s_info {
50 int count; /* count packages */
51 unsigned char mode; /* monitoring/managed mode */
52 char device[MAX_DEV_CHARS]; /* sniffed devie */
53 int logfile_fd; /* file descriptof for logfile */
54 int pcap_fd; /* fd for reading pcap events */
57 char key[13]; /* wep key */
62 /* function prototypes */
64 int get_user_event(t_info *info);
65 int hop_channel(t_info *info);