const u_char *package) {
/* local variables */
+ char tmp_buf[20];
struct linux_wlan_ng_prism_hdr *prism_hdr;
struct ieee802_11_hdr *w_hdr;
struct ethhdr *e_hdr;
(strncmp(my_info_struct->dev,"wlan",4)==0)) {
printf("prism header: (%d bytes)\n",p_o);
prism_hdr=(struct linux_wlan_ng_prism_hdr *)package;
- printf("message code/length: %d/%d\n",ntohs(prism_hdr->msgcode),
- ntohs(prism_hdr->msglen));
- printf("device: %s\n",prism_hdr->devname);
+ printf("| message code/length: %d/%d |\t",prism_hdr->msgcode,
+ prism_hdr->msglen);
+ printf("device: %s |\n",prism_hdr->devname);
/* ieee802.11 header */
printf("ieee802.11 header: (%d bytes)\n",w_o);
w_hdr=(struct ieee802_11_hdr *)(package+p_o);
printf("%s%d%s",(i==0?"|":""),
(((w_hdr->frame_ctl) & (1<<i))>0?1:0),
(i==15?"|\n":"|"));
- printf("fc: | v | t | s-t |t|f|m|r|p|m|w|o|\n");
+ printf(" | v | t | s-t |t|f|m|r|p|m|w|o|\n");
+ printf("debug: %d\n",(w_hdr->frame_ctl)<<15);
+ if((w_hdr->frame_ctl & IEEE802_11_STYPE_BEACON)>0) strcpy(tmp_buf,"beacon");
+ else strcpy(tmp_buf,"unknown");
+
+ printf("=> %s\n",tmp_buf);
- printf("ion_id: %x\n",ntohs(w_hdr->duration_id));
+ printf("duration/id: %x\n",w_hdr->duration_id);
printf("version check ... %s\n",
- ((ntohs(w_hdr->frame_ctl) & IEEE802_11_FCTL_VERS)==0x00)?
+ ((w_hdr->frame_ctl & IEEE802_11_FCTL_VERS)==0x00)?
"ok":"unknown");
}
/* ieee802.3 */
/* ethernet */
+ if((strncmp(my_info_struct->dev,"eth",3)==0) |
+ ((w_hdr->frame_ctl & IEEE802_11_FTYPE_DATA)>0)) {
printf("ethernet: (%d bytes)\n",e_o);
e_hdr=(struct ethhdr *)(package+p_o+w_o);
/* what types ? */
ntohs(ip_hdr->protocol));
// printf("chksum: %x\n",ntohs(ip_hdr->ip_sum));
}
+ }
+
+ /* check what we have ... */
printf("all dump: (hex)\n");
for(i=p_o+w_o;i<pcap_header->caplen;i++)
printf("%x ",*(package+i));