16#include "ns3/multi-link-element.h" 
   17#include "ns3/packet.h" 
   18#include "ns3/simulator.h" 
   56        m_actionValue = 
static_cast<uint8_t
>(action.radioMeasurementAction);
 
   68        m_actionValue = 
static_cast<uint8_t
>(action.selfProtectedAction);
 
   80        m_actionValue = 
static_cast<uint8_t
>(action.unprotectedDmgAction);
 
   84        m_actionValue = 
static_cast<uint8_t
>(action.protectedEhtAction);
 
 
  483                            .SetGroupName(
"Wifi")
 
 
  494std::pair<WifiActionHeader::CategoryValue, WifiActionHeader::ActionValue>
 
  498    pkt->PeekHeader(actionHdr);
 
 
  502std::pair<WifiActionHeader::CategoryValue, WifiActionHeader::ActionValue>
 
  506    pkt->RemoveHeader(actionHdr);
 
 
  513#define CASE_ACTION_VALUE(x)                                                                       \ 
  556        os << 
"RADIO_MEASUREMENT[";
 
  599        os << 
"SELF_PROTECTED[";
 
  656        os << 
"UNPROTECTED_DMG[";
 
  670        os << 
"PROTECTED_EHT[";
 
  688        os << 
"VENDOR_SPECIFIC_ACTION";
 
  693#undef CASE_ACTION_VALUE 
 
  727    static TypeId tid = 
TypeId(
"ns3::MgtAddBaRequestHeader")
 
  729                            .SetGroupName(
"Wifi")
 
 
  920std::optional<Mac48Address>
 
  941    m_tid = (params >> 2) & 0x0f;
 
 
  954    static TypeId tid = 
TypeId(
"ns3::MgtAddBaResponseHeader")
 
  956                            .SetGroupName(
"Wifi")
 
 
 1134std::optional<Mac48Address>
 
 1155    m_tid = (params >> 2) & 0x0f;
 
 
 1170                            .SetGroupName(
"Wifi")
 
 
 1246    auto tid = 
static_cast<uint8_t
>(
m_tid);
 
 
 1266    m_tid = 
static_cast<uint16_t
>(tid);
 
 
 1275std::optional<Mac48Address>
 
 1294    m_tid = (params >> 12) & 0x0f;
 
 
 1306    static TypeId tid = 
TypeId(
"ns3::MgtEmlOperatingModeNotification")
 
 1308                            .SetGroupName(
"Wifi")
 
 
 1330        os << 
" EMLSR Padding Delay=" 
 1333           << 
" EMLSR Transition Delay=" 
 
 1365                    "EMLSR Mode and EMLMR Mode cannot be both set to 1");
 
 1372                    "The EMLSR/EMLMR Link Bitmap is present if and only if either of the EMLSR " 
 1373                    "Mode and EMLMR Mode subfields are set to 1");
 
 1382                    "The EMLSR Parameter Update field is present " 
 1384                        << 
" if and only if the EMLSR " 
 1385                           "Parameter Update Control subfield is set to 1 " 
 
 1401    uint8_t val = i.
ReadU8();
 
 1407                    "EMLSR Mode and EMLMR Mode cannot be both set to 1");
 
 
 1441    std::list<uint8_t> 
list;
 
 1444    for (uint8_t linkId = 0; linkId < 16; linkId++)
 
 1446        if ((bitmap & 0x0001) == 1)
 
 1448            list.push_back(linkId);
 
 
 1466                            .SetGroupName(
"Wifi")
 
 
 1478    : m_len(m_frameCtl.m_lenPresenceInd),
 
 1479      m_fdCap(m_frameCtl.m_capPresenceInd),
 
 1480      m_primaryCh(m_frameCtl.m_primChPresenceInd),
 
 1481      m_apConfigSeqNum(m_frameCtl.m_apCsnPresenceInd),
 
 1482      m_accessNetOpt(m_frameCtl.m_anoPresenceInd),
 
 1483      m_chCntrFreqSeg1(m_frameCtl.m_chCntrFreqSeg1PresenceInd)
 
 
 1505    size += 
m_fdCap.has_value() ? 2 : 0;
 
 
 1519    size += 
m_rnr.has_value() ? 
m_rnr->GetSerializedSize() : 0;
 
 1520    size += 
m_tim.has_value() ? 
m_tim->GetSerializedSize() : 0;
 
 
 1539    NS_ABORT_MSG_IF(infoFieldSize < nonOptSubfieldsSize, 
"Length subfield is less than 0");
 
 1540    m_len = infoFieldSize - nonOptSubfieldsSize;
 
 
 1549       << 
"SSID=" << 
m_ssid << 
", ";
 
 1552        os << 
"Length=" << *
m_len << 
", ";
 
 1556        os << 
"FD Capability=" << *
m_fdCap << 
", ";
 
 1560        os << 
"Operating Class=" << *
m_opClass << 
", ";
 
 1578    if (
m_tim.has_value())
 
 1580        os << 
"Traffic Indicator Map=" << *
m_tim;
 
 
 1621    i = 
m_rnr.has_value() ? 
m_rnr->Serialize(i) : i;
 
 1622    i = 
