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 MESSAGE_MAX 64
38 #define CHANNEL_MAX 13
39 #define MAX_DEV_CHARS 6
40 #define MAX_SYSCALL_CHARS 128
43 #define HOP_USEC 200000
45 #define GUI_OFFSET_STA 1
46 #define GUI_OFFSET_SSID 19
47 #define GUI_OFFSET_AP 39
48 #define GUI_OFFSET_WEP 44
49 #define GUI_OFFSET_MGMT 50
50 #define GUI_OFFSET_CTRL 57
51 #define GUI_OFFSET_DATA 64
52 #define GUI_OFFSET_ACTIVE 71
53 #define GUI_OFFSET_SIGNAL 77
55 #define HDW_SNIFF_MAX_WIDTH (GUI_OFFSET_SIGNAL+5)
56 #define HDW_SNIFF_MAX_HEIGHT 8
59 #define MODE_IEEE80211 (1<<0)
60 #define MODE_PRISM (1<<1)
61 #define MODE_QUIT (1<<2)
62 #define MODE_HEXOUT (1<<3)
63 #define MODE_ASCIIOUT (1<<4)
65 #define MAX_BYTE_WEP 13 /* maximal 104 bit key */
68 #define VIEW_SINGLE 0x01
70 /* type definitions */
71 typedef struct s_info {
78 int count; /* count packages */
82 unsigned char mode; /* ieee802.11/prism mode */
83 char device[MAX_DEV_CHARS]; /* sniffed devie */
84 int log_fd; /* file descriptor for logfile */
86 pcap_dumper_t *dump_handle;
94 /* function prototypes */
95 void parse_package(unsigned char *ptr,const struct pcap_pkthdr *pcap_header,const unsigned char *package);
96 int display_console(t_info *info,char *string);