X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fhdw-sniff.git;a=blobdiff_plain;f=main.h;h=b44ce38efbe61e00c29e70cdfdfe52d89b994fb4;hp=4e5259c280c691e2027edf499c8472b0ac2a4c05;hb=04773ef6afbd043429d526ca375e5caba1294c99;hpb=ce967f4d1e3dc10cda58062bc21aaf264e1a0f81 diff --git a/main.h b/main.h index 4e5259c..b44ce38 100644 --- a/main.h +++ b/main.h @@ -28,8 +28,13 @@ #include "parse.h" +#include "event.h" +#include "display.h" +#include "input.h" +#include "list.h" + #define SYSCALL_MAX 32 -#define CHANNEL_MAX 13 +#define CHANNEL_MAX 12 #define MAX_DEV_CHARS 6 #define MAX_SYSCALL_CHARS 64 @@ -47,21 +52,24 @@ /* type definitions */ typedef struct s_info { + t_event event; + t_display display; + t_input input; int count; /* count packages */ unsigned char mode; /* monitoring/managed mode */ char device[MAX_DEV_CHARS]; /* sniffed devie */ - int logfile_fd; /* file descriptof for logfile */ + int log_fd; /* file descriptor for logfile */ int pcap_fd; /* fd for reading pcap events */ + int dump_fd; /* fd for dumping received packages */ int current_channel; int channel_hop_fd; - char key[13]; /* wep key */ pcap_t *pcap_handle; + t_list sniffed_sta; + int view_table; } t_info; - /* function prototypes */ -int usage(void); -int get_user_event(t_info *info); -int hop_channel(t_info *info); +void parse_package(unsigned char *ptr,const struct pcap_pkthdr *pcap_header,const unsigned char *package); +int display_console(t_info *info,char *string); #endif