libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
radiotap.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 Intel Deutschland GmbH
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16#ifndef __RADIOTAP_H
17#define __RADIOTAP_H
19#if defined(__APPLE__)
20#include <libkern/OSByteOrder.h>
21#define bswap_16 OSSwapInt16
22#define bswap_32 OSSwapInt32
23#define bswap_64 OSSwapInt64
24#include <machine/endian.h>
25#ifndef le16toh
26#define le16toh(x) OSSwapLittleToHostInt16(x)
27#endif
28#ifndef le32toh
29#define le32toh(x) OSSwapLittleToHostInt32(x)
30#endif
31#ifndef le64toh
32#define le64toh(x) OSSwapLittleToHostInt64(x)
33#endif
34#endif
35
36#include <stdint.h>
37
45 uint8_t it_version;
46
50 uint8_t it_pad;
51
55 uint16_t it_len;
56
60 uint32_t it_present;
61} __attribute__((__packed__));
62
63/* version is always 0 */
64#define PKTHDR_RADIOTAP_VERSION 0
65
67
68/* see the radiotap website for the descriptions */
88 /* 18 is XChannel, but it's not defined yet */
93
94 /* valid in every it_present bitmap, even vendor namespaces */
98};
99
100/* for IEEE80211_RADIOTAP_FLAGS */
109};
110
111/* for IEEE80211_RADIOTAP_CHANNEL */
120};
121
122/* for IEEE80211_RADIOTAP_RX_FLAGS */
125};
126
127/* for IEEE80211_RADIOTAP_TX_FLAGS */
133};
134
135/* for IEEE80211_RADIOTAP_MCS "have" flags */
143};
144
151
160};
161
162/* for IEEE80211_RADIOTAP_AMPDU_STATUS */
170};
171
172/* for IEEE80211_RADIOTAP_VHT */
183};
184
192};
193
199};
200
201/* for IEEE80211_RADIOTAP_TIMESTAMP */
213};
214
219};
220
221#endif /* __RADIOTAP_H */
ieee80211_radiotap_mcs_have
Definition: radiotap.h:136
@ IEEE80211_RADIOTAP_MCS_HAVE_MCS
Definition: radiotap.h:138
@ IEEE80211_RADIOTAP_MCS_HAVE_FMT
Definition: radiotap.h:140
@ IEEE80211_RADIOTAP_MCS_HAVE_STBC
Definition: radiotap.h:142
@ IEEE80211_RADIOTAP_MCS_HAVE_GI
Definition: radiotap.h:139
@ IEEE80211_RADIOTAP_MCS_HAVE_BW
Definition: radiotap.h:137
@ IEEE80211_RADIOTAP_MCS_HAVE_FEC
Definition: radiotap.h:141
ieee80211_radiotap_timestamp_unit_spos
Definition: radiotap.h:202
@ IEEE80211_RADIOTAP_TIMESTAMP_UNIT_NS
Definition: radiotap.h:206
@ IEEE80211_RADIOTAP_TIMESTAMP_UNIT_US
Definition: radiotap.h:205
@ IEEE80211_RADIOTAP_TIMESTAMP_SPOS_EO_MPDU
Definition: radiotap.h:211
@ IEEE80211_RADIOTAP_TIMESTAMP_UNIT_MASK
Definition: radiotap.h:203
@ IEEE80211_RADIOTAP_TIMESTAMP_UNIT_MS
Definition: radiotap.h:204
@ IEEE80211_RADIOTAP_TIMESTAMP_SPOS_EO_PPDU
Definition: radiotap.h:210
@ IEEE80211_RADIOTAP_TIMESTAMP_SPOS_BEGIN_MDPU
Definition: radiotap.h:208
@ IEEE80211_RADIOTAP_TIMESTAMP_SPOS_MASK
Definition: radiotap.h:207
@ IEEE80211_RADIOTAP_TIMESTAMP_SPOS_PLCP_SIG_ACQ
Definition: radiotap.h:209
@ IEEE80211_RADIOTAP_TIMESTAMP_SPOS_UNKNOWN
Definition: radiotap.h:212
ieee80211_radiotap_vht_coding
Definition: radiotap.h:194
@ IEEE80211_RADIOTAP_CODING_LDPC_USER2
Definition: radiotap.h:197
@ IEEE80211_RADIOTAP_CODING_LDPC_USER1
Definition: radiotap.h:196
@ IEEE80211_RADIOTAP_CODING_LDPC_USER0
Definition: radiotap.h:195
@ IEEE80211_RADIOTAP_CODING_LDPC_USER3
Definition: radiotap.h:198
ieee80211_radiotap_vht_known
Definition: radiotap.h:173
@ IEEE80211_RADIOTAP_VHT_KNOWN_LDPC_EXTRA_OFDM_SYM
Definition: radiotap.h:178
@ IEEE80211_RADIOTAP_VHT_KNOWN_BEAMFORMED
Definition: radiotap.h:179
@ IEEE80211_RADIOTAP_VHT_KNOWN_PARTIAL_AID
Definition: radiotap.h:182
@ IEEE80211_RADIOTAP_VHT_KNOWN_GI
Definition: radiotap.h:176
@ IEEE80211_RADIOTAP_VHT_KNOWN_TXOP_PS_NA
Definition: radiotap.h:175
@ IEEE80211_RADIOTAP_VHT_KNOWN_GROUP_ID
Definition: radiotap.h:181
@ IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH
Definition: radiotap.h:180
@ IEEE80211_RADIOTAP_VHT_KNOWN_STBC
Definition: radiotap.h:174
@ IEEE80211_RADIOTAP_VHT_KNOWN_SGI_NSYM_DIS
Definition: radiotap.h:177
const struct ieee80211_radiotap_namespace radiotap_ns
Definition: radiotap.c:135
ieee80211_radiotap_presence
Definition: radiotap.h:69
@ IEEE80211_RADIOTAP_DB_TX_ATTENUATION
Definition: radiotap.h:79
@ IEEE80211_RADIOTAP_EXT
Definition: radiotap.h:97
@ IEEE80211_RADIOTAP_DATA_RETRIES
Definition: radiotap.h:87
@ IEEE80211_RADIOTAP_DBM_TX_POWER
Definition: radiotap.h:80
@ IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE
Definition: radiotap.h:95
@ IEEE80211_RADIOTAP_AMPDU_STATUS
Definition: radiotap.h:90
@ IEEE80211_RADIOTAP_TX_FLAGS
Definition: radiotap.h:85
@ IEEE80211_RADIOTAP_RTS_RETRIES
Definition: radiotap.h:86
@ IEEE80211_RADIOTAP_MCS
Definition: radiotap.h:89
@ IEEE80211_RADIOTAP_LOCK_QUALITY
Definition: radiotap.h:77
@ IEEE80211_RADIOTAP_VENDOR_NAMESPACE
Definition: radiotap.h:96
@ IEEE80211_RADIOTAP_CHANNEL
Definition: radiotap.h:73
@ IEEE80211_RADIOTAP_VHT
Definition: radiotap.h:91
@ IEEE80211_RADIOTAP_FLAGS
Definition: radiotap.h:71
@ IEEE80211_RADIOTAP_TX_ATTENUATION
Definition: radiotap.h:78
@ IEEE80211_RADIOTAP_DB_ANTNOISE
Definition: radiotap.h:83
@ IEEE80211_RADIOTAP_DB_ANTSIGNAL
Definition: radiotap.h:82
@ IEEE80211_RADIOTAP_TSFT
Definition: radiotap.h:70
@ IEEE80211_RADIOTAP_TIMESTAMP
Definition: radiotap.h:92
@ IEEE80211_RADIOTAP_RATE
Definition: radiotap.h:72
@ IEEE80211_RADIOTAP_FHSS
Definition: radiotap.h:74
@ IEEE80211_RADIOTAP_DBM_ANTNOISE
Definition: radiotap.h:76
@ IEEE80211_RADIOTAP_ANTENNA
Definition: radiotap.h:81
@ IEEE80211_RADIOTAP_DBM_ANTSIGNAL
Definition: radiotap.h:75
@ IEEE80211_RADIOTAP_RX_FLAGS
Definition: radiotap.h:84
ieee80211_radiotap_flags
Definition: radiotap.h:101
@ IEEE80211_RADIOTAP_F_CFP
Definition: radiotap.h:102
@ IEEE80211_RADIOTAP_F_SHORTPRE
Definition: radiotap.h:103
@ IEEE80211_RADIOTAP_F_FRAG
Definition: radiotap.h:105
@ IEEE80211_RADIOTAP_F_WEP
Definition: radiotap.h:104
@ IEEE80211_RADIOTAP_F_DATAPAD
Definition: radiotap.h:107
@ IEEE80211_RADIOTAP_F_BADFCS
Definition: radiotap.h:108
@ IEEE80211_RADIOTAP_F_FCS
Definition: radiotap.h:106
ieee80211_radiotap_mcs_flags
Definition: radiotap.h:145
@ IEEE80211_RADIOTAP_MCS_STBC_MASK
Definition: radiotap.h:155
@ IEEE80211_RADIOTAP_MCS_SGI
Definition: radiotap.h:152
@ IEEE80211_RADIOTAP_MCS_STBC_SHIFT
Definition: radiotap.h:159
@ IEEE80211_RADIOTAP_MCS_BW_20L
Definition: radiotap.h:149
@ IEEE80211_RADIOTAP_MCS_STBC_3
Definition: radiotap.h:158
@ IEEE80211_RADIOTAP_MCS_FMT_GF
Definition: radiotap.h:153
@ IEEE80211_RADIOTAP_MCS_BW_20
Definition: radiotap.h:147
@ IEEE80211_RADIOTAP_MCS_BW_20U
Definition: radiotap.h:150
@ IEEE80211_RADIOTAP_MCS_FEC_LDPC
Definition: radiotap.h:154
@ IEEE80211_RADIOTAP_MCS_BW_MASK
Definition: radiotap.h:146
@ IEEE80211_RADIOTAP_MCS_STBC_2
Definition: radiotap.h:157
@ IEEE80211_RADIOTAP_MCS_BW_40
Definition: radiotap.h:148
@ IEEE80211_RADIOTAP_MCS_STBC_1
Definition: radiotap.h:156
ieee80211_radiotap_tx_flags
Definition: radiotap.h:128
@ IEEE80211_RADIOTAP_F_TX_FAIL
Definition: radiotap.h:129
@ IEEE80211_RADIOTAP_F_TX_CTS
Definition: radiotap.h:130
@ IEEE80211_RADIOTAP_F_TX_RTS
Definition: radiotap.h:131
@ IEEE80211_RADIOTAP_F_TX_NOACK
Definition: radiotap.h:132
ieee80211_radiotap_channel_flags
Definition: radiotap.h:112
@ IEEE80211_CHAN_HALF
Definition: radiotap.h:118
@ IEEE80211_CHAN_5GHZ
Definition: radiotap.h:116
@ IEEE80211_CHAN_DYN
Definition: radiotap.h:117
@ IEEE80211_CHAN_OFDM
Definition: radiotap.h:114
@ IEEE80211_CHAN_2GHZ
Definition: radiotap.h:115
@ IEEE80211_CHAN_QUARTER
Definition: radiotap.h:119
@ IEEE80211_CHAN_CCK
Definition: radiotap.h:113
ieee80211_radiotap_vht_flags
Definition: radiotap.h:185
@ IEEE80211_RADIOTAP_VHT_FLAG_SGI
Definition: radiotap.h:188
@ IEEE80211_RADIOTAP_VHT_FLAG_BEAMFORMED
Definition: radiotap.h:191
@ IEEE80211_RADIOTAP_VHT_FLAG_STBC
Definition: radiotap.h:186
@ IEEE80211_RADIOTAP_VHT_FLAG_TXOP_PS_NA
Definition: radiotap.h:187
@ IEEE80211_RADIOTAP_VHT_FLAG_SGI_NSYM_M10_9
Definition: radiotap.h:189
@ IEEE80211_RADIOTAP_VHT_FLAG_LDPC_EXTRA_OFDM_SYM
Definition: radiotap.h:190
ieee80211_radiotap_ampdu_flags
Definition: radiotap.h:163
@ IEEE80211_RADIOTAP_AMPDU_IS_LAST
Definition: radiotap.h:167
@ IEEE80211_RADIOTAP_AMPDU_IS_ZEROLEN
Definition: radiotap.h:165
@ IEEE80211_RADIOTAP_AMPDU_LAST_KNOWN
Definition: radiotap.h:166
@ IEEE80211_RADIOTAP_AMPDU_DELIM_CRC_KNOWN
Definition: radiotap.h:169
@ IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN
Definition: radiotap.h:164
@ IEEE80211_RADIOTAP_AMPDU_DELIM_CRC_ERR
Definition: radiotap.h:168
ieee80211_radiotap_timestamp_flags
Definition: radiotap.h:215
@ IEEE80211_RADIOTAP_TIMESTAMP_FLAG_ACCURACY
Definition: radiotap.h:218
@ IEEE80211_RADIOTAP_TIMESTAMP_FLAG_64BIT
Definition: radiotap.h:216
@ IEEE80211_RADIOTAP_TIMESTAMP_FLAG_32BIT
Definition: radiotap.h:217
enum ieee80211_radiotap_presence __attribute__
ieee80211_radiotap_rx_flags
Definition: radiotap.h:123
@ IEEE80211_RADIOTAP_F_RX_BADPLCP
Definition: radiotap.h:124
struct ieee82011_radiotap_header - base radiotap header
Definition: radiotap.h:41
uint16_t it_len
@it_len: overall radiotap header length
Definition: radiotap.h:55
uint8_t it_version
@it_version: radiotap version, always 0
Definition: radiotap.h:45
uint8_t it_pad
@it_pad: padding (or alignment)
Definition: radiotap.h:50
uint32_t it_present
@it_present: (first) present word
Definition: radiotap.h:60