A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
mgt-action-headers.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2006 INRIA
3 * Copyright (c) 2009 MIRKO BANCHI
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19 * Mirko Banchi <mk.banchi@gmail.com>
20 */
21
22#ifndef MGT_ACTION_HEADERS_H
23#define MGT_ACTION_HEADERS_H
24
26#include "status-code.h"
27#include "tim.h"
28#include "wifi-opt-field.h"
29#include "wifi-standards.h"
30
31#include "ns3/header.h"
32
33#include <list>
34#include <optional>
35
36namespace ns3
37{
38
39class Packet;
40
41/**
42 * \ingroup wifi
43 *
44 * See IEEE 802.11 chapter 7.3.1.11
45 * Header format: | category: 1 | action value: 1 |
46 *
47 */
49{
50 public:
52 ~WifiActionHeader() override;
53
54 /*
55 * Compatible with table 8-38 IEEE 802.11, Part11, (Year 2012)
56 * Category values - see 802.11-2012 Table 8-38
57 */
58
59 /// CategoryValue enumeration
60 enum CategoryValue : uint8_t // table 9-51 of IEEE 802.11-2020
61 {
63 QOS = 1,
65 PUBLIC = 4,
66 RADIO_MEASUREMENT = 5, // Category: Radio Measurement
67 MESH = 13, // Category: Mesh
68 MULTIHOP = 14, // not used so far
69 SELF_PROTECTED = 15, // Category: Self Protected
70 DMG = 16, // Category: DMG
71 FST = 18, // Category: Fast Session Transfer
72 UNPROTECTED_DMG = 20, // Category: Unprotected DMG
73 PROTECTED_EHT = 37, // Category: Protected EHT
74 // Since vendor specific action has no stationary Action value,the parse process is not
75 // here. Refer to vendor-specific-action in wave module.
77 // values 128 to 255 are illegal
78 };
79
80 /// QosActionValue enumeration
81 enum QosActionValue : uint8_t
82 {
85 DELTS = 2,
88 };
89
90 /**
91 * Block Ack Action field values
92 * See 802.11 Table 8-202
93 */
94 enum BlockAckActionValue : uint8_t
95 {
99 };
100
101 /// PublicActionValue enumeration
102 enum PublicActionValue : uint8_t
103 {
106 FILS_DISCOVERY = 34
107 };
108
109 /// RadioMeasurementActionValue enumeration
111 {
118 };
119
120 /// MeshActionValue enumeration
121 enum MeshActionValue : uint8_t
122 {
123 LINK_METRIC_REPORT = 0, // Action Value:0 in Category 13: Mesh
124 PATH_SELECTION = 1, // Action Value:1 in Category 13: Mesh
125 PORTAL_ANNOUNCEMENT = 2, // Action Value:2 in Category 13: Mesh
126 CONGESTION_CONTROL_NOTIFICATION = 3, // Action Value:3 in Category 13: Mesh
128 4, // Action Value:4 in Category 13: Mesh MCCA-Setup-Request (not used so far)
130 5, // Action Value:5 in Category 13: Mesh MCCA-Setup-Reply (not used so far)
132 6, // Action Value:6 in Category 13: Mesh MCCA-Advertisement-Request (not used so far)
133 MDAOP_ADVERTISEMENTS = 7, // Action Value:7 in Category 13: Mesh (not used so far)
134 MDAOP_SET_TEARDOWN = 8, // Action Value:8 in Category 13: Mesh (not used so far)
135 TBTT_ADJUSTMENT_REQUEST = 9, // Action Value:9 in Category 13: Mesh (not used so far)
136 TBTT_ADJUSTMENT_RESPONSE = 10, // Action Value:10 in Category 13: Mesh (not used so far)
137 };
138
139 /// MultihopActionValue enumeration
140 enum MultihopActionValue : uint8_t
141 {
142 PROXY_UPDATE = 0, // not used so far
143 PROXY_UPDATE_CONFIRMATION = 1, // not used so far
144 };
145
146 /// SelfProtectedActionValue enumeration
147 enum SelfProtectedActionValue : uint8_t // Category: 15 (Self Protected)
148 {
149 PEER_LINK_OPEN = 1, // Mesh Peering Open
150 PEER_LINK_CONFIRM = 2, // Mesh Peering Confirm
151 PEER_LINK_CLOSE = 3, // Mesh Peering Close
152 GROUP_KEY_INFORM = 4, // Mesh Group Key Inform
153 GROUP_KEY_ACK = 5, // Mesh Group Key Acknowledge
154 };
155
156 /**
157 * DMG Action field values
158 * See 802.11ad Table 8-281b
159 */
160 enum DmgActionValue : uint8_t
161 {
185 };
186
187 /**
188 * FST Action field values
189 * See 802.11ad Table 8-281x
190 */
191 enum FstActionValue : uint8_t
192 {
199 };
200
201 /**
202 * Unprotected DMG action field values
203 * See 802.11ad Table 8-281ae
204 */
206 {
213 };
214
215 /**
216 * Protected EHT action field values
217 * See 802.11be D3.0 Table 9-623c
218 */
220 {
231 };
232
233 /**
234 * typedef for union of different ActionValues
235 */
236 typedef union {
248 } ActionValue; ///< the action value
249
250 /**
251 * Set action for this Action header.
252 *
253 * \param type category
254 * \param action action
255 */
256 void SetAction(CategoryValue type, ActionValue action);
257
258 /**
259 * Return the category value.
260 *
261 * \return CategoryValue
262 */
264 /**
265 * Return the action value.
266 *
267 * \return ActionValue
268 */
269 ActionValue GetAction() const;
270
271 /**
272 * Peek an Action header from the given packet.
273 *
274 * \param pkt the given packet
275 * \return the category value and the action value in the peeked Action header
276 */
277 static std::pair<CategoryValue, ActionValue> Peek(Ptr<const Packet> pkt);
278
279 /**
280 * Remove an Action header from the given packet.
281 *
282 * \param pkt the given packet
283 * \return the category value and the action value in the removed Action header
284 */
285 static std::pair<CategoryValue, ActionValue> Remove(Ptr<Packet> pkt);
286
287 /**
288 * Register this type.
289 * \return The TypeId.
290 */
291 static TypeId GetTypeId();
292 TypeId GetInstanceTypeId() const override;
293 void Print(std::ostream& os) const override;
294 uint32_t GetSerializedSize() const override;
295 void Serialize(Buffer::Iterator start) const override;
296 uint32_t Deserialize(Buffer::Iterator start) override;
297
298 private:
299 uint8_t m_category; //!< Category of the action
300 uint8_t m_actionValue; //!< Action value
301};
302
303/**
304 * \ingroup wifi
305 * Implement the header for management frames of type Add Block Ack request.
306 */
308{
309 public:
310 /**
311 * Register this type.
312 * \return The TypeId.
313 */
314 static TypeId GetTypeId();
315 TypeId GetInstanceTypeId() const override;
316 void Print(std::ostream& os) const override;
317 uint32_t GetSerializedSize() const override;
318 void Serialize(Buffer::Iterator start) const override;
319 uint32_t Deserialize(Buffer::Iterator start) override;
320
321 /**
322 * Enable delayed BlockAck.
323 */
324 void SetDelayedBlockAck();
325 /**
326 * Enable immediate BlockAck
327 */
329 /**
330 * Set Traffic ID (TID).
331 *
332 * \param tid traffic ID
333 */
334 void SetTid(uint8_t tid);
335 /**
336 * Set timeout.
337 *
338 * \param timeout timeout
339 */
340 void SetTimeout(uint16_t timeout);
341 /**
342 * Set buffer size.
343 *
344 * \param size buffer size
345 */
346 void SetBufferSize(uint16_t size);
347 /**
348 * Set the starting sequence number.
349 *
350 * \param seq the starting sequence number
351 */
352 void SetStartingSequence(uint16_t seq);
353 /**
354 * Enable or disable A-MSDU support.
355 *
356 * \param supported enable or disable A-MSDU support
357 */
358 void SetAmsduSupport(bool supported);
359
360 /**
361 * Return the starting sequence number.
362 *
363 * \return the starting sequence number
364 */
365 uint16_t GetStartingSequence() const;
366 /**
367 * Return the Traffic ID (TID).
368 *
369 * \return TID
370 */
371 uint8_t GetTid() const;
372 /**
373 * Return whether the Block Ack policy is immediate Block Ack.
374 *
375 * \return true if immediate Block Ack is being used, false otherwise
376 */
377 bool IsImmediateBlockAck() const;
378 /**
379 * Return the timeout.
380 *
381 * \return timeout
382 */
383 uint16_t GetTimeout() const;
384 /**
385 * Return the buffer size.
386 *
387 * \return the buffer size.
388 */
389 uint16_t GetBufferSize() const;
390 /**
391 * Return whether A-MSDU capability is supported.
392 *
393 * \return true is A-MSDU is supported, false otherwise
394 */
395 bool IsAmsduSupported() const;
396
397 private:
398 /**
399 * Return the raw parameter set.
400 *
401 * \return the raw parameter set
402 */
403 uint16_t GetParameterSet() const;
404 /**
405 * Set the parameter set from the given raw value.
406 *
407 * \param params raw parameter set value
408 */
409 void SetParameterSet(uint16_t params);
410 /**
411 * Return the raw sequence control.
412 *
413 * \return the raw sequence control
414 */
415 uint16_t GetStartingSequenceControl() const;
416 /**
417 * Set sequence control with the given raw value.
418 *
419 * \param seqControl the raw sequence control
420 */
421 void SetStartingSequenceControl(uint16_t seqControl);
422
423 uint8_t m_dialogToken{1}; //!< Not used for now
424 uint8_t m_amsduSupport{1}; //!< Flag if A-MSDU is supported
425 uint8_t m_policy{1}; //!< Block Ack policy
426 uint8_t m_tid{0}; //!< Traffic ID
427 uint16_t m_bufferSize{0}; //!< Buffer size
428 uint16_t m_timeoutValue{0}; //!< Timeout
429 uint16_t m_startingSeq{0}; //!< Starting sequence number
430};
431
432/**
433 * \ingroup wifi
434 * Implement the header for management frames of type Add Block Ack response.
435 */
437{
438 public:
439 /**
440 * Register this type.
441 * \return The TypeId.
442 */
443 static TypeId GetTypeId();
444 TypeId GetInstanceTypeId() const override;
445 void Print(std::ostream& os) const override;
446 uint32_t GetSerializedSize() const override;
447 void Serialize(Buffer::Iterator start) const override;
448 uint32_t Deserialize(Buffer::Iterator start) override;
449
450 /**
451 * Enable delayed BlockAck.
452 */
453 void SetDelayedBlockAck();
454 /**
455 * Enable immediate BlockAck.
456 */
458 /**
459 * Set Traffic ID (TID).
460 *
461 * \param tid traffic ID
462 */
463 void SetTid(uint8_t tid);
464 /**
465 * Set timeout.
466 *
467 * \param timeout timeout
468 */
469 void SetTimeout(uint16_t timeout);
470 /**
471 * Set buffer size.
472 *
473 * \param size buffer size
474 */
475 void SetBufferSize(uint16_t size);
476 /**
477 * Set the status code.
478 *
479 * \param code the status code
480 */
481 void SetStatusCode(StatusCode code);
482 /**
483 * Enable or disable A-MSDU support.
484 *
485 * \param supported enable or disable A-MSDU support
486 */
487 void SetAmsduSupport(bool supported);
488
489 /**
490 * Return the status code.
491 *
492 * \return the status code
493 */
495 /**
496 * Return the Traffic ID (TID).
497 *
498 * \return TID
499 */
500 uint8_t GetTid() const;
501 /**
502 * Return whether the Block Ack policy is immediate Block Ack.
503 *
504 * \return true if immediate Block Ack is being used, false otherwise
505 */
506 bool IsImmediateBlockAck() const;
507 /**
508 * Return the timeout.
509 *
510 * \return timeout
511 */
512 uint16_t GetTimeout() const;
513 /**
514 * Return the buffer size.
515 *
516 * \return the buffer size.
517 */
518 uint16_t GetBufferSize() const;
519 /**
520 * Return whether A-MSDU capability is supported.
521 *
522 * \return true is A-MSDU is supported, false otherwise
523 */
524 bool IsAmsduSupported() const;
525
526 private:
527 /**
528 * Return the raw parameter set.
529 *
530 * \return the raw parameter set
531 */
532 uint16_t GetParameterSet() const;
533 /**
534 * Set the parameter set from the given raw value.
535 *
536 * \param params raw parameter set value
537 */
538 void SetParameterSet(uint16_t params);
539
540 uint8_t m_dialogToken{1}; //!< Not used for now
541 StatusCode m_code{}; //!< Status code
542 uint8_t m_amsduSupport{1}; //!< Flag if A-MSDU is supported
543 uint8_t m_policy{1}; //!< Block ACK policy
544 uint8_t m_tid{0}; //!< Traffic ID
545 uint16_t m_bufferSize{0}; //!< Buffer size
546 uint16_t m_timeoutValue{0}; //!< Timeout
547};
548
549/**
550 * \ingroup wifi
551 * Implement the header for management frames of type Delete Block Ack.
552 */
553class MgtDelBaHeader : public Header
554{
555 public:
556 /**
557 * Register this type.
558 * \return The TypeId.
559 */
560 static TypeId GetTypeId();
561
562 TypeId GetInstanceTypeId() const override;
563 void Print(std::ostream& os) const override;
564 uint32_t GetSerializedSize() const override;
565 void Serialize(Buffer::Iterator start) const override;
566 uint32_t Deserialize(Buffer::Iterator start) override;
567
568 /**
569 * Check if the initiator bit in the DELBA is set.
570 *
571 * \return true if the initiator bit in the DELBA is set,
572 * false otherwise
573 */
574 bool IsByOriginator() const;
575 /**
576 * Return the Traffic ID (TID).
577 *
578 * \return TID
579 */
580 uint8_t GetTid() const;
581 /**
582 * Set Traffic ID (TID).
583 *
584 * \param tid traffic ID
585 */
586 void SetTid(uint8_t tid);
587 /**
588 * Set the initiator bit in the DELBA.
589 */
590 void SetByOriginator();
591 /**
592 * Un-set the initiator bit in the DELBA.
593 */
594 void SetByRecipient();
595
596 private:
597 /**
598 * Return the raw parameter set.
599 *
600 * \return the raw parameter set
601 */
602 uint16_t GetParameterSet() const;
603 /**
604 * Set the parameter set from the given raw value.
605 *
606 * \param params raw parameter set value
607 */
608 void SetParameterSet(uint16_t params);
609
610 uint16_t m_initiator{0}; //!< initiator
611 uint16_t m_tid{0}; //!< Traffic ID
612 uint16_t m_reasonCode{1}; //!< Not used for now. Always set to 1: "Unspecified reason"
613};
614
615/**
616 * \ingroup wifi
617 * Implement the header for Action frames of type EML Operating Mode Notification.
618 */
619class MgtEmlOmn : public Header
620{
621 public:
622 MgtEmlOmn() = default;
623
624 /**
625 * Register this type.
626 * \return The TypeId.
627 */
628 static TypeId GetTypeId();
629 TypeId GetInstanceTypeId() const override;
630 void Print(std::ostream& os) const override;
631 uint32_t GetSerializedSize() const override;
632 void Serialize(Buffer::Iterator start) const override;
633 uint32_t Deserialize(Buffer::Iterator start) override;
634
635 /**
636 * EML Control field.
637 */
639 {
640 uint8_t emlsrMode : 1; //!< EMLSR Mode
641 uint8_t emlmrMode : 1; //!< EMLMR Mode
642 uint8_t emlsrParamUpdateCtrl : 1; //!< EMLSR Parameter Update Control
643 uint8_t : 5; //!< reserved
644 std::optional<uint16_t> linkBitmap; //!< EMLSR/EMLMR Link Bitmap
645 std::optional<uint8_t> mcsMapCountCtrl; //!< MCS Map Count Control
646 // TODO Add EMLMR Supported MCS And NSS Set subfield when EMLMR is supported
647 };
648
649 /**
650 * EMLSR Parameter Update field.
651 */
653 {
654 uint8_t paddingDelay : 3; //!< EMLSR Padding Delay
655 uint8_t transitionDelay : 3; //!< EMLSR Transition Delay
656 };
657
658 /**
659 * Set the bit position in the link bitmap corresponding to the given link.
660 *
661 * \param linkId the ID of the given link
662 */
663 void SetLinkIdInBitmap(uint8_t linkId);
664 /**
665 * \return the ID of the links whose bit position in the link bitmap is set to 1
666 */
667 std::list<uint8_t> GetLinkBitmap() const;
668
669 uint8_t m_dialogToken{0}; //!< Dialog Token
670 EmlControl m_emlControl{}; //!< EML Control field
671 std::optional<EmlsrParamUpdate> m_emlsrParamUpdate{}; //!< EMLSR Parameter Update field
672};
673
674/**
675 * \ingroup wifi
676 * Implement the FILS (Fast Initial Link Setup) action frame.
677 * See sec. 9.6.7.36 of IEEE 802.11-2020 and IEEE 802.11ax-2021.
678 */
679class FilsDiscHeader : public Header
680{
681 public:
683
684 /// \return the object TypeId
685 static TypeId GetTypeId();
686 TypeId GetInstanceTypeId() const override;
687 void Print(std::ostream& os) const override;
688 uint32_t GetSerializedSize() const override;
689 void Serialize(Buffer::Iterator start) const override;
690 uint32_t Deserialize(Buffer::Iterator start) override;
691
692 /**
693 * Set the SSID field.
694 *
695 * \param ssid the SSID
696 */
697 void SetSsid(const std::string& ssid);
698
699 /// \return the SSID
700 const std::string& GetSsid() const;
701
702 /// \return size of FILS Discovery Information field in octets
704
705 /// \return size of non-optional subfields in octets
707
708 /// \brief sets value of Length subfield
709 void SetLengthSubfield();
710
711 /// FILS Discovery Frame Control subfield of FILS Discovery Information field
712 struct FilsDiscFrameControl // 2 octets
713 {
714 uint8_t m_ssidLen : 5 {0}; ///< SSID Length
715 bool m_capPresenceInd{false}; ///< Capability Presence Indicator
716 uint8_t m_shortSsidInd : 1 {0}; ///< Short SSID Indicator (not supported)
717 bool m_apCsnPresenceInd{false}; ///< AP-CSN Presence Indicator
718 bool m_anoPresenceInd{false}; ///< ANO Presence Indicator
719 bool m_chCntrFreqSeg1PresenceInd{false}; ///< Channel Center Frequency Segment 1
720 ///< Presence Indicator
721 bool m_primChPresenceInd{false}; ///< Primary Channel Presence Indicator
722 uint8_t m_rsnInfoPresenceInd : 1 {0}; ///< RSN info Presence Indicator (not supported)
723 bool m_lenPresenceInd{false}; ///< Length Presence Indicator
724 uint8_t m_mdPresenceInd : 1 {0}; ///< MD Presence Indicator (not supported)
725 uint8_t m_reserved : 2 {0}; ///< Reserved Bits
726
727 /**
728 * \brief serialize content to a given buffer
729 * \param start given input buffer iterator
730 */
731 void Serialize(Buffer::Iterator& start) const;
732
733 /**
734 * \brief read content from a given buffer
735 * \param start input buffer iterator
736 * \return number of read octets
737 */
739 };
740
741 /// FD Capability subfield of FILS Discovery Information field
742 struct FdCapability // 2 octets
743 {
744 uint8_t m_ess : 1 {0}; ///< ESS
745 uint8_t m_privacy : 1 {0}; ///< Privacy
746 uint8_t m_chWidth : 3 {0}; ///< BSS Operating Channel Width
747 uint8_t m_maxNss : 3 {0}; ///< Maximum Number of Spatial Streams
748 uint8_t m_reserved : 1 {0}; ///< Reserved Bit
749 uint8_t m_multiBssidPresenceInd : 1 {0}; ///< Multiple BSSIDs Presence Indicator
750 uint8_t m_phyIdx : 3 {0}; ///< PHY Index
751 uint8_t m_minRate : 3 {0}; ///< FILS Minimum Rate
752
753 /**
754 * \brief Set the BSS Operating Channel Width field based on the operating channel width
755 * \param width the operating channel width in MHz
756 */
757 void SetOpChannelWidth(uint16_t width);
758
759 /// \return the operating channel width encoded in the BSS Operating Channel Width field
760 uint16_t GetOpChannelWidth() const;
761
762 /**
763 * \brief Set the Maximum Number of Spatial Streams field
764 * \param maxNss the maximum number of supported spatial streams
765 */
766 void SetMaxNss(uint8_t maxNss);
767
768 /**
769 * Note that this function returns 5 if the maximum number of supported spatial streams
770 * is greater than 4.
771 *
772 * \return the maximum number of supported spatial streams
773 */
774 uint8_t GetMaxNss() const;
775
776 /**
777 * \brief Set the PHY Index field based on the given wifi standard
778 * \param standard the wifi standard
779 */
780 void SetStandard(WifiStandard standard);
781
782 /**
783 * \param band the PHY band in which the device is operating (needed to distinguish
784 * between 802.11a and 802.11g)
785 * \return the wifi standard encoded in the PHY Index field
786 */
788
789 /**
790 * \brief serialize content to a given buffer
791 * \param start given input buffer iterator
792 */
793 void Serialize(Buffer::Iterator& start) const;
794
795 /**
796 * \brief read content from a given buffer
797 * \param start input buffer iterator
798 * \return number of read octets
799 */
801 };
802
803 // FILS Discovery Frame Information field
804 // TODO: add optional FD-RSN and Mobility domain subfields
805 FilsDiscFrameControl m_frameCtl; ///< FILS Discovery Frame Control
806 uint64_t m_timeStamp{0}; ///< Timestamp
807 uint16_t m_beaconInt{0}; ///< Beacon Interval in TU (1024 us)
810 std::optional<uint8_t> m_opClass; ///< Operating Class
813 m_apConfigSeqNum; ///< AP Configuration Sequence Number (AP-CSN)
815 OptFieldWithPresenceInd<uint8_t> m_chCntrFreqSeg1; ///< Channel Center Frequency Segment 1
816
817 // (Optional) Information Elements
818 std::optional<ReducedNeighborReport> m_rnr; ///< Reduced Neighbor Report
819 std::optional<Tim> m_tim; ///< Traffic Indication Map element
820
821 private:
822 std::string m_ssid; ///< SSID
823};
824
825/**
826 * \brief Stream insertion operator.
827 *
828 * \param os the output stream
829 * \param control the Fils Discovery Frame Control field
830 * \returns a reference to the stream
831 */
832std::ostream& operator<<(std::ostream& os, const FilsDiscHeader::FilsDiscFrameControl& control);
833
834/**
835 * \brief Stream insertion operator.
836 *
837 * \param os the output stream
838 * \param capability the Fils Discovery Frame Capability field
839 * \returns a reference to the stream
840 */
841std::ostream& operator<<(std::ostream& os, const FilsDiscHeader::FdCapability& capability);
842
843} // namespace ns3
844
845#endif /* MGT_ACTION_HEADERS_H */
iterator in a Buffer instance
Definition: buffer.h:100
Implement the FILS (Fast Initial Link Setup) action frame.
uint16_t m_beaconInt
Beacon Interval in TU (1024 us)
std::optional< ReducedNeighborReport > m_rnr
Reduced Neighbor Report.
OptFieldWithPresenceInd< uint8_t > m_chCntrFreqSeg1
Channel Center Frequency Segment 1.
uint32_t GetSerializedSize() const override
OptFieldWithPresenceInd< uint8_t > m_primaryCh
Primary Channel.
OptFieldWithPresenceInd< uint8_t > m_accessNetOpt
Access Network Options.
const std::string & GetSsid() const
void SetSsid(const std::string &ssid)
Set the SSID field.
uint32_t Deserialize(Buffer::Iterator start) override
FilsDiscFrameControl m_frameCtl
FILS Discovery Frame Control.
OptFieldWithPresenceInd< FdCapability > m_fdCap
FD Capability.
std::optional< uint8_t > m_opClass
Operating Class.
void Print(std::ostream &os) const override
uint32_t GetSizeNonOptSubfields() const
OptFieldWithPresenceInd< uint8_t > m_len
Length.
uint32_t GetInformationFieldSize() const
uint64_t m_timeStamp
Timestamp.
void SetLengthSubfield()
sets value of Length subfield
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void Serialize(Buffer::Iterator start) const override
std::string m_ssid
SSID.
OptFieldWithPresenceInd< uint8_t > m_apConfigSeqNum
AP Configuration Sequence Number (AP-CSN)
std::optional< Tim > m_tim
Traffic Indication Map element.
Protocol header serialization and deserialization.
Definition: header.h:44
Implement the header for management frames of type Add Block Ack request.
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
uint16_t m_startingSeq
Starting sequence number.
void Serialize(Buffer::Iterator start) const override
uint16_t GetStartingSequenceControl() const
Return the raw sequence control.
void SetStartingSequenceControl(uint16_t seqControl)
Set sequence control with the given raw value.
static TypeId GetTypeId()
Register this type.
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
void SetBufferSize(uint16_t size)
Set buffer size.
void Print(std::ostream &os) const override
void SetDelayedBlockAck()
Enable delayed BlockAck.
uint8_t m_dialogToken
Not used for now.
uint16_t GetParameterSet() const
Return the raw parameter set.
uint32_t Deserialize(Buffer::Iterator start) override
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
void SetImmediateBlockAck()
Enable immediate BlockAck.
uint16_t GetBufferSize() const
Return the buffer size.
uint16_t m_bufferSize
Buffer size.
uint16_t GetTimeout() const
Return the timeout.
uint8_t GetTid() const
Return the Traffic ID (TID).
uint16_t GetStartingSequence() const
Return the starting sequence number.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint32_t GetSerializedSize() const override
bool IsAmsduSupported() const
Return whether A-MSDU capability is supported.
bool IsImmediateBlockAck() const
Return whether the Block Ack policy is immediate Block Ack.
void SetTimeout(uint16_t timeout)
Set timeout.
void SetTid(uint8_t tid)
Set Traffic ID (TID).
uint8_t m_policy
Block Ack policy.
void SetStartingSequence(uint16_t seq)
Set the starting sequence number.
Implement the header for management frames of type Add Block Ack response.
uint16_t m_bufferSize
Buffer size.
void SetTid(uint8_t tid)
Set Traffic ID (TID).
uint32_t GetSerializedSize() const override
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
uint8_t m_dialogToken
Not used for now.
void Serialize(Buffer::Iterator start) const override
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
uint16_t GetBufferSize() const
Return the buffer size.
bool IsAmsduSupported() const
Return whether A-MSDU capability is supported.
StatusCode GetStatusCode() const
Return the status code.
void SetTimeout(uint16_t timeout)
Set timeout.
uint8_t m_policy
Block ACK policy.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void SetBufferSize(uint16_t size)
Set buffer size.
void Print(std::ostream &os) const override
void SetStatusCode(StatusCode code)
Set the status code.
uint8_t GetTid() const
Return the Traffic ID (TID).
bool IsImmediateBlockAck() const
Return whether the Block Ack policy is immediate Block Ack.
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
uint16_t GetParameterSet() const
Return the raw parameter set.
uint32_t Deserialize(Buffer::Iterator start) override
uint16_t GetTimeout() const
Return the timeout.
void SetDelayedBlockAck()
Enable delayed BlockAck.
void SetImmediateBlockAck()
Enable immediate BlockAck.
static TypeId GetTypeId()
Register this type.
StatusCode m_code
Status code.
Implement the header for management frames of type Delete Block Ack.
static TypeId GetTypeId()
Register this type.
void SetTid(uint8_t tid)
Set Traffic ID (TID).
uint32_t Deserialize(Buffer::Iterator start) override
void SetByRecipient()
Un-set the initiator bit in the DELBA.
void Print(std::ostream &os) const override
uint16_t m_initiator
initiator
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint8_t GetTid() const
Return the Traffic ID (TID).
uint16_t m_reasonCode
Not used for now.
bool IsByOriginator() const
Check if the initiator bit in the DELBA is set.
uint16_t GetParameterSet() const
Return the raw parameter set.
void Serialize(Buffer::Iterator start) const override
uint16_t m_tid
Traffic ID.
uint32_t GetSerializedSize() const override
void SetByOriginator()
Set the initiator bit in the DELBA.
Implement the header for Action frames of type EML Operating Mode Notification.
void Serialize(Buffer::Iterator start) const override
uint32_t GetSerializedSize() const override
void SetLinkIdInBitmap(uint8_t linkId)
Set the bit position in the link bitmap corresponding to the given link.
EmlControl m_emlControl
EML Control field.
uint32_t Deserialize(Buffer::Iterator start) override
void Print(std::ostream &os) const override
std::optional< EmlsrParamUpdate > m_emlsrParamUpdate
EMLSR Parameter Update field.
MgtEmlOmn()=default
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint8_t m_dialogToken
Dialog Token.
std::list< uint8_t > GetLinkBitmap() const
static TypeId GetTypeId()
Register this type.
OptFieldWithPresenceInd is a class modeling an optional field (in an Information Element,...
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Status code for association response.
Definition: status-code.h:32
a unique identifier for an interface.
Definition: type-id.h:59
See IEEE 802.11 chapter 7.3.1.11 Header format: | category: 1 | action value: 1 |.
uint32_t GetSerializedSize() const override
CategoryValue
CategoryValue enumeration.
uint8_t m_category
Category of the action.
DmgActionValue
DMG Action field values See 802.11ad Table 8-281b.
RadioMeasurementActionValue
RadioMeasurementActionValue enumeration.
SelfProtectedActionValue
SelfProtectedActionValue enumeration.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
FstActionValue
FST Action field values See 802.11ad Table 8-281x.
UnprotectedDmgActionValue
Unprotected DMG action field values See 802.11ad Table 8-281ae.
uint8_t m_actionValue
Action value.
QosActionValue
QosActionValue enumeration.
uint32_t Deserialize(Buffer::Iterator start) override
BlockAckActionValue
Block Ack Action field values See 802.11 Table 8-202.
static std::pair< CategoryValue, ActionValue > Peek(Ptr< const Packet > pkt)
Peek an Action header from the given packet.
void Print(std::ostream &os) const override
MultihopActionValue
MultihopActionValue enumeration.
ProtectedEhtActionValue
Protected EHT action field values See 802.11be D3.0 Table 9-623c.
static std::pair< CategoryValue, ActionValue > Remove(Ptr< Packet > pkt)
Remove an Action header from the given packet.
static TypeId GetTypeId()
Register this type.
void SetAction(CategoryValue type, ActionValue action)
Set action for this Action header.
MeshActionValue
MeshActionValue enumeration.
void Serialize(Buffer::Iterator start) const override
PublicActionValue
PublicActionValue enumeration.
CategoryValue GetCategory() const
Return the category value.
ActionValue GetAction() const
Return the action value.
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
WifiPhyBand
Identifies the PHY band.
Definition: wifi-phy-band.h:33
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:159
ns3::Time timeout
FD Capability subfield of FILS Discovery Information field.
WifiStandard GetStandard(WifiPhyBand band) const
uint8_t GetMaxNss() const
Note that this function returns 5 if the maximum number of supported spatial streams is greater than ...
uint8_t m_minRate
FILS Minimum Rate.
void SetOpChannelWidth(uint16_t width)
Set the BSS Operating Channel Width field based on the operating channel width.
void SetMaxNss(uint8_t maxNss)
Set the Maximum Number of Spatial Streams field.
uint8_t m_chWidth
BSS Operating Channel Width.
uint8_t m_multiBssidPresenceInd
Multiple BSSIDs Presence Indicator.
uint8_t m_maxNss
Maximum Number of Spatial Streams.
void Serialize(Buffer::Iterator &start) const
serialize content to a given buffer
uint32_t Deserialize(Buffer::Iterator start)
read content from a given buffer
void SetStandard(WifiStandard standard)
Set the PHY Index field based on the given wifi standard.
FILS Discovery Frame Control subfield of FILS Discovery Information field.
bool m_apCsnPresenceInd
AP-CSN Presence Indicator.
bool m_chCntrFreqSeg1PresenceInd
Channel Center Frequency Segment 1 Presence Indicator.
uint8_t m_shortSsidInd
Short SSID Indicator (not supported)
bool m_anoPresenceInd
ANO Presence Indicator.
void Serialize(Buffer::Iterator &start) const
serialize content to a given buffer
uint8_t m_rsnInfoPresenceInd
RSN info Presence Indicator (not supported)
bool m_capPresenceInd
Capability Presence Indicator.
uint8_t m_mdPresenceInd
MD Presence Indicator (not supported)
uint32_t Deserialize(Buffer::Iterator start)
read content from a given buffer
bool m_lenPresenceInd
Length Presence Indicator.
bool m_primChPresenceInd
Primary Channel Presence Indicator.
std::optional< uint8_t > mcsMapCountCtrl
MCS Map Count Control.
uint8_t emlsrParamUpdateCtrl
EMLSR Parameter Update Control.
std::optional< uint16_t > linkBitmap
EMLSR/EMLMR Link Bitmap.
EMLSR Parameter Update field.
uint8_t transitionDelay
EMLSR Transition Delay.
uint8_t paddingDelay
EMLSR Padding Delay.
typedef for union of different ActionValues
UnprotectedDmgActionValue unprotectedDmgAction
unprotected dmg
ProtectedEhtActionValue protectedEhtAction
protected eht
SelfProtectedActionValue selfProtectedAction
self protected
MultihopActionValue multihopAction
multi hop
RadioMeasurementActionValue radioMeasurementAction
radio measurement
PublicActionValue publicAction
public
BlockAckActionValue blockAck
block ack