y=display->max_y-1;
display_line(display,0,0,2,0,'-');
- display_string(display,4,0,"essid",5);
- display_line(display,10,0,x,0,'-');
+ display_string(display,4,0,"sta",3);
+ display_line(display,8,0,x,0,'-');
//display_line(display,0,0,0,y,'|');
//display_line(display,x,0,x,y,'|');
t_info info;
int pcap_fd;
- int logfd;
int i;
char sys_call[MAX_SYSCALL_CHARS];
char pcap_error[PCAP_ERRBUF_SIZE];
memset(&info,0,sizeof(t_info));
/* parse arguments */
- for(i=1;i<argc;i++)
- {
- if(argv[i][0]=='-')
- {
- switch(argv[i][1])
- {
+ for(i=1;i<argc;i++) {
+ if(argv[i][0]=='-') {
+ switch(argv[i][1]) {
case 'h':
usage();
case 'm':
#include "event.h"
#include "display.h"
#include "input.h"
+#include "list.h"
#define SYSCALL_MAX 32
#define CHANNEL_MAX 12
/* function prototypes */
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
t_info *info;
int i;
- t_sta sniffed_sta;
+ t_sta new_sta;
int ret;
info=(t_info *)ptr;
if(info->dump_fd!=0) {
ret=write(info->dump_fd,pcap_header,sizeof(struct pcap_pkthdr));
if(ret!=sizeof(struct pcap_pkthdr))
- display_console(info->display,"warning, pcap header write failed!");
+ display_console(info,"warning, pcap header write failed!");
ret=write(info->dump_fd,package,pcap_header->caplen);
if(ret!=pcap_header->caplen)
- display_console(info->display,"warning, package write failed!");
+ display_console(info,"warning, package write failed!");
}
/* maybe there is offset to the actual ieee802.11 frame,
for example prism header ... */
+ /* debug log */
+ dprintf(info->log_fd,"new package -> %02x/n",package[0]);
/* go on parsing frame ctl header here ... */
- return 23;
-
}
/* ieee802.11 stuff */
+
+typedef unsigned int u32;
+typedef unsigned short int u16;
+typedef unsigned char u8;
+
#define ADDR_LEN 6
typedef struct s_frame4_hdr {