X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=hdw-sniff.h;h=76eee82dbcee2068f2a3ae7505bfd1bcc007451a;hb=9042c664acc02475b9dbb9109d1a9ddb5d9180c0;hp=d7a3e8961f3e9ab92bfdbc9a61a5fbaa4c0a861c;hpb=0e50ececb00ef7a80203545d27edfaf4bc95d4b8;p=my-code%2Fhdw-sniff.git diff --git a/hdw-sniff.h b/hdw-sniff.h index d7a3e89..76eee82 100644 --- a/hdw-sniff.h +++ b/hdw-sniff.h @@ -1,5 +1,33 @@ +#include + +#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 */ +}; + +/* hop_chanel function */ +int hop_channel(struct info_struct *info,int foo_fd); + +/* beacon header */ +struct beacon_struct { + long int timestamp; /* time stamp */ + unsigned short interval; /* beacon interval field */ + unsigned short capability; /* capability field */ + unsigned char ssid; /* ssid field */ +} __attribute__ ((packed));