X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=hdw-sniff.h;h=38b2db931cf7a842aaceb29de5266ac8bcf35c6f;hb=551ef6ebd6cfbf7caf60dd132953fad4b687f107;hp=fbea5d522e69ded280be7889eaac8eb43a7ba596;hpb=6da514c21607236c5dff3a1395088cbfb3b17a0a;p=my-code%2Fhdw-sniff.git diff --git a/hdw-sniff.h b/hdw-sniff.h index fbea5d5..38b2db9 100644 --- a/hdw-sniff.h +++ b/hdw-sniff.h @@ -1,17 +1,49 @@ #include +#include "list.h" + +#define C_MAX 14 /* the pcap_process callback function */ void pcap_process(u_char *count,const struct pcap_pkthdr *pcap_header, const u_char *package); +/* snap header struct */ +struct snaphdr { + unsigned char snap[6]; /* the six magic snap chars */ + unsigned short proto; /* protocol type */ +} __attribute__ ((packed)); + /* info struct */ struct info_struct { int count; /* count packages */ char dev[10]; /* device */ char mmode; /* monitor type ... and later more */ int channel; /* current freq channel */ - }; + struct list *ssid_list; /* pointer to ssid list */ +}; /* hop_chanel function */ int hop_channel(struct info_struct *info,int foo_fd); +/* ssid struct */ +struct ssid_struct { + unsigned char elementid; /* element id */ + unsigned char length; /* length of ssid */ + unsigned char ssid[32]; /* ssid */ +} __attribute__ ((packed)); + +/* beacon header */ +struct beacon_struct { + long long timestamp; /* time stamp */ + unsigned short interval; /* beacon interval field */ + unsigned short capability; /* capability field */ + struct ssid_struct ssid_s; /* ssid field */ +} __attribute__ ((packed)); + +/* association request header */ +struct asso_req_struct { + unsigned short capability; /* capability field */ + unsigned short listeninterval; /* listen interval field */ + unsigned short ssid; /* ssid field */ + /* supported rates missing */ +} __attribute__ ((packed));