2

I'm trying to send 802.11 frames using pcap_sendpacket with the following radiotap:

u_char RADIOTAP_HDR[] = {
0x00,                   // it_version
0x00,                   // padding
0x0a, 0x00,             // length
0x00, 0x00, 0x80, 0x00, // IEEE80211_RADIOTAP_TX_FLAGS
0x00, 0x08,             // no-ack required
};

I'm also using 802.11 header defined in include/linux/ieee80211.h:

struct ieee80211_hdr {
uint16_t /*__le16*/ frame_control;
uint16_t /*__le16*/ duration_id;
uint8_t addr1[6];
uint8_t addr2[6];
uint8_t addr3[6];
uint16_t /*__le16*/ seq_ctrl;
//uint8_t addr4[6];
} __attribute__ ((packed));

When capturing the frame with Wireshark, it looks like an Ethernet frame where the radiotap header is traduced as an Ehternet header.

Did I make a mistake somewhere ? Regards

Spider
  • 875
  • 2
  • 9
  • 27
  • Common people, I still don't see my mistake . Any help is appreciated ; – Spider Apr 19 '15 at 07:36
  • Please show the code you are using, and a tcpdump / wireshark capture. – abligh May 28 '15 at 10:45
  • Also please specify which OS you are using the pcap library on - add it as a tag if possible. – abligh May 28 '15 at 10:46
  • I figured out finally. The problem was not with the code but with the NIC chipset. I was using a broadcom WiFi card and it seems that it is not suitable for frame injection. I changed into an atheros WiFi card and it worked. Thank you again for all the answers. – Spider Jan 29 '16 at 13:43

0 Answers0