A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
radiotap-header.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 CTTC
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Nicola Baldo <nbaldo@cttc.es>
7 * Sébastien Deronne <sebastien.deronne@gmail.com>
8 */
9
10#ifndef RADIOTAP_HEADER_H
11#define RADIOTAP_HEADER_H
12
13#include "ns3/header.h"
14
15#include <array>
16#include <optional>
17#include <vector>
18
19namespace ns3
20{
21
22/**
23 * @brief Radiotap header implementation
24 *
25 * Radiotap is a de facto standard for 802.11 frame injection and reception.
26 * The radiotap header format is a mechanism to supply additional information
27 * about frames, from the driver to userspace applications such as libpcap, and
28 * from a userspace application to the driver for transmission.
29 */
30class RadiotapHeader : public Header
31{
32 public:
34 /**
35 * @brief Get the type ID.
36 * @returns the object TypeId
37 */
38 static TypeId GetTypeId();
39 TypeId GetInstanceTypeId() const override;
40
41 /**
42 * This method is used by Packet::AddHeader to store the header into the byte
43 * buffer of a packet. This method returns the number of bytes which are
44 * needed to store the header data during a Serialize.
45 *
46 * @returns The expected size of the header.
47 */
48 uint32_t GetSerializedSize() const override;
49
50 /**
51 * This method is used by Packet::AddHeader to store the header into the byte
52 * buffer of a packet. The data written is expected to match bit-for-bit the
53 * representation of this header in a real network.
54 *
55 * @param start An iterator which points to where the header should
56 * be written.
57 */
58 void Serialize(Buffer::Iterator start) const override;
59
60 /**
61 * This method is used by Packet::RemoveHeader to re-create a header from the
62 * byte buffer of a packet. The data read is expected to match bit-for-bit
63 * the representation of this header in real networks.
64 *
65 * @param start An iterator which points to where the header should be read.
66 * @returns The number of bytes read.
67 */
69
70 /**
71 * This method is used by Packet::Print to print the content of the header as
72 * ascii data to a C++ output stream. Although the header is free to format
73 * its output as it wishes, it is recommended to follow a few rules to integrate
74 * with the packet pretty printer: start with flags, small field
75 * values located between a pair of parens. Values should be separated
76 * by whitespace. Follow the parens with the important fields,
77 * separated by whitespace.
78 *
79 * eg: (field1 val1 field2 val2 field3 val3) field4 val4 field5 val5
80 *
81 * @param os The output stream
82 */
83 void Print(std::ostream& os) const override;
84
85 /**
86 * @brief Set the Time Synchronization Function Timer (TSFT) value. Valid for
87 * received frames only.
88 *
89 * @param tsft Value in microseconds of the MAC's 64-bit 802.11 Time
90 * Synchronization Function timer when the first bit of the MPDU
91 * arrived at the MAC.
92 */
93 void SetTsft(uint64_t tsft);
94
95 /**
96 * @brief Frame flags.
97 */
98 enum FrameFlag : uint8_t
99 {
100 FRAME_FLAG_NONE = 0x00, /**< No flags set */
101 FRAME_FLAG_CFP = 0x01, /**< Frame sent/received during CFP */
102 FRAME_FLAG_SHORT_PREAMBLE = 0x02, /**< Frame sent/received with short preamble */
103 FRAME_FLAG_WEP = 0x04, /**< Frame sent/received with WEP encryption */
104 FRAME_FLAG_FRAGMENTED = 0x08, /**< Frame sent/received with fragmentation */
105 FRAME_FLAG_FCS_INCLUDED = 0x10, /**< Frame includes FCS */
107 0x20, /**< Frame has padding between 802.11 header and payload (to 32-bit boundary) */
108 FRAME_FLAG_BAD_FCS = 0x40, /**< Frame failed FCS check */
109 FRAME_FLAG_SHORT_GUARD = 0x80 /**< Frame used short guard interval (HT) */
110 };
111
112 /**
113 * @brief Set the frame flags of the transmitted or received frame.
114 * @param flags flags to set.
115 */
116 void SetFrameFlags(uint8_t flags);
117
118 /**
119 * @brief Set the transmit/receive channel frequency in units of megahertz
120 * @param rate the transmit/receive channel frequency in units of megahertz.
121 */
122 void SetRate(uint8_t rate);
123
124 /**
125 * @brief Channel flags.
126 */
127 enum ChannelFlags : uint16_t
128 {
129 CHANNEL_FLAG_NONE = 0x0000, /**< No flags set */
130 CHANNEL_FLAG_TURBO = 0x0010, /**< Turbo Channel */
131 CHANNEL_FLAG_CCK = 0x0020, /**< CCK channel */
132 CHANNEL_FLAG_OFDM = 0x0040, /**< OFDM channel */
133 CHANNEL_FLAG_SPECTRUM_2GHZ = 0x0080, /**< 2 GHz spectrum channel */
134 CHANNEL_FLAG_SPECTRUM_5GHZ = 0x0100, /**< 5 GHz spectrum channel */
135 CHANNEL_FLAG_PASSIVE = 0x0200, /**< Only passive scan allowed */
136 CHANNEL_FLAG_DYNAMIC = 0x0400, /**< Dynamic CCK-OFDM channel */
137 CHANNEL_FLAG_GFSK = 0x0800 /**< GFSK channel (FHSS PHY) */
138 };
139
140 /**
141 * structure that contains the subfields of the Channel field.
142 */
144 {
145 uint16_t frequency{0}; //!< Tx/Rx frequency in MHz
146 uint16_t flags{CHANNEL_FLAG_NONE}; //!< flags field (@see ChannelFlags)
147 };
148
149 /**
150 * @brief Set the subfields of the Channel field
151 *
152 * @param channelFields The subfields of the Channel field.
153 */
154 void SetChannelFields(const ChannelFields& channelFields);
155
156 /**
157 * @brief Set the RF signal power at the antenna as a decibel difference
158 * from an arbitrary, fixed reference.
159 *
160 * @param signal The RF signal power at the antenna as a decibel difference
161 * from an arbitrary, fixed reference;
162 */
163 void SetAntennaSignalPower(double signal);
164
165 /**
166 * @brief Set the RF noise power at the antenna as a decibel difference
167 * from an arbitrary, fixed reference.
168 *
169 * @param noise The RF noise power at the antenna as a decibel difference
170 * from an arbitrary, fixed reference.
171 */
172 void SetAntennaNoisePower(double noise);
173
174 /**
175 * @brief MCS known bits.
176 */
177 enum McsKnown : uint8_t
178 {
179 MCS_KNOWN_NONE = 0x00, /**< No flags set */
180 MCS_KNOWN_BANDWIDTH = 0x01, /**< Bandwidth */
181 MCS_KNOWN_INDEX = 0x02, /**< MCS index known */
182 MCS_KNOWN_GUARD_INTERVAL = 0x04, /**< Guard interval */
183 MCS_KNOWN_HT_FORMAT = 0x08, /**< HT format */
184 MCS_KNOWN_FEC_TYPE = 0x10, /**< FEC type */
185 MCS_KNOWN_STBC = 0x20, /**< STBC known */
186 MCS_KNOWN_NESS = 0x40, /**< Ness known (Number of extension spatial streams) */
188 0x80, /**< Ness data - bit 1 (MSB) of Number of extension spatial streams */
189 };
190
191 /**
192 * @brief MCS flags.
193 */
194 enum McsFlags : uint8_t
195 {
197 0x00, /**< Default: 20 MHz, long guard interval, mixed HT format and BCC FEC type */
198 MCS_FLAGS_BANDWIDTH_40 = 0x01, /**< 40 MHz */
199 MCS_FLAGS_BANDWIDTH_20L = 0x02, /**< 20L (20 MHz in lower half of 40 MHz channel) */
200 MCS_FLAGS_BANDWIDTH_20U = 0x03, /**< 20U (20 MHz in upper half of 40 MHz channel) */
201 MCS_FLAGS_GUARD_INTERVAL = 0x04, /**< Short guard interval */
202 MCS_FLAGS_HT_GREENFIELD = 0x08, /**< Greenfield HT format */
203 MCS_FLAGS_FEC_TYPE = 0x10, /**< LDPC FEC type */
204 MCS_FLAGS_STBC_STREAMS = 0x60, /**< STBC enabled */
206 0x80, /**< Ness - bit 0 (LSB) of Number of extension spatial streams */
207 };
208
209 /**
210 * structure that contains the subfields of the MCS field.
211 */
213 {
214 uint8_t known{MCS_KNOWN_NONE}; //!< known flags
215 uint8_t flags{MCS_FLAGS_NONE}; //!< flags field
216 uint8_t mcs{0}; //!< MCS index value
217 };
218
219 /**
220 * @brief Set the subfields of the MCS field
221 *
222 * @param mcsFields The subfields of the MCS field.
223 */
224 void SetMcsFields(const McsFields& mcsFields);
225
226 /**
227 * @brief A-MPDU status flags.
228 */
229 enum AmpduFlags : uint8_t
230 {
231 A_MPDU_STATUS_NONE = 0x00, /**< No flags set */
232 A_MPDU_STATUS_REPORT_ZERO_LENGTH = 0x01, /**< Driver reports 0-length subframes */
234 0x02, /**< Frame is 0-length subframe (valid only if 0x0001 is set) */
236 0x04, /**< Last subframe is known (should be set for all subframes in an A-MPDU) */
237 A_MPDU_STATUS_LAST = 0x08, /**< This frame is the last subframe */
238 A_MPDU_STATUS_DELIMITER_CRC_ERROR = 0x10, /**< Delimiter CRC error */
240 0x20 /**< Delimiter CRC value known: the delimiter CRC value field is valid */
241 };
242
243 /**
244 * structure that contains the subfields of the A-MPDU status field.
245 */
247 {
249 0}; //!< A-MPDU reference number to identify all subframes belonging to the same A-MPDU
250 uint16_t flags{A_MPDU_STATUS_NONE}; //!< flags field
251 uint8_t crc{1}; //!< CRC field
252 uint8_t reserved{0}; //!< Reserved field
253 };
254
255 /**
256 * @brief Set the subfields of the A-MPDU status field
257 *
258 * @param ampduStatusFields The subfields of the A-MPDU status field.
259 */
260 void SetAmpduStatus(const AmpduStatusFields& ampduStatusFields);
261
262 /**
263 * @brief VHT known bits.
264 */
265 enum VhtKnown : uint16_t
266 {
267 VHT_KNOWN_NONE = 0x0000, /**< No flags set */
268 VHT_KNOWN_STBC = 0x0001, /**< Space-time block coding (1 if all spatial streams of all users
269 have STBC, 0 otherwise). */
270 VHT_KNOWN_TXOP_PS_NOT_ALLOWED = 0x0002, /**< TXOP_PS_NOT_ALLOWED known */
271 VHT_KNOWN_GUARD_INTERVAL = 0x0004, /**< Guard interval */
272 VHT_KNOWN_SHORT_GI_NSYM_DISAMBIGUATION = 0x0008, /**< Short GI NSYM disambiguation known */
273 VHT_KNOWN_LDPC_EXTRA_OFDM_SYMBOL = 0x0010, /**< LDPC extra OFDM symbol known */
274 VHT_KNOWN_BEAMFORMED = 0x0020, /**< Beamformed known/applicable (this flag should be set to
275 zero for MU PPDUs). */
276 VHT_KNOWN_BANDWIDTH = 0x0040, /**< Bandwidth known */
277 VHT_KNOWN_GROUP_ID = 0x0080, /**< Group ID known */
278 VHT_KNOWN_PARTIAL_AID = 0x0100, /**< Partial AID known/applicable */
279 };
280
281 /**
282 * @brief VHT flags.
283 */
284 enum VhtFlags : uint8_t
285 {
286 VHT_FLAGS_NONE = 0x00, /**< No flags set */
288 0x01, /**< Set if all spatial streams of all users have space-time block coding */
290 0x02, /**< Set if STAs may not doze during TXOP (valid only for AP transmitters). */
291 VHT_FLAGS_GUARD_INTERVAL = 0x04, /**< Short guard interval */
293 0x08, /**< Set if NSYM mod 10 = 9 (valid only if short GI is used).*/
295 0x10, /**< Set if one or more users are using LDPC and the encoding process resulted in
296 extra OFDM symbol(s) */
297 VHT_FLAGS_BEAMFORMED = 0x20, /**< Set if beamforming is used (valid for SU PPDUs only). */
298 };
299
300 /**
301 * structure that contains the subfields of the VHT field.
302 */
304 {
305 uint16_t known{VHT_KNOWN_NONE}; //!< known flags field
306 uint8_t flags{VHT_FLAGS_NONE}; //!< flags field
307 uint8_t bandwidth{0}; //!< bandwidth field
308 std::array<uint8_t, 4> mcsNss{}; //!< mcs_nss field
309 uint8_t coding{0}; //!< coding field
310 uint8_t groupId{0}; //!< group_id field
311 uint16_t partialAid{0}; //!< partial_aid field
312 };
313
314 /**
315 * @brief Set the subfields of the VHT field
316 *
317 * @param vhtFields The subfields of the VHT field.
318 */
319 void SetVhtFields(const VhtFields& vhtFields);
320
321 /**
322 * @brief bits of the HE data fields.
323 */
324 enum HeData : uint16_t
325 {
326 /* Data 1 */
327 HE_DATA1_FORMAT_EXT_SU = 0x0001, /**< HE EXT SU PPDU format */
328 HE_DATA1_FORMAT_MU = 0x0002, /**< HE MU PPDU format */
329 HE_DATA1_FORMAT_TRIG = 0x0003, /**< HE TRIG PPDU format */
330 HE_DATA1_BSS_COLOR_KNOWN = 0x0004, /**< BSS Color known */
331 HE_DATA1_BEAM_CHANGE_KNOWN = 0x0008, /**< Beam Change known */
332 HE_DATA1_UL_DL_KNOWN = 0x0010, /**< UL/DL known */
333 HE_DATA1_DATA_MCS_KNOWN = 0x0020, /**< data MCS known */
334 HE_DATA1_DATA_DCM_KNOWN = 0x0040, /**< data DCM known */
335 HE_DATA1_CODING_KNOWN = 0x0080, /**< Coding known */
336 HE_DATA1_LDPC_XSYMSEG_KNOWN = 0x0100, /**< LDPC extra symbol segment known */
337 HE_DATA1_STBC_KNOWN = 0x0200, /**< STBC known */
339 0x0400, /**< Spatial Reuse known (Spatial Reuse 1 for HE TRIG PPDU format) */
340 HE_DATA1_SPTL_REUSE2_KNOWN = 0x0800, /**< Spatial Reuse 2 known (HE TRIG PPDU format),
341 STA-ID known (HE MU PPDU format) */
342 HE_DATA1_SPTL_REUSE3_KNOWN = 0x1000, /**< Spatial Reuse 3 known (HE TRIG PPDU format) */
343 HE_DATA1_SPTL_REUSE4_KNOWN = 0x2000, /**< Spatial Reuse 4 known (HE TRIG PPDU format) */
344 HE_DATA1_BW_RU_ALLOC_KNOWN = 0x4000, /**< data BW/RU allocation known */
345 HE_DATA1_DOPPLER_KNOWN = 0x8000, /**< Doppler known */
346 /* Data 2 */
347 HE_DATA2_PRISEC_80_KNOWN = 0x0001, /**< pri/sec 80 MHz known */
348 HE_DATA2_GI_KNOWN = 0x0002, /**< GI known */
349 HE_DATA2_NUM_LTF_SYMS_KNOWN = 0x0004, /**< number of LTF symbols known */
350 HE_DATA2_PRE_FEC_PAD_KNOWN = 0x0008, /**< Pre-FEC Padding Factor known */
351 HE_DATA2_TXBF_KNOWN = 0x0010, /**< TxBF known */
352 HE_DATA2_PE_DISAMBIG_KNOWN = 0x0020, /**< PE Disambiguity known */
353 HE_DATA2_TXOP_KNOWN = 0x0040, /**< TXOP known */
354 HE_DATA2_MIDAMBLE_KNOWN = 0x0080, /**< midamble periodicity known */
355 HE_DATA2_RU_OFFSET = 0x3f00, /**< RU allocation offset */
356 HE_DATA2_RU_OFFSET_KNOWN = 0x4000, /**< RU allocation offset known */
357 HE_DATA2_PRISEC_80_SEC = 0x8000, /**< pri/sec 80 MHz */
358 /* Data 3 */
367 /* Data 4 */
374 /* Data 5 */
375 HE_DATA5_DATA_BW_RU_ALLOC_40MHZ = 0x0001, /**< 40 MHz data Bandwidth */
376 HE_DATA5_DATA_BW_RU_ALLOC_80MHZ = 0x0002, /**< 80 MHz data Bandwidth */
377 HE_DATA5_DATA_BW_RU_ALLOC_160MHZ = 0x0003, /**< 160 MHz data Bandwidth */
378 HE_DATA5_DATA_BW_RU_ALLOC_26T = 0x0004, /**< 26-tone RU allocation */
379 HE_DATA5_DATA_BW_RU_ALLOC_52T = 0x0005, /**< 52-tone RU allocation */
380 HE_DATA5_DATA_BW_RU_ALLOC_106T = 0x0006, /**< 106-tone RU allocation */
381 HE_DATA5_DATA_BW_RU_ALLOC_242T = 0x0007, /**< 242-tone RU allocation */
382 HE_DATA5_DATA_BW_RU_ALLOC_484T = 0x0008, /**< 484-tone RU allocation */
383 HE_DATA5_DATA_BW_RU_ALLOC_996T = 0x0009, /**< 996-tone RU allocation */
384 HE_DATA5_DATA_BW_RU_ALLOC_2x996T = 0x000a, /**< 2x996-tone RU allocation */
385 HE_DATA5_GI_1_6 = 0x0010, /**< 1.6us GI */
386 HE_DATA5_GI_3_2 = 0x0020, /**< 3.2us GI */
387 HE_DATA5_LTF_SYM_SIZE = 0x00c0, /**< LTF symbol size */
388 HE_DATA5_NUM_LTF_SYMS = 0x0700, /**< number of LTF symbols */
389 HE_DATA5_PRE_FEC_PAD = 0x3000, /**< Pre-FEC Padding Factor */
390 HE_DATA5_TXBF = 0x4000, /**< TxBF */
391 HE_DATA5_PE_DISAMBIG = 0x8000, /**< PE Disambiguity */
392 };
393
394 /**
395 * structure that contains the subfields of the HE field.
396 */
397 struct HeFields
398 {
399 uint16_t data1{0}; //!< data1 field
400 uint16_t data2{0}; //!< data2 field
401 uint16_t data3{0}; //!< data3 field
402 uint16_t data4{0}; //!< data4 field
403 uint16_t data5{0}; //!< data5 field
404 uint16_t data6{0}; //!< data6 field
405 };
406
407 /**
408 * @brief Set the subfields of the HE field
409 *
410 * @param heFields The subfields of the HE field.
411 */
412 void SetHeFields(const HeFields& heFields);
413
414 /**
415 * @brief HE MU flags1.
416 */
417 enum HeMuFlags1 : uint16_t
418 {
419 HE_MU_FLAGS1_SIGB_MCS = 0x000f, //!< SIG-B MCS (from SIG-A)
420 HE_MU_FLAGS1_SIGB_MCS_KNOWN = 0x0010, //!< SIG-B MCS known
421 HE_MU_FLAGS1_SIGB_DCM = 0x0020, //!< SIG-B DCM (from SIG-A)
422 HE_MU_FLAGS1_SIGB_DCM_KNOWN = 0x0040, //!< SIG-B DCM known
423 HE_MU_FLAGS1_CH2_CENTER_26T_RU_KNOWN = 0x0080, //!< (Channel 2) Center 26-tone RU bit known
424 HE_MU_FLAGS1_CH1_RUS_KNOWN = 0x0100, //!< Channel 1 RUs known (which depends on BW)
425 HE_MU_FLAGS1_CH2_RUS_KNOWN = 0x0200, //!< Channel 2 RUs known (which depends on BW)
426 HE_MU_FLAGS1_CH1_CENTER_26T_RU_KNOWN = 0x1000, //!< (Channel 1) Center 26-tone RU bit known
427 HE_MU_FLAGS1_CH1_CENTER_26T_RU = 0x2000, //!< (Channel 1) Center 26-tone RU value
428 HE_MU_FLAGS1_SIGB_COMPRESSION_KNOWN = 0x4000, //!< SIG-B Compression known
429 HE_MU_FLAGS1_NUM_SIGB_SYMBOLS_KNOWN = 0x8000, //!< # of HE-SIG-B Symbols/MU-MIMO Users known
430 };
431
432 /**
433 * @brief HE MU flags2.
434 */
435 enum HeMuFlags2 : uint16_t
436 {
437 HE_MU_FLAGS2_BW_FROM_SIGA = 0x0003, /**< Bandwidth from Bandwidth field in HE-SIG-A */
439 0x0004, /**< Bandwidth from Bandwidth field in HE-SIG-A known */
440 HE_MU_FLAGS2_SIGB_COMPRESSION_FROM_SIGA = 0x0008, /**< SIG-B compression from SIG-A */
442 0x00f0, /**< # of HE-SIG-B Symbols - 1 or # of MU-MIMO Users - 1 from SIG-A */
444 0x0300, /**< Preamble puncturing from Bandwidth field in HE-SIG-A */
446 0x0400, /**< Preamble puncturing from Bandwidth field in HE-SIG-A known */
447 HE_MU_FLAGS2_CH2_CENTER_26T_RU = 0x0800, /**< (Channel 2) Center 26-tone RU value */
448 };
449
450 /**
451 * structure that contains the subfields of the HE-MU field.
452 */
454 {
455 uint16_t flags1{0}; //!< flags1 field
456 uint16_t flags2{0}; //!< flags2 field
457 std::array<uint8_t, 4> ruChannel1{}; //!< RU_channel1 field
458 std::array<uint8_t, 4> ruChannel2{}; //!< RU_channel2 field
459 };
460
461 /**
462 * @brief Set the subfields of the HE-MU field
463 *
464 * @param heMuFields The subfields of the HE-MU field.
465 */
466 void SetHeMuFields(const HeMuFields& heMuFields);
467
468 /**
469 * @brief HE MU per_user_known.
470 */
471 enum HeMuPerUserKnown : uint8_t
472 {
473 HE_MU_PER_USER_POSITION_KNOWN = 0x01, //!< User field position known
474 HE_MU_PER_USER_STA_ID_KNOWN = 0x02, //!< STA-ID known
475 HE_MU_PER_USER_NSTS_KNOWN = 0x04, //!< NSTS known
476 HE_MU_PER_USER_TX_BF_KNOWN = 0x08, //!< Tx Beamforming known
477 HE_MU_PER_USER_SPATIAL_CONFIGURATION_KNOWN = 0x10, //!< Spatial Configuration known
478 HE_MU_PER_USER_MCS_KNOWN = 0x20, //!< MCS known
479 HE_MU_PER_USER_DCM_KNOWN = 0x40, //!< DCM known
480 HE_MU_PER_USER_CODING_KNOWN = 0x80, //!< Coding known
481 };
482
483 /**
484 * structure that contains the subfields of the HE-MU-other-user field.
485 */
487 {
488 uint16_t perUser1{0}; //!< per_user_1 field
489 uint16_t perUser2{0}; //!< per_user_2 field
490 uint8_t perUserPosition{0}; //!< per_user_position field
491 uint8_t perUserKnown{0}; //!< per_user_known field
492 };
493
494 /**
495 * @brief Set the subfields of the HE-MU-other-user field
496 *
497 * @param heMuOtherUserFields The subfields of the HE-MU-other-user field.
498 */
499 void SetHeMuOtherUserFields(const HeMuOtherUserFields& heMuOtherUserFields);
500
501 /**
502 * structure that contains the subfields of the TLV fields.
503 */
505 {
506 uint16_t type{0}; //!< type field.
507 uint16_t length{0}; //!< length field.
508 };
509
510 /**
511 * structure that contains the subfields of the U-SIG field.
512 */
514 {
515 uint32_t common{0}; //!< common field.
516 uint32_t value{0}; //!< value field.
517 uint32_t mask{0}; //!< mask field.
518 };
519
520 /**
521 * @brief U-SIG common subfield.
522 */
539
540 /**
541 * @brief Possible BW values in U-SIG common subfield.
542 */
552
553 /**
554 * @brief EHT MU PPDU U-SIG contents.
555 */
557 {
558 /* MU-USIG-1 */
561 /* MU-USIG-2 */
570 };
571
572 /**
573 * @brief EHT TB PPDU U-SIG contents.
574 */
576 {
577 /* TB-USIG-1 */
579 /* TB-USIG-2 */
587 };
588
589 /**
590 * @brief Set the subfields of the U-SIG field
591 *
592 * @param usigFields The subfields of the U-SIG field.
593 */
594 void SetUsigFields(const UsigFields& usigFields);
595
596 /**
597 * structure that contains the subfields of the EHT field.
598 */
600 {
601 uint32_t known{0}; //!< known field.
602 std::array<uint32_t, 9> data{}; //!< data fields.
603 std::vector<uint32_t> userInfo{}; //!< user info fields.
604 };
605
606 /**
607 * @brief EHT known subfield.
608 */
633
634 /**
635 * @brief EHT data subfield.
636 */
638 {
639 /* Data 0 */
641 EHT_DATA0_GI = 0x00000180,
642 EHT_DATA0_LTF = 0x00000600,
643 EHT_DATA0_EHT_LTF = 0x00003800,
649 EHT_DATA0_CRC1_O = 0x03c00000,
650 EHT_DATA0_TAIL1_O = 0xfc000000,
651 /* Data 1 */
657 /* Data 2 */
664 /* Data 3 */
671 /* Data 4 */
678 /* Data 5 */
685 /* Data 6 */
692 /* Data 7 */
693 EHT_DATA7_CRC2_O = 0x0000000f,
694 EHT_DATA7_TAIL_2_O = 0x000003f0,
695 EHT_DATA7_NSS_S = 0x0000f000,
700 /* Data 8 */
704 };
705
706 /**
707 * @brief Possible GI values in EHT data subfield.
708 */
715
716 /**
717 * @brief Possible Primary 80 MHz Channel Position values in EHT data subfield.
718 */
724
725 /**
726 * @brief Possible RU/MRU Size values in EHT data subfield.
727 */
747
748 /**
749 * @brief EHT user_info subfield.
750 */
767
768 /**
769 * @brief Set the subfields of the EHT-SIG field
770 *
771 * @param ehtFields The subfields of the EHT-SIG field.
772 */
773 void SetEhtFields(const EhtFields& ehtFields);
774
775 private:
776 /**
777 * Serialize the Channel radiotap header.
778 *
779 * @param start An iterator which points to where the header should be written.
780 */
781 void SerializeChannel(Buffer::Iterator& start) const;
782
783 /**
784 * Deserialize the Channel radiotap header.
785 *
786 * @param start An iterator which points to where the header should be read.
787 * @param bytesRead the number of bytes already read.
788
789 * @returns The number of bytes read.
790 */
792
793 /**
794 * Add Channel subfield/value pairs to the output stream.
795 *
796 * @param os The output stream
797 */
798 void PrintChannel(std::ostream& os) const;
799
800 /**
801 * Serialize the MCS radiotap header.
802 *
803 * @param start An iterator which points to where the header should be written.
804 */
805 void SerializeMcs(Buffer::Iterator& start) const;
806
807 /**
808 * Deserialize the MCS radiotap header.
809 *
810 * @param start An iterator which points to where the header should be read.
811 * @param bytesRead the number of bytes already read.
812
813 * @returns The number of bytes read.
814 */
816
817 /**
818 * Add MCS subfield/value pairs to the output stream.
819 *
820 * @param os The output stream
821 */
822 void PrintMcs(std::ostream& os) const;
823
824 /**
825 * Serialize the A-MPDU Status radiotap header.
826 *
827 * @param start An iterator which points to where the header should be written.
828 */
829 void SerializeAmpduStatus(Buffer::Iterator& start) const;
830
831 /**
832 * Deserialize the A-MPDU Status radiotap header.
833 *
834 * @param start An iterator which points to where the header should be read.
835 * @param bytesRead the number of bytes already read.
836
837 * @returns The number of bytes read.
838 */
840
841 /**
842 * Add A-MPDU Status subfield/value pairs to the output stream.
843 *
844 * @param os The output stream
845 */
846 void PrintAmpduStatus(std::ostream& os) const;
847
848 /**
849 * Serialize the VHT radiotap header.
850 *
851 * @param start An iterator which points to where the header should be written.
852 */
853 void SerializeVht(Buffer::Iterator& start) const;
854
855 /**
856 * Deserialize the VHT radiotap header.
857 *
858 * @param start An iterator which points to where the header should be read.
859 * @param bytesRead the number of bytes already read.
860
861 * @returns The number of bytes read.
862 */
864
865 /**
866 * Add VHT subfield/value pairs to the output stream.
867 *
868 * @param os The output stream
869 */
870 void PrintVht(std::ostream& os) const;
871
872 /**
873 * Serialize the HE radiotap header.
874 *
875 * @param start An iterator which points to where the header should be written.
876 */
877 void SerializeHe(Buffer::Iterator& start) const;
878
879 /**
880 * Deserialize the HE radiotap header.
881 *
882 * @param start An iterator which points to where the header should be read.
883 * @param bytesRead the number of bytes already read.
884
885 * @returns The number of bytes read.
886 */
888
889 /**
890 * Add HE subfield/value pairs to the output stream.
891 *
892 * @param os The output stream
893 */
894 void PrintHe(std::ostream& os) const;
895
896 /**
897 * Serialize the HE-MU radiotap header.
898 *
899 * @param start An iterator which points to where the header should be written.
900 */
901 void SerializeHeMu(Buffer::Iterator& start) const;
902
903 /**
904 * Deserialize the HE-MU radiotap header.
905 *
906 * @param start An iterator which points to where the header should be read.
907 * @param bytesRead the number of bytes already read.
908
909 * @returns The number of bytes read.
910 */
912
913 /**
914 * Add HE-MU subfield/value pairs to the output stream.
915 *
916 * @param os The output stream
917 */
918 void PrintHeMu(std::ostream& os) const;
919
920 /**
921 * Serialize the HE-MU-other-user radiotap header.
922 *
923 * @param start An iterator which points to where the header should be written.
924 */
925 void SerializeHeMuOtherUser(Buffer::Iterator& start) const;
926
927 /**
928 * Deserialize the HE-MU-other-user radiotap header.
929 *
930 * @param start An iterator which points to where the header should be read.
931 * @param bytesRead the number of bytes already read.
932
933 * @returns The number of bytes read.
934 */
936
937 /**
938 * Add HE-MU-other-user subfield/value pairs to the output stream.
939 *
940 * @param os The output stream
941 */
942 void PrintHeMuOtherUser(std::ostream& os) const;
943
944 /**
945 * Serialize the U-SIG radiotap header.
946 *
947 * @param start An iterator which points to where the header should be written.
948 */
949 void SerializeUsig(Buffer::Iterator& start) const;
950
951 /**
952 * Deserialize the U-SIG radiotap header.
953 *
954 * @param start An iterator which points to where the header should be read.
955 * @param bytesRead the number of bytes already read.
956
957 * @returns The number of bytes read.
958 */
960
961 /**
962 * Add U-SIG subfield/value pairs to the output stream.
963 *
964 * @param os The output stream
965 */
966 void PrintUsig(std::ostream& os) const;
967
968 /**
969 * Serialize the EHT radiotap header.
970 *
971 * @param start An iterator which points to where the header should be written.
972 */
973 void SerializeEht(Buffer::Iterator& start) const;
974
975 /**
976 * Deserialize the EHT radiotap header.
977 *
978 * @param start An iterator which points to where the header should be read.
979 * @param bytesRead the number of bytes already read.
980
981 * @returns The number of bytes read.
982 */
984
985 /**
986 * Add EHT subfield/value pairs to the output stream.
987 *
988 * @param os The output stream
989 */
990 void PrintEht(std::ostream& os) const;
991
992 /**
993 * @brief Radiotap flags.
994 */
996 {
997 RADIOTAP_TSFT = 0x00000001,
998 RADIOTAP_FLAGS = 0x00000002,
999 RADIOTAP_RATE = 0x00000004,
1000 RADIOTAP_CHANNEL = 0x00000008,
1001 RADIOTAP_FHSS = 0x00000010,
1008 RADIOTAP_ANTENNA = 0x00000800,
1011 RADIOTAP_RX_FLAGS = 0x00004000,
1012 RADIOTAP_MCS = 0x00080000,
1014 RADIOTAP_VHT = 0x00200000,
1015 RADIOTAP_HE = 0x00800000,
1016 RADIOTAP_HE_MU = 0x01000000,
1019 RADIOTAP_LSIG = 0x08000000,
1020 RADIOTAP_TLV = 0x10000000,
1021 RADIOTAP_EXT = 0x80000000
1023
1024 /**
1025 * @brief Radiotap extended flags.
1026 */
1028 {
1029 RADIOTAP_S1G = 0x00000001,
1030 RADIOTAP_USIG = 0x00000002,
1031 RADIOTAP_EHT_SIG = 0x00000004
1033
1034 uint16_t m_length{8}; //!< entire length of radiotap data + header
1035 uint32_t m_present{0}; //!< bits describing which fields follow header
1036 std::optional<uint32_t> m_presentExt{}; //!< optional extended present bitmask
1037
1038 uint64_t m_tsft{0}; //!< Time Synchronization Function Timer (when the first bit of the MPDU
1039 //!< arrived at the MAC)
1040
1041 uint8_t m_flags{FRAME_FLAG_NONE}; //!< Properties of transmitted and received frames.
1042
1043 uint8_t m_rate{0}; //!< TX/RX data rate in units of 500 kbps
1044
1045 uint8_t m_channelPad{0}; //!< Channel padding.
1046 ChannelFields m_channelFields{}; //!< Channel fields.
1047
1049 0}; //!< RF signal power at the antenna, dB difference from an arbitrary, fixed reference.
1051 0}; //!< RF noise power at the antenna, dB difference from an arbitrary, fixed reference.
1052
1053 McsFields m_mcsFields{}; //!< MCS fields.
1054
1055 uint8_t m_ampduStatusPad{0}; //!< A-MPDU Status Flags, padding before A-MPDU Status Field.
1056 AmpduStatusFields m_ampduStatusFields{}; //!< A-MPDU Status fields.
1057
1058 uint8_t m_vhtPad{0}; //!< VHT padding.
1059 VhtFields m_vhtFields{}; //!< VHT fields.
1060
1061 uint8_t m_hePad{0}; //!< HE padding.
1062 HeFields m_heFields{}; //!< HE fields.
1063
1064 uint8_t m_heMuPad{0}; //!< HE MU padding.
1065 HeMuFields m_heMuFields{}; //!< HE MU fields.
1066
1067 uint8_t m_heMuOtherUserPad{0}; //!< HE MU other user padding.
1068 HeMuOtherUserFields m_heMuOtherUserFields{}; //!< HE MU other user fields.
1069
1070 uint8_t m_usigTlvPad{0}; //!< U-SIG TLV padding.
1071 TlvFields m_usigTlv{}; //!< U-SIG TLV fields.
1072 uint8_t m_usigPad{0}; //!< U-SIG padding.
1073 UsigFields m_usigFields{}; //!< U-SIG fields.
1074
1075 uint8_t m_ehtTlvPad{0}; //!< EHT TLV padding.
1076 TlvFields m_ehtTlv{}; //!< EHT TLV fields.
1077 uint8_t m_ehtPad{0}; //!< EHT padding.
1078 EhtFields m_ehtFields{}; //!< EHT fields.
1079};
1080
1081} // namespace ns3
1082
1083#endif /* RADIOTAP_HEADER_H */
iterator in a Buffer instance
Definition buffer.h:89
Protocol header serialization and deserialization.
Definition header.h:33
Radiotap header implementation.
void SerializeMcs(Buffer::Iterator &start) const
Serialize the MCS radiotap header.
std::optional< uint32_t > m_presentExt
optional extended present bitmask
HeMuFields m_heMuFields
HE MU fields.
uint32_t DeserializeHe(Buffer::Iterator start, uint32_t bytesRead)
Deserialize the HE radiotap header.
void PrintHeMu(std::ostream &os) const
Add HE-MU subfield/value pairs to the output stream.
void SerializeHe(Buffer::Iterator &start) const
Serialize the HE radiotap header.
uint8_t m_rate
TX/RX data rate in units of 500 kbps.
void PrintMcs(std::ostream &os) const
Add MCS subfield/value pairs to the output stream.
void SetAmpduStatus(const AmpduStatusFields &ampduStatusFields)
Set the subfields of the A-MPDU status field.
uint32_t DeserializeUsig(Buffer::Iterator start, uint32_t bytesRead)
Deserialize the U-SIG radiotap header.
void PrintEht(std::ostream &os) const
Add EHT subfield/value pairs to the output stream.
static TypeId GetTypeId()
Get the type ID.
ChannelFlags
Channel flags.
@ CHANNEL_FLAG_GFSK
GFSK channel (FHSS PHY)
@ CHANNEL_FLAG_TURBO
Turbo Channel.
@ CHANNEL_FLAG_DYNAMIC
Dynamic CCK-OFDM channel.
@ CHANNEL_FLAG_PASSIVE
Only passive scan allowed.
@ CHANNEL_FLAG_OFDM
OFDM channel.
@ CHANNEL_FLAG_CCK
CCK channel.
@ CHANNEL_FLAG_NONE
No flags set.
@ CHANNEL_FLAG_SPECTRUM_5GHZ
5 GHz spectrum channel
@ CHANNEL_FLAG_SPECTRUM_2GHZ
2 GHz spectrum channel
uint8_t m_ampduStatusPad
A-MPDU Status Flags, padding before A-MPDU Status Field.
void PrintHeMuOtherUser(std::ostream &os) const
Add HE-MU-other-user subfield/value pairs to the output stream.
void SetHeMuOtherUserFields(const HeMuOtherUserFields &heMuOtherUserFields)
Set the subfields of the HE-MU-other-user field.
UsigTb
EHT TB PPDU U-SIG contents.
@ HE_MU_FLAGS1_SIGB_DCM_KNOWN
SIG-B DCM known.
@ HE_MU_FLAGS1_SIGB_MCS_KNOWN
SIG-B MCS known.
@ HE_MU_FLAGS1_CH1_RUS_KNOWN
Channel 1 RUs known (which depends on BW)
@ HE_MU_FLAGS1_SIGB_DCM
SIG-B DCM (from SIG-A)
@ HE_MU_FLAGS1_CH2_RUS_KNOWN
Channel 2 RUs known (which depends on BW)
@ HE_MU_FLAGS1_CH1_CENTER_26T_RU_KNOWN
(Channel 1) Center 26-tone RU bit known
@ HE_MU_FLAGS1_CH2_CENTER_26T_RU_KNOWN
(Channel 2) Center 26-tone RU bit known
@ HE_MU_FLAGS1_CH1_CENTER_26T_RU
(Channel 1) Center 26-tone RU value
@ HE_MU_FLAGS1_SIGB_COMPRESSION_KNOWN
SIG-B Compression known.
@ HE_MU_FLAGS1_SIGB_MCS
SIG-B MCS (from SIG-A)
uint8_t m_ehtPad
EHT padding.
HeFields m_heFields
HE fields.
uint8_t m_heMuPad
HE MU padding.
void Print(std::ostream &os) const override
This method is used by Packet::Print to print the content of the header as ascii data to a C++ output...
uint8_t m_usigPad
U-SIG padding.
uint8_t m_heMuOtherUserPad
HE MU other user padding.
void SetHeFields(const HeFields &heFields)
Set the subfields of the HE field.
uint8_t m_hePad
HE padding.
void SerializeHeMuOtherUser(Buffer::Iterator &start) const
Serialize the HE-MU-other-user radiotap header.
EhtFields m_ehtFields
EHT fields.
HeMuPerUserKnown
HE MU per_user_known.
@ HE_MU_PER_USER_CODING_KNOWN
Coding known.
@ HE_MU_PER_USER_POSITION_KNOWN
User field position known.
@ HE_MU_PER_USER_SPATIAL_CONFIGURATION_KNOWN
Spatial Configuration known.
@ HE_MU_PER_USER_MCS_KNOWN
MCS known.
@ HE_MU_PER_USER_TX_BF_KNOWN
Tx Beamforming known.
@ HE_MU_PER_USER_NSTS_KNOWN
NSTS known.
@ HE_MU_PER_USER_STA_ID_KNOWN
STA-ID known.
@ HE_MU_PER_USER_DCM_KNOWN
DCM known.
void SetMcsFields(const McsFields &mcsFields)
Set the subfields of the MCS field.
void SetRate(uint8_t rate)
Set the transmit/receive channel frequency in units of megahertz.
uint8_t m_ehtTlvPad
EHT TLV padding.
int8_t m_antennaSignal
RF signal power at the antenna, dB difference from an arbitrary, fixed reference.
void SetAntennaSignalPower(double signal)
Set the RF signal power at the antenna as a decibel difference from an arbitrary, fixed reference.
@ VHT_FLAGS_LDPC_EXTRA_OFDM_SYMBOL
Set if one or more users are using LDPC and the encoding process resulted in extra OFDM symbol(s)
@ VHT_FLAGS_TXOP_PS_NOT_ALLOWED
Set if STAs may not doze during TXOP (valid only for AP transmitters).
@ VHT_FLAGS_NONE
No flags set.
@ VHT_FLAGS_STBC
Set if all spatial streams of all users have space-time block coding.
@ VHT_FLAGS_BEAMFORMED
Set if beamforming is used (valid for SU PPDUs only).
@ VHT_FLAGS_GUARD_INTERVAL
Short guard interval.
@ VHT_FLAGS_SHORT_GI_NSYM_DISAMBIGUATION
Set if NSYM mod 10 = 9 (valid only if short GI is used).
EhtData1RuSize
Possible RU/MRU Size values in EHT data subfield.
uint32_t DeserializeAmpduStatus(Buffer::Iterator start, uint32_t bytesRead)
Deserialize the A-MPDU Status radiotap header.
uint32_t DeserializeVht(Buffer::Iterator start, uint32_t bytesRead)
Deserialize the VHT radiotap header.
uint32_t DeserializeHeMuOtherUser(Buffer::Iterator start, uint32_t bytesRead)
Deserialize the HE-MU-other-user radiotap header.
void SetTsft(uint64_t tsft)
Set the Time Synchronization Function Timer (TSFT) value.
void PrintHe(std::ostream &os) const
Add HE subfield/value pairs to the output stream.
TlvFields m_usigTlv
U-SIG TLV fields.
uint16_t m_length
entire length of radiotap data + header
void Serialize(Buffer::Iterator start) const override
This method is used by Packet::AddHeader to store the header into the byte buffer of a packet.
EhtUserInfo
EHT user_info subfield.
UsigCommonBw
Possible BW values in U-SIG common subfield.
uint32_t m_present
bits describing which fields follow header
void SetUsigFields(const UsigFields &usigFields)
Set the subfields of the U-SIG field.
HeData
bits of the HE data fields.
@ HE_DATA5_PE_DISAMBIG
PE Disambiguity.
@ HE_DATA2_PRISEC_80_SEC
pri/sec 80 MHz
@ HE_DATA1_SPTL_REUSE_KNOWN
Spatial Reuse known (Spatial Reuse 1 for HE TRIG PPDU format)
@ HE_DATA1_DATA_DCM_KNOWN
data DCM known
@ HE_DATA1_CODING_KNOWN
Coding known.
@ HE_DATA2_PRE_FEC_PAD_KNOWN
Pre-FEC Padding Factor known.
@ HE_DATA5_DATA_BW_RU_ALLOC_26T
26-tone RU allocation
@ HE_DATA1_FORMAT_TRIG
HE TRIG PPDU format.
@ HE_DATA5_DATA_BW_RU_ALLOC_484T
484-tone RU allocation
@ HE_DATA1_STBC_KNOWN
STBC known.
@ HE_DATA2_TXOP_KNOWN
TXOP known.
@ HE_DATA1_SPTL_REUSE4_KNOWN
Spatial Reuse 4 known (HE TRIG PPDU format)
@ HE_DATA1_FORMAT_MU
HE MU PPDU format.
@ HE_DATA1_BSS_COLOR_KNOWN
BSS Color known.
@ HE_DATA5_DATA_BW_RU_ALLOC_40MHZ
40 MHz data Bandwidth
@ HE_DATA2_PE_DISAMBIG_KNOWN
PE Disambiguity known.
@ HE_DATA5_DATA_BW_RU_ALLOC_2x996T
2x996-tone RU allocation
@ HE_DATA5_DATA_BW_RU_ALLOC_242T
242-tone RU allocation
@ HE_DATA1_LDPC_XSYMSEG_KNOWN
LDPC extra symbol segment known.
@ HE_DATA5_NUM_LTF_SYMS
number of LTF symbols
@ HE_DATA5_DATA_BW_RU_ALLOC_52T
52-tone RU allocation
@ HE_DATA5_PRE_FEC_PAD
Pre-FEC Padding Factor.
@ HE_DATA2_RU_OFFSET
RU allocation offset.
@ HE_DATA1_FORMAT_EXT_SU
HE EXT SU PPDU format.
@ HE_DATA2_NUM_LTF_SYMS_KNOWN
number of LTF symbols known
@ HE_DATA2_TXBF_KNOWN
TxBF known.
@ HE_DATA1_SPTL_REUSE3_KNOWN
Spatial Reuse 3 known (HE TRIG PPDU format)
@ HE_DATA5_LTF_SYM_SIZE
LTF symbol size.
@ HE_DATA1_BEAM_CHANGE_KNOWN
Beam Change known.
@ HE_DATA1_DATA_MCS_KNOWN
data MCS known
@ HE_DATA5_DATA_BW_RU_ALLOC_160MHZ
160 MHz data Bandwidth
@ HE_DATA5_DATA_BW_RU_ALLOC_106T
106-tone RU allocation
@ HE_DATA2_RU_OFFSET_KNOWN
RU allocation offset known.
@ HE_DATA1_SPTL_REUSE2_KNOWN
Spatial Reuse 2 known (HE TRIG PPDU format), STA-ID known (HE MU PPDU format)
@ HE_DATA2_MIDAMBLE_KNOWN
midamble periodicity known
@ HE_DATA5_DATA_BW_RU_ALLOC_996T
996-tone RU allocation
@ HE_DATA1_BW_RU_ALLOC_KNOWN
data BW/RU allocation known
@ HE_DATA1_UL_DL_KNOWN
UL/DL known.
@ HE_DATA5_DATA_BW_RU_ALLOC_80MHZ
80 MHz data Bandwidth
@ HE_DATA2_PRISEC_80_KNOWN
pri/sec 80 MHz known
@ HE_DATA1_DOPPLER_KNOWN
Doppler known.
void SerializeUsig(Buffer::Iterator &start) const
Serialize the U-SIG radiotap header.
uint32_t Deserialize(Buffer::Iterator start) override
This method is used by Packet::RemoveHeader to re-create a header from the byte buffer of a packet.
void PrintUsig(std::ostream &os) const
Add U-SIG subfield/value pairs to the output stream.
void PrintChannel(std::ostream &os) const
Add Channel subfield/value pairs to the output stream.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
McsKnown
MCS known bits.
@ MCS_KNOWN_FEC_TYPE
FEC type.
@ MCS_KNOWN_GUARD_INTERVAL
Guard interval.
@ MCS_KNOWN_NONE
No flags set.
@ MCS_KNOWN_BANDWIDTH
Bandwidth.
@ MCS_KNOWN_NESS_BIT_1
Ness data - bit 1 (MSB) of Number of extension spatial streams.
@ MCS_KNOWN_HT_FORMAT
HT format.
@ MCS_KNOWN_NESS
Ness known (Number of extension spatial streams)
@ MCS_KNOWN_INDEX
MCS index known.
@ MCS_KNOWN_STBC
STBC known.
uint32_t DeserializeMcs(Buffer::Iterator start, uint32_t bytesRead)
Deserialize the MCS radiotap header.
@ FRAME_FLAG_FRAGMENTED
Frame sent/received with fragmentation.
@ FRAME_FLAG_BAD_FCS
Frame failed FCS check.
@ FRAME_FLAG_SHORT_PREAMBLE
Frame sent/received with short preamble.
@ FRAME_FLAG_SHORT_GUARD
Frame used short guard interval (HT)
@ FRAME_FLAG_CFP
Frame sent/received during CFP.
@ FRAME_FLAG_WEP
Frame sent/received with WEP encryption.
@ FRAME_FLAG_DATA_PADDING
Frame has padding between 802.11 header and payload (to 32-bit boundary)
@ FRAME_FLAG_FCS_INCLUDED
Frame includes FCS.
@ FRAME_FLAG_NONE
No flags set.
@ HE_MU_FLAGS2_BW_FROM_SIGA_KNOWN
Bandwidth from Bandwidth field in HE-SIG-A known.
@ HE_MU_FLAGS2_CH2_CENTER_26T_RU
(Channel 2) Center 26-tone RU value
@ HE_MU_FLAGS2_BW_FROM_SIGA
Bandwidth from Bandwidth field in HE-SIG-A.
@ HE_MU_FLAGS2_PREAMBLE_PUNCTURING_FROM_SIGA_BW_FIELD_KNOWN
Preamble puncturing from Bandwidth field in HE-SIG-A known.
@ HE_MU_FLAGS2_PREAMBLE_PUNCTURING_FROM_SIGA_BW_FIELD
Preamble puncturing from Bandwidth field in HE-SIG-A.
@ HE_MU_FLAGS2_SIGB_COMPRESSION_FROM_SIGA
SIG-B compression from SIG-A.
void SerializeHeMu(Buffer::Iterator &start) const
Serialize the HE-MU radiotap header.
McsFields m_mcsFields
MCS fields.
void SerializeAmpduStatus(Buffer::Iterator &start) const
Serialize the A-MPDU Status radiotap header.
void SetVhtFields(const VhtFields &vhtFields)
Set the subfields of the VHT field.
void SerializeEht(Buffer::Iterator &start) const
Serialize the EHT radiotap header.
uint32_t DeserializeChannel(Buffer::Iterator start, uint32_t bytesRead)
Deserialize the Channel radiotap header.
UsigFields m_usigFields
U-SIG fields.
RadiotapExtFlags
Radiotap extended flags.
UsigCommon
U-SIG common subfield.
@ MCS_FLAGS_BANDWIDTH_20L
20L (20 MHz in lower half of 40 MHz channel)
@ MCS_FLAGS_NESS_BIT_0
Ness - bit 0 (LSB) of Number of extension spatial streams.
@ MCS_FLAGS_NONE
Default: 20 MHz, long guard interval, mixed HT format and BCC FEC type.
@ MCS_FLAGS_STBC_STREAMS
STBC enabled.
@ MCS_FLAGS_FEC_TYPE
LDPC FEC type.
@ MCS_FLAGS_HT_GREENFIELD
Greenfield HT format.
@ MCS_FLAGS_GUARD_INTERVAL
Short guard interval.
@ MCS_FLAGS_BANDWIDTH_20U
20U (20 MHz in upper half of 40 MHz channel)
void SerializeChannel(Buffer::Iterator &start) const
Serialize the Channel radiotap header.
RadiotapFlags
Radiotap flags.
void SetAntennaNoisePower(double noise)
Set the RF noise power at the antenna as a decibel difference from an arbitrary, fixed reference.
AmpduFlags
A-MPDU status flags.
@ A_MPDU_STATUS_IS_ZERO_LENGTH
Frame is 0-length subframe (valid only if 0x0001 is set)
@ A_MPDU_STATUS_NONE
No flags set.
@ A_MPDU_STATUS_REPORT_ZERO_LENGTH
Driver reports 0-length subframes.
@ A_MPDU_STATUS_DELIMITER_CRC_KNOWN
Delimiter CRC value known: the delimiter CRC value field is valid.
@ A_MPDU_STATUS_DELIMITER_CRC_ERROR
Delimiter CRC error.
@ A_MPDU_STATUS_LAST_KNOWN
Last subframe is known (should be set for all subframes in an A-MPDU)
@ A_MPDU_STATUS_LAST
This frame is the last subframe.
void PrintVht(std::ostream &os) const
Add VHT subfield/value pairs to the output stream.
UsigMu
EHT MU PPDU U-SIG contents.
uint32_t GetSerializedSize() const override
This method is used by Packet::AddHeader to store the header into the byte buffer of a packet.
TlvFields m_ehtTlv
EHT TLV fields.
void SetEhtFields(const EhtFields &ehtFields)
Set the subfields of the EHT-SIG field.
ChannelFields m_channelFields
Channel fields.
uint8_t m_usigTlvPad
U-SIG TLV padding.
EhtData0Gi
Possible GI values in EHT data subfield.
EhtKnown
EHT known subfield.
uint8_t m_channelPad
Channel padding.
VhtKnown
VHT known bits.
@ VHT_KNOWN_GROUP_ID
Group ID known.
@ VHT_KNOWN_NONE
No flags set.
@ VHT_KNOWN_BANDWIDTH
Bandwidth known.
@ VHT_KNOWN_STBC
Space-time block coding (1 if all spatial streams of all users have STBC, 0 otherwise).
@ VHT_KNOWN_GUARD_INTERVAL
Guard interval.
@ VHT_KNOWN_LDPC_EXTRA_OFDM_SYMBOL
LDPC extra OFDM symbol known.
@ VHT_KNOWN_PARTIAL_AID
Partial AID known/applicable.
@ VHT_KNOWN_BEAMFORMED
Beamformed known/applicable (this flag should be set to zero for MU PPDUs).
@ VHT_KNOWN_SHORT_GI_NSYM_DISAMBIGUATION
Short GI NSYM disambiguation known.
@ VHT_KNOWN_TXOP_PS_NOT_ALLOWED
TXOP_PS_NOT_ALLOWED known.
uint32_t DeserializeHeMu(Buffer::Iterator start, uint32_t bytesRead)
Deserialize the HE-MU radiotap header.
uint8_t m_vhtPad
VHT padding.
AmpduStatusFields m_ampduStatusFields
A-MPDU Status fields.
void SerializeVht(Buffer::Iterator &start) const
Serialize the VHT radiotap header.
void PrintAmpduStatus(std::ostream &os) const
Add A-MPDU Status subfield/value pairs to the output stream.
uint8_t m_flags
Properties of transmitted and received frames.
EhtData
EHT data subfield.
void SetHeMuFields(const HeMuFields &heMuFields)
Set the subfields of the HE-MU field.
void SetChannelFields(const ChannelFields &channelFields)
Set the subfields of the Channel field.
HeMuOtherUserFields m_heMuOtherUserFields
HE MU other user fields.
void SetFrameFlags(uint8_t flags)
Set the frame flags of the transmitted or received frame.
EhtData1Primary80
Possible Primary 80 MHz Channel Position values in EHT data subfield.
VhtFields m_vhtFields
VHT fields.
uint64_t m_tsft
Time Synchronization Function Timer (when the first bit of the MPDU arrived at the MAC)
uint32_t DeserializeEht(Buffer::Iterator start, uint32_t bytesRead)
Deserialize the EHT radiotap header.
int8_t m_antennaNoise
RF noise power at the antenna, dB difference from an arbitrary, fixed reference.
a unique identifier for an interface.
Definition type-id.h:49
Every class exported by the ns3 library is enclosed in the ns3 namespace.
structure that contains the subfields of the A-MPDU status field.
uint32_t referenceNumber
A-MPDU reference number to identify all subframes belonging to the same A-MPDU.
structure that contains the subfields of the Channel field.
uint16_t frequency
Tx/Rx frequency in MHz.
structure that contains the subfields of the EHT field.
std::vector< uint32_t > userInfo
user info fields.
std::array< uint32_t, 9 > data
data fields.
structure that contains the subfields of the HE field.
structure that contains the subfields of the HE-MU field.
std::array< uint8_t, 4 > ruChannel2
RU_channel2 field.
std::array< uint8_t, 4 > ruChannel1
RU_channel1 field.
structure that contains the subfields of the HE-MU-other-user field.
uint8_t perUserKnown
per_user_known field
uint8_t perUserPosition
per_user_position field
structure that contains the subfields of the MCS field.
uint8_t mcs
MCS index value.
structure that contains the subfields of the TLV fields.
structure that contains the subfields of the U-SIG field.
structure that contains the subfields of the VHT field.
uint8_t groupId
group_id field
uint8_t bandwidth
bandwidth field
std::array< uint8_t, 4 > mcsNss
mcs_nss field
uint16_t partialAid
partial_aid field
uint16_t known
known flags field