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 * SPDX-License-Identifier: GPL-2.0-only
6 *
7 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
8 * Mirko Banchi <mk.banchi@gmail.com>
9 */
10
11#ifndef MGT_ACTION_HEADERS_H
12#define MGT_ACTION_HEADERS_H
13
15#include "status-code.h"
16#include "tim.h"
17#include "wifi-opt-field.h"
18#include "wifi-standards.h"
19
20#include "ns3/header.h"
21#include "ns3/mac48-address.h"
22
23#include <list>
24#include <optional>
25
26namespace ns3
27{
28
29class Packet;
30
31/**
32 * @ingroup wifi
33 *
34 * See IEEE 802.11 chapter 7.3.1.11
35 * Header format: | category: 1 | action value: 1 |
36 *
37 */
39{
40 public:
42 ~WifiActionHeader() override;
43
44 /*
45 * Compatible with table 8-38 IEEE 802.11, Part11, (Year 2012)
46 * Category values - see 802.11-2012 Table 8-38
47 */
48
49 /// CategoryValue enumeration
50 enum CategoryValue : uint8_t // table 9-51 of IEEE 802.11-2020
51 {
53 QOS = 1,
55 PUBLIC = 4,
56 RADIO_MEASUREMENT = 5, // Category: Radio Measurement
57 MESH = 13, // Category: Mesh
58 MULTIHOP = 14, // not used so far
59 SELF_PROTECTED = 15, // Category: Self Protected
60 DMG = 16, // Category: DMG
61 FST = 18, // Category: Fast Session Transfer
62 UNPROTECTED_DMG = 20, // Category: Unprotected DMG
63 PROTECTED_EHT = 37, // Category: Protected EHT
64 // Since vendor specific action has no stationary Action value,the parse process is not
65 // here. Refer to vendor-specific-action in wave module.
67 // values 128 to 255 are illegal
68 };
69
70 /// QosActionValue enumeration
79
80 /**
81 * Block Ack Action field values
82 * See 802.11 Table 8-202
83 */
90
91 /// PublicActionValue enumeration
92 enum PublicActionValue : uint8_t
93 {
97 };
98
99 /// RadioMeasurementActionValue enumeration
109
110 /// MeshActionValue enumeration
111 enum MeshActionValue : uint8_t
112 {
113 LINK_METRIC_REPORT = 0, // Action Value:0 in Category 13: Mesh
114 PATH_SELECTION = 1, // Action Value:1 in Category 13: Mesh
115 PORTAL_ANNOUNCEMENT = 2, // Action Value:2 in Category 13: Mesh
116 CONGESTION_CONTROL_NOTIFICATION = 3, // Action Value:3 in Category 13: Mesh
118 4, // Action Value:4 in Category 13: Mesh MCCA-Setup-Request (not used so far)
120 5, // Action Value:5 in Category 13: Mesh MCCA-Setup-Reply (not used so far)
122 6, // Action Value:6 in Category 13: Mesh MCCA-Advertisement-Request (not used so far)
123 MDAOP_ADVERTISEMENTS = 7, // Action Value:7 in Category 13: Mesh (not used so far)
124 MDAOP_SET_TEARDOWN = 8, // Action Value:8 in Category 13: Mesh (not used so far)
125 TBTT_ADJUSTMENT_REQUEST = 9, // Action Value:9 in Category 13: Mesh (not used so far)
126 TBTT_ADJUSTMENT_RESPONSE = 10, // Action Value:10 in Category 13: Mesh (not used so far)
127 };
128
129 /// MultihopActionValue enumeration
130 enum MultihopActionValue : uint8_t
131 {
132 PROXY_UPDATE = 0, // not used so far
133 PROXY_UPDATE_CONFIRMATION = 1, // not used so far
134 };
135
136 /// SelfProtectedActionValue enumeration
137 enum SelfProtectedActionValue : uint8_t // Category: 15 (Self Protected)
138 {
139 PEER_LINK_OPEN = 1, // Mesh Peering Open
140 PEER_LINK_CONFIRM = 2, // Mesh Peering Confirm
141 PEER_LINK_CLOSE = 3, // Mesh Peering Close
142 GROUP_KEY_INFORM = 4, // Mesh Group Key Inform
143 GROUP_KEY_ACK = 5, // Mesh Group Key Acknowledge
144 };
145
146 /**
147 * DMG Action field values
148 * See 802.11ad Table 8-281b
149 */
176
177 /**
178 * FST Action field values
179 * See 802.11ad Table 8-281x
180 */
190
191 /**
192 * Unprotected DMG action field values
193 * See 802.11ad Table 8-281ae
194 */
204
205 /**
206 * Protected EHT action field values
207 * See 802.11be D3.0 Table 9-623c
208 */
222
223 /**
224 * typedef for union of different ActionValues
225 */
239
240 /**
241 * Set action for this Action header.
242 *
243 * @param type category
244 * @param action action
245 */
246 void SetAction(CategoryValue type, ActionValue action);
247
248 /**
249 * Return the category value.
250 *
251 * @return CategoryValue
252 */
254 /**
255 * Return the action value.
256 *
257 * @return ActionValue
258 */
259 ActionValue GetAction() const;
260
261 /**
262 * Peek an Action header from the given packet.
263 *
264 * @param pkt the given packet
265 * @return the category value and the action value in the peeked Action header
266 */
267 static std::pair<CategoryValue, ActionValue> Peek(Ptr<const Packet> pkt);
268
269 /**
270 * Remove an Action header from the given packet.
271 *
272 * @param pkt the given packet
273 * @return the category value and the action value in the removed Action header
274 */
275 static std::pair<CategoryValue, ActionValue> Remove(Ptr<Packet> pkt);
276
277 /**
278 * Register this type.
279 * @return The TypeId.
280 */
281 static TypeId GetTypeId();
282 TypeId GetInstanceTypeId() const override;
283 void Print(std::ostream& os) const override;
284 uint32_t GetSerializedSize() const override;
285 void Serialize(Buffer::Iterator start) const override;
286 uint32_t Deserialize(Buffer::Iterator start) override;
287
288 private:
289 uint8_t m_category; //!< Category of the action
290 uint8_t m_actionValue; //!< Action value
291};
292
293/**
294 * @ingroup wifi
295 * Implement the header for management frames of type Add Block Ack request.
296 */
298{
299 public:
300 /**
301 * Register this type.
302 * @return The TypeId.
303 */
304 static TypeId GetTypeId();
305 TypeId GetInstanceTypeId() const override;
306 void Print(std::ostream& os) const override;
307 uint32_t GetSerializedSize() const override;
308 void Serialize(Buffer::Iterator start) const override;
309 uint32_t Deserialize(Buffer::Iterator start) override;
310
311 /**
312 * Enable delayed BlockAck.
313 */
314 void SetDelayedBlockAck();
315 /**
316 * Enable immediate BlockAck
317 */
319 /**
320 * Set Traffic ID (TID).
321 *
322 * @param tid traffic ID
323 */
324 void SetTid(uint8_t tid);
325 /**
326 * Set timeout.
327 *
328 * @param timeout timeout
329 */
330 void SetTimeout(uint16_t timeout);
331 /**
332 * Set buffer size.
333 *
334 * @param size buffer size
335 */
336 void SetBufferSize(uint16_t size);
337 /**
338 * Set the starting sequence number.
339 *
340 * @param seq the starting sequence number
341 */
342 void SetStartingSequence(uint16_t seq);
343 /**
344 * Enable or disable A-MSDU support.
345 *
346 * @param supported enable or disable A-MSDU support
347 */
348 void SetAmsduSupport(bool supported);
349 /**
350 * Set the GCR Group address.
351 *
352 * @param address the GCR Group Address
353 */
354 void SetGcrGroupAddress(const Mac48Address& address);
355
356 /**
357 * Return the starting sequence number.
358 *
359 * @return the starting sequence number
360 */
361 uint16_t GetStartingSequence() const;
362 /**
363 * Return the Traffic ID (TID).
364 *
365 * @return TID
366 */
367 uint8_t GetTid() const;
368 /**
369 * Return whether the Block Ack policy is immediate Block Ack.
370 *
371 * @return true if immediate Block Ack is being used, false otherwise
372 */
373 bool IsImmediateBlockAck() const;
374 /**
375 * Return the timeout.
376 *
377 * @return timeout
378 */
379 uint16_t GetTimeout() const;
380 /**
381 * Return the buffer size.
382 *
383 * @return the buffer size.
384 */
385 uint16_t GetBufferSize() const;
386 /**
387 * Return whether A-MSDU capability is supported.
388 *
389 * @return true is A-MSDU is supported, false otherwise
390 */
391 bool IsAmsduSupported() const;
392 /**
393 * @return the GCR Group Address, if present
394 */
395 std::optional<Mac48Address> GetGcrGroupAddress() 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 bool m_amsduSupport{true}; //!< 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 std::optional<Mac48Address> m_gcrGroupAddress; //!< GCR Group Address (optional)
431};
432
433/**
434 * @ingroup wifi
435 * Implement the header for management frames of type Add Block Ack response.
436 */
438{
439 public:
440 /**
441 * Register this type.
442 * @return The TypeId.
443 */
444 static TypeId GetTypeId();
445 TypeId GetInstanceTypeId() const override;
446 void Print(std::ostream& os) const override;
447 uint32_t GetSerializedSize() const override;
448 void Serialize(Buffer::Iterator start) const override;
449 uint32_t Deserialize(Buffer::Iterator start) override;
450
451 /**
452 * Enable delayed BlockAck.
453 */
454 void SetDelayedBlockAck();
455 /**
456 * Enable immediate BlockAck.
457 */
459 /**
460 * Set Traffic ID (TID).
461 *
462 * @param tid traffic ID
463 */
464 void SetTid(uint8_t tid);
465 /**
466 * Set timeout.
467 *
468 * @param timeout timeout
469 */
470 void SetTimeout(uint16_t timeout);
471 /**
472 * Set buffer size.
473 *
474 * @param size buffer size
475 */
476 void SetBufferSize(uint16_t size);
477 /**
478 * Set the status code.
479 *
480 * @param code the status code
481 */
482 void SetStatusCode(StatusCode code);
483 /**
484 * Enable or disable A-MSDU support.
485 *
486 * @param supported enable or disable A-MSDU support
487 */
488 void SetAmsduSupport(bool supported);
489 /**
490 * Set the GCR Group address.
491 *
492 * @param address the GCR Group Address
493 */
494 void SetGcrGroupAddress(const Mac48Address& address);
495
496 /**
497 * Return the status code.
498 *
499 * @return the status code
500 */
502 /**
503 * Return the Traffic ID (TID).
504 *
505 * @return TID
506 */
507 uint8_t GetTid() const;
508 /**
509 * Return whether the Block Ack policy is immediate Block Ack.
510 *
511 * @return true if immediate Block Ack is being used, false otherwise
512 */
513 bool IsImmediateBlockAck() const;
514 /**
515 * Return the timeout.
516 *
517 * @return timeout
518 */
519 uint16_t GetTimeout() const;
520 /**
521 * Return the buffer size.
522 *
523 * @return the buffer size.
524 */
525 uint16_t GetBufferSize() const;
526 /**
527 * Return whether A-MSDU capability is supported.
528 *
529 * @return true is A-MSDU is supported, false otherwise
530 */
531 bool IsAmsduSupported() const;
532 /**
533 * @return the GCR Group Address, if present
534 */
535 std::optional<Mac48Address> GetGcrGroupAddress() const;
536
537 private:
538 /**
539 * Return the raw parameter set.
540 *
541 * @return the raw parameter set
542 */
543 uint16_t GetParameterSet() const;
544 /**
545 * Set the parameter set from the given raw value.
546 *
547 * @param params raw parameter set value
548 */
549 void SetParameterSet(uint16_t params);
550
551 uint8_t m_dialogToken{1}; //!< Not used for now
552 StatusCode m_code{}; //!< Status code
553 bool m_amsduSupport{true}; //!< Flag if A-MSDU is supported
554 uint8_t m_policy{1}; //!< Block ACK policy
555 uint8_t m_tid{0}; //!< Traffic ID
556 uint16_t m_bufferSize{0}; //!< Buffer size
557 uint16_t m_timeoutValue{0}; //!< Timeout
558 std::optional<Mac48Address> m_gcrGroupAddress; //!< GCR Group Address (optional)
559};
560
561/**
562 * @ingroup wifi
563 * Implement the header for management frames of type Delete Block Ack.
564 */
565class MgtDelBaHeader : public Header
566{
567 public:
568 /**
569 * Register this type.
570 * @return The TypeId.
571 */
572 static TypeId GetTypeId();
573
574 TypeId GetInstanceTypeId() const override;
575 void Print(std::ostream& os) const override;
576 uint32_t GetSerializedSize() const override;
577 void Serialize(Buffer::Iterator start) const override;
578 uint32_t Deserialize(Buffer::Iterator start) override;
579
580 /**
581 * Check if the initiator bit in the DELBA is set.
582 *
583 * @return true if the initiator bit in the DELBA is set,
584 * false otherwise
585 */
586 bool IsByOriginator() const;
587 /**
588 * Return the Traffic ID (TID).
589 *
590 * @return TID
591 */
592 uint8_t GetTid() const;
593 /**
594 * Set Traffic ID (TID).
595 *
596 * @param tid traffic ID
597 */
598 void SetTid(uint8_t tid);
599 /**
600 * Set the initiator bit in the DELBA.
601 */
602 void SetByOriginator();
603 /**
604 * Un-set the initiator bit in the DELBA.
605 */
606 void SetByRecipient();
607 /**
608 * Set the GCR Group address.
609 *
610 * @param address the GCR Group Address
611 */
612 void SetGcrGroupAddress(const Mac48Address& address);
613 /**
614 * @return the GCR Group Address, if present
615 */
616 std::optional<Mac48Address> GetGcrGroupAddress() const;
617
618 private:
619 /**
620 * Return the raw parameter set.
621 *
622 * @return the raw parameter set
623 */
624 uint16_t GetParameterSet() const;
625 /**
626 * Set the parameter set from the given raw value.
627 *
628 * @param params raw parameter set value
629 */
630 void SetParameterSet(uint16_t params);
631
632 uint16_t m_initiator{0}; //!< initiator
633 uint16_t m_tid{0}; //!< Traffic ID
634 uint16_t m_reasonCode{1}; //!< Not used for now. Always set to 1: "Unspecified reason"
635 std::optional<Mac48Address> m_gcrGroupAddress; //!< GCR Group Address (optional)
636};
637
638/**
639 * @ingroup wifi
640 * Implement the header for Action frames of type EML Operating Mode Notification.
641 */
642class MgtEmlOmn : public Header
643{
644 public:
645 MgtEmlOmn() = default;
646
647 /**
648 * Register this type.
649 * @return The TypeId.
650 */
651 static TypeId GetTypeId();
652 TypeId GetInstanceTypeId() const override;
653 void Print(std::ostream& os) const override;
654 uint32_t GetSerializedSize() const override;
655 void Serialize(Buffer::Iterator start) const override;
656 uint32_t Deserialize(Buffer::Iterator start) override;
657
658 /**
659 * EML Control field.
660 */
662 {
663 uint8_t emlsrMode : 1; //!< EMLSR Mode
664 uint8_t emlmrMode : 1; //!< EMLMR Mode
665 uint8_t emlsrParamUpdateCtrl : 1; //!< EMLSR Parameter Update Control
666 uint8_t : 5; //!< reserved
667 std::optional<uint16_t> linkBitmap; //!< EMLSR/EMLMR Link Bitmap
668 std::optional<uint8_t> mcsMapCountCtrl; //!< MCS Map Count Control
669 // TODO Add EMLMR Supported MCS And NSS Set subfield when EMLMR is supported
670 };
671
672 /**
673 * EMLSR Parameter Update field.
674 */
676 {
677 uint8_t paddingDelay : 3; //!< EMLSR Padding Delay
678 uint8_t transitionDelay : 3; //!< EMLSR Transition Delay
679 };
680
681 /**
682 * Set the bit position in the link bitmap corresponding to the given link.
683 *
684 * @param linkId the ID of the given link
685 */
686 void SetLinkIdInBitmap(uint8_t linkId);
687 /**
688 * @return the ID of the links whose bit position in the link bitmap is set to 1
689 */
690 std::list<uint8_t> GetLinkBitmap() const;
691
692 uint8_t m_dialogToken{0}; //!< Dialog Token
693 EmlControl m_emlControl{}; //!< EML Control field
694 std::optional<EmlsrParamUpdate> m_emlsrParamUpdate{}; //!< EMLSR Parameter Update field
695};
696
697/**
698 * @ingroup wifi
699 * Implement the FILS (Fast Initial Link Setup) action frame.
700 * See sec. 9.6.7.36 of IEEE 802.11-2020 and IEEE 802.11ax-2021.
701 */
702class FilsDiscHeader : public Header
703{
704 public:
706
707 /// @return the object TypeId
708 static TypeId GetTypeId();
709 TypeId GetInstanceTypeId() const override;
710 void Print(std::ostream& os) const override;
711 uint32_t GetSerializedSize() const override;
712 void Serialize(Buffer::Iterator start) const override;
713 uint32_t Deserialize(Buffer::Iterator start) override;
714
715 /**
716 * Set the SSID field.
717 *
718 * @param ssid the SSID
719 */
720 void SetSsid(const std::string& ssid);
721
722 /// @return the SSID
723 const std::string& GetSsid() const;
724
725 /// @return size of FILS Discovery Information field in octets
727
728 /// @return size of non-optional subfields in octets
730
731 /// @brief sets value of Length subfield
732 void SetLengthSubfield();
733
734 /// FILS Discovery Frame Control subfield of FILS Discovery Information field
735 struct FilsDiscFrameControl // 2 octets
736 {
737 uint8_t m_ssidLen : 5 {0}; ///< SSID Length
738 bool m_capPresenceInd{false}; ///< Capability Presence Indicator
739 uint8_t m_shortSsidInd : 1 {0}; ///< Short SSID Indicator (not supported)
740 bool m_apCsnPresenceInd{false}; ///< AP-CSN Presence Indicator
741 bool m_anoPresenceInd{false}; ///< ANO Presence Indicator
742 bool m_chCntrFreqSeg1PresenceInd{false}; ///< Channel Center Frequency Segment 1
743 ///< Presence Indicator
744 bool m_primChPresenceInd{false}; ///< Primary Channel Presence Indicator
745 uint8_t m_rsnInfoPresenceInd : 1 {0}; ///< RSN info Presence Indicator (not supported)
746 bool m_lenPresenceInd{false}; ///< Length Presence Indicator
747 uint8_t m_mdPresenceInd : 1 {0}; ///< MD Presence Indicator (not supported)
748 uint8_t m_reserved : 2 {0}; ///< Reserved Bits
749
750 /**
751 * @brief serialize content to a given buffer
752 * @param start given input buffer iterator
753 */
754 void Serialize(Buffer::Iterator& start) const;
755
756 /**
757 * @brief read content from a given buffer
758 * @param start input buffer iterator
759 * @return number of read octets
760 */
762 };
763
764 /// FD Capability subfield of FILS Discovery Information field
765 struct FdCapability // 2 octets
766 {
767 uint8_t m_ess : 1 {0}; ///< ESS
768 uint8_t m_privacy : 1 {0}; ///< Privacy
769 uint8_t m_chWidth : 3 {0}; ///< BSS Operating Channel Width
770 uint8_t m_maxNss : 3 {0}; ///< Maximum Number of Spatial Streams
771 uint8_t m_reserved : 1 {0}; ///< Reserved Bit
772 uint8_t m_multiBssidPresenceInd : 1 {0}; ///< Multiple BSSIDs Presence Indicator
773 uint8_t m_phyIdx : 3 {0}; ///< PHY Index
774 uint8_t m_minRate : 3 {0}; ///< FILS Minimum Rate
775
776 /**
777 * @brief Set the BSS Operating Channel Width field based on the operating channel width
778 * @param width the operating channel width
779 */
780 void SetOpChannelWidth(MHz_u width);
781
782 /// @return the operating channel width encoded in the BSS Operating Channel Width field
783 MHz_u GetOpChannelWidth() const;
784
785 /**
786 * @brief Set the Maximum Number of Spatial Streams field
787 * @param maxNss the maximum number of supported spatial streams
788 */
789 void SetMaxNss(uint8_t maxNss);
790
791 /**
792 * Note that this function returns 5 if the maximum number of supported spatial streams
793 * is greater than 4.
794 *
795 * @return the maximum number of supported spatial streams
796 */
797 uint8_t GetMaxNss() const;
798
799 /**
800 * @brief Set the PHY Index field based on the given wifi standard
801 * @param standard the wifi standard
802 */
803 void SetStandard(WifiStandard standard);
804
805 /**
806 * @param band the PHY band in which the device is operating (needed to distinguish
807 * between 802.11a and 802.11g)
808 * @return the wifi standard encoded in the PHY Index field
809 */
811
812 /**
813 * @brief serialize content to a given buffer
814 * @param start given input buffer iterator
815 */
816 void Serialize(Buffer::Iterator& start) const;
817
818 /**
819 * @brief read content from a given buffer
820 * @param start input buffer iterator
821 * @return number of read octets
822 */
824 };
825
826 // FILS Discovery Frame Information field
827 // TODO: add optional FD-RSN and Mobility domain subfields
828 FilsDiscFrameControl m_frameCtl; ///< FILS Discovery Frame Control
829 uint64_t m_timeStamp{0}; ///< Timestamp
830 uint16_t m_beaconInt{0}; ///< Beacon Interval in TU (1024 us)
833 std::optional<uint8_t> m_opClass; ///< Operating Class
836 m_apConfigSeqNum; ///< AP Configuration Sequence Number (AP-CSN)
838 OptFieldWithPresenceInd<uint8_t> m_chCntrFreqSeg1; ///< Channel Center Frequency Segment 1
839
840 // (Optional) Information Elements
841 std::optional<ReducedNeighborReport> m_rnr; ///< Reduced Neighbor Report
842 std::optional<Tim> m_tim; ///< Traffic Indication Map element
843
844 private:
845 std::string m_ssid; ///< SSID
846};
847
848/**
849 * @brief Stream insertion operator.
850 *
851 * @param os the output stream
852 * @param control the Fils Discovery Frame Control field
853 * @returns a reference to the stream
854 */
855std::ostream& operator<<(std::ostream& os, const FilsDiscHeader::FilsDiscFrameControl& control);
856
857/**
858 * @brief Stream insertion operator.
859 *
860 * @param os the output stream
861 * @param capability the Fils Discovery Frame Capability field
862 * @returns a reference to the stream
863 */
864std::ostream& operator<<(std::ostream& os, const FilsDiscHeader::FdCapability& capability);
865
866} // namespace ns3
867
868#endif /* MGT_ACTION_HEADERS_H */
iterator in a Buffer instance
Definition buffer.h:89
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:33
an EUI-48 address
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.
std::optional< Mac48Address > GetGcrGroupAddress() const
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.
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.
void SetGcrGroupAddress(const Mac48Address &address)
Set the GCR Group address.
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.
bool m_amsduSupport
Flag if A-MSDU is supported.
uint32_t GetSerializedSize() const override
std::optional< Mac48Address > m_gcrGroupAddress
GCR Group Address (optional)
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
bool 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.
void SetGcrGroupAddress(const Mac48Address &address)
Set the GCR Group address.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void SetBufferSize(uint16_t size)
Set buffer size.
std::optional< Mac48Address > m_gcrGroupAddress
GCR Group Address (optional)
void Print(std::ostream &os) const override
void SetStatusCode(StatusCode code)
Set the status code.
std::optional< Mac48Address > GetGcrGroupAddress() const
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.
std::optional< Mac48Address > GetGcrGroupAddress() const
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.
std::optional< Mac48Address > m_gcrGroupAddress
GCR Group Address (optional)
bool IsByOriginator() const
Check if the initiator bit in the DELBA is set.
uint16_t GetParameterSet() const
Return the raw parameter set.
void SetGcrGroupAddress(const Mac48Address &address)
Set the GCR Group address.
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.
Status code for association response.
Definition status-code.h:21
a unique identifier for an interface.
Definition type-id.h:48
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.
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:148
ns3::Time timeout
FD Capability subfield of FILS Discovery Information field.
WifiStandard GetStandard(WifiPhyBand band) const
void SetOpChannelWidth(MHz_u width)
Set the BSS Operating Channel Width field based on the operating channel width.
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 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)
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
BlockAckActionValue blockAck
block ack