+ printf("prism header: (%d bytes)\n",p_o);
+ prism_hdr=(struct linux_wlan_ng_prism_hdr *)package;
+ 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("fc: ");
+ for(i=0;i<16;i++)
+ printf("%s%d%s",(i==0?"|":""),
+ (((w_hdr->frame_ctl) & (1<<i))>0?1:0),
+ (i==15?"|\n":"|"));
+ printf(" | v | t | s-t |t|f|m|r|p|m|w|o|\n");
+ /* frame type */
+ /* management */
+ if(!(w_hdr->frame_ctl & 0x0c)) {
+ if((w_hdr->frame_ctl & IEEE802_11_STYPE_ASSOC_REQ)>0)
+ strcpy(tmp_buf,"association request");
+ else if((w_hdr->frame_ctl & IEEE802_11_STYPE_ASSOC_RESP)>0)
+ strcpy(tmp_buf,"association response");
+ else if((w_hdr->frame_ctl & IEEE802_11_STYPE_REASSOC_REQ)>0)
+ strcpy(tmp_buf,"reassociation request");
+ else if((w_hdr->frame_ctl & IEEE802_11_STYPE_REASSOC_RESP)>0)
+ strcpy(tmp_buf,"reassociation response");
+ else if((w_hdr->frame_ctl & IEEE802_11_STYPE_PROBE_REQ)>0)
+ strcpy(tmp_buf,"probe request");
+ else if((w_hdr->frame_ctl & IEEE802_11_STYPE_PROBE_RESP)>0)
+ strcpy(tmp_buf,"probe response");
+ else if((w_hdr->frame_ctl & IEEE802_11_STYPE_BEACON)>0)
+ strcpy(tmp_buf,"beacon");
+ else if((w_hdr->frame_ctl & IEEE802_11_STYPE_ATIM)>0)
+ strcpy(tmp_buf,"announcement traffic indication message");
+ else if((w_hdr->frame_ctl & IEEE802_11_STYPE_DISASSOC)>0)
+ strcpy(tmp_buf,"disassociation");
+ else if((w_hdr->frame_ctl & IEEE802_11_STYPE_AUTH)>0)
+ strcpy(tmp_buf,"authentification");
+ else if((w_hdr->frame_ctl & IEEE802_11_STYPE_DEAUTH)>0)
+ strcpy(tmp_buf,"deauthentification");
+ else strcpy(tmp_buf,"impossible situation \%) - go mail the author.");
+ }
+ else strcpy(tmp_buf,"control & monitor frame types not supported yet");
+ /* print out frame type */
+ printf("=> %s\n",tmp_buf);
+
+ printf("duration/id: 0x%x\n",w_hdr->duration_id);
+ printf("version check ... %s\n",
+ ((w_hdr->frame_ctl & IEEE802_11_FCTL_VERS)==0x00)?
+ "ok":"unknown");