*
*/
+#define _GNU_SOURCE
#include <stdio.h>
-
+#include <string.h>
+#include <stdlib.h>
#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 */