m_tim.has_value() ? 
m_tim->Serialize(i) : i;
 
 
 1636    m_ssid = std::string(
reinterpret_cast<char*
>(ssid.data()));
 
 1644        nOctets = 
m_fdCap->Deserialize(i);
 
 1667    i = 
m_rnr->DeserializeIfPresent(i);
 
 1675    i = 
m_tim->DeserializeIfPresent(i);
 
 
 1707    start.WriteHtolsbU16(val);
 
 
 1713    auto val = start.ReadLsbtohU16();
 
 1715    m_ssidLen = val & 0x001f;
 
 1716    m_capPresenceInd = ((val >> 5) & 0x0001) == 1;
 
 1717    m_shortSsidInd = (val >> 6) & 0x0001;
 
 1718    m_apCsnPresenceInd = ((val >> 7) & 0x0001) == 1;
 
 1719    m_anoPresenceInd = ((val >> 8) & 0x0001) == 1;
 
 1720    m_chCntrFreqSeg1PresenceInd = ((val >> 9) & 0x0001) == 1;
 
 1721    m_primChPresenceInd = ((val >> 10) & 0x0001) == 1;
 
 1722    m_rsnInfoPresenceInd = (val >> 11) & 0x0001;
 
 1723    m_lenPresenceInd = ((val >> 12) & 0x0001) == 1;
 
 1724    m_mdPresenceInd = (val >> 13) & 0x0001;
 
 
 1732    os << 
"ess:" << capability.
m_ess << 
" privacy:" << capability.
m_privacy 
 1733       << 
" channelWidth:" << capability.
m_chWidth << 
" maxNss:" << capability.
m_maxNss 
 
 1742    uint16_t val = m_ess | (m_privacy << 1) | (m_chWidth << 2) | (m_maxNss << 5) |
 
 1743                   (m_multiBssidPresenceInd << 9) | (m_phyIdx << 10) | (m_minRate << 13);
 
 1744    start.WriteHtolsbU16(val);
 
 
 1750    auto val = start.ReadLsbtohU16();
 
 1752    m_ess = val & 0x0001;
 
 1753    m_privacy = (val >> 1) & 0x0001;
 
 1754    m_chWidth = (val >> 2) & 0x0007;
 
 1755    m_maxNss = (val >> 5) & 0x0007;
 
 1756    m_multiBssidPresenceInd = (val >> 9) & 0x0001;
 
 1757    m_phyIdx = (val >> 10) & 0x0007;
 
 1758    m_minRate = (val >> 13) & 0x0007;
 
 
 1766    m_chWidth = (width == 
MHz_u{20} || width == 
MHz_u{22}) ? 0
 
 1767                : (width == 
MHz_u{40})                     ? 1
 
 1768                : (width == 
MHz_u{80})                     ? 2
 
 1769                : (width == 
MHz_u{160})                    ? 3
 
 1770                : (width == 
MHz_u{320})                    ? 4
 
 
 1780        return m_phyIdx == 0 ? 
MHz_u{22} : 
MHz_u{20}; 
 
 
 1801    m_maxNss = std::min<uint8_t>(maxNss, 4);
 
 
 1807    return m_maxNss + 1;
 
 
 1848                        "Invalid PHY band (" << band << 
") with PHY index of 1");
 
 
The IEEE 802.11 ADDBA Extension Element (Sec.
ExtParamSet m_extParamSet
ADDBA Extended Parameter Set field.
iterator in a Buffer instance
void WriteHtolsbU16(uint16_t data)
void WriteU8(uint8_t data)
void Write(const uint8_t *buffer, uint32_t size)
void Read(uint8_t *buffer, uint32_t size)
void WriteHtolsbU64(uint64_t data)
uint32_t GetDistanceFrom(const Iterator &o) const
void Next()
go forward by one byte
The IEEE 802.11 GCR Group Address Element (Sec.
Mac48Address m_gcrGroupAddress
GCR Group Address field.
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.
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.
constexpr void reset()
Destroy the value (if any) contained in the optional field.
constexpr bool has_value() const
Check whether this object contains a value.
Smart pointer class similar to boost::intrusive_ptr.
static Time Now()
Return the current simulation virtual time.
Status code for association response.
Buffer::Iterator Serialize(Buffer::Iterator start) const
Buffer::Iterator Deserialize(Buffer::Iterator start)
uint32_t GetSerializedSize() const
TimeWithUnit As(const Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
WifiPhyBand
Identifies the PHY band.
@ WIFI_STANDARD_UNSPECIFIED
@ WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
uint8_t extBufferSize
extended buffer size
static Time DecodeEmlsrTransitionDelay(uint8_t value)
static Time DecodeEmlsrPaddingDelay(uint8_t value)
std::optional< uint8_t > mcsMapCountCtrl
MCS Map Count Control.
uint8_t emlsrMode
EMLSR Mode.
uint8_t emlsrParamUpdateCtrl
EMLSR Parameter Update Control.
uint8_t emlmrMode
EMLMR Mode.
std::optional< uint16_t > linkBitmap
EMLSR/EMLMR Link Bitmap.
EMLSR Parameter Update field.
uint8_t paddingDelay
EMLSR Padding Delay.