X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fhdw-sniff.git;a=blobdiff_plain;f=main.h;h=55dba3ac9c319ec09c37b6105ccac773cea40993;hp=4d9b7b644f0726fa0646a757aeaa6e2398ef5560;hb=79a24c19a7b1e29e527d00c19f97b80a5dcf0647;hpb=cd581a3e864957fdb30ee1987734e8abd8debf8c diff --git a/main.h b/main.h index 4d9b7b6..55dba3a 100644 --- a/main.h +++ b/main.h @@ -5,32 +5,32 @@ * */ +#define _GNU_SOURCE #include - +#include +#include #define SYSCALL_MAX 32 #define MAX_DEV_CHARS 6 -#define PCAP_SELECT_SEC 0 -#define PCAP_SELECT_USEC 200000 - -#define CAP_MODE_MASK 0x01 -#define CAP_QUIT_MASK 0x02 +#define SELECT_SEC 0 +#define SELECT_USEC 200000 +/* modes */ #define MONITORING_MODE 0x01 #define MANAGED_MODE 0x00 #define QUIT_MODE 0x02 -#define IWPRIV_M_MODE 3 - - -/* typedefinitions */ -struct info_struct -{ - unsigned char caps; /* capabilities */ - int logfile_fd; /* file descriptof for logfile */ - char device[MAX_DEV_CHARS]; /* sniffed devie */ - int channel_hop_fd; /* fd for channel hopping */ -}; +#define MAX_BYTE_WEP 13 /* maximal 104 bit key */ + +/* type definitions */ +typedef struct s_info { + unsigned char mode; /* monitoring/managed mode */ + char device[MAX_DEV_CHARS]; /* sniffed devie */ + int logfile_fd; /* file descriptof for logfile */ + int pcap_fd; /* fd for reading pcap events */ + char key[13]; /* wep key */ + +} t_info; /* function prototypes */