projects
/
my-code
/
hdw-sniff.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d161945
)
improved ieee802.11 sniffs
author
hackbard
<hackbard>
Wed, 18 Sep 2002 20:26:57 +0000
(20:26 +0000)
committer
hackbard
<hackbard>
Wed, 18 Sep 2002 20:26:57 +0000
(20:26 +0000)
hdw-sniff.c
patch
|
blob
|
history
diff --git
a/hdw-sniff.c
b/hdw-sniff.c
index
d3b2ca8
..
13c56ab
100644
(file)
--- a/
hdw-sniff.c
+++ b/
hdw-sniff.c
@@
-97,17
+97,21
@@
void pcap_process(u_char *info,const struct pcap_pkthdr *pcap_header,
printf("\n");
printf("---> package %d ---- %s",my_info_struct->count,
ctime((const time_t*)&(pcap_header->ts.tv_sec)));
printf("\n");
printf("---> package %d ---- %s",my_info_struct->count,
ctime((const time_t*)&(pcap_header->ts.tv_sec)));
- printf("pcap header:
");
- printf("capture
length=%d
",pcap_header->caplen);
- printf("length(off wire)
=%d
\n",pcap_header->len);
+ printf("pcap header:
\n
");
+ printf("capture
_length: %d (dec.)
",pcap_header->caplen);
+ printf("length(off wire)
: %d (dec.)
\n",pcap_header->len);
/* is ieee802.11 ? -- we assume yes :) */
if((my_info_struct->mmode-0x30==1) &&
(strncmp(my_info_struct->dev,"wlan",4)==0)) {
/* is ieee802.11 ? -- we assume yes :) */
if((my_info_struct->mmode-0x30==1) &&
(strncmp(my_info_struct->dev,"wlan",4)==0)) {
- printf("debug: ieee802.11\n");
+ printf("ieee802.11 header:\n");
+ w_hdr=(struct ieee802_11_hdr *)package;
+ printf("frame_control: %x duration_id: %x\n",ntohs(w_hdr->frame_ctl),
+ ntohs(w_hdr->duration_id));
+ /* skip ieee802.11 header */
+ package=package+sizeof(struct ieee802_11_hdr);
}
}
-
/* ieee802.3 */
/* ethernet */
e_hdr=(struct ethhdr *)package;
/* ieee802.3 */
/* ethernet */
e_hdr=(struct ethhdr *)package;