2

我正在尝试使用 pcap_sendpacket 和以下 radiotap 发送 802.11 帧:

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
};

我还使用了 include/linux/ieee80211.h 中定义的 802.11 标头:

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));

使用 Wireshark 捕获帧时,它看起来像一个以太网帧,其中 radiotap 标头被称为以太网标头。

我在某个地方犯了错误吗?问候

4

0 回答 0