wifi: Use 16 bits to represent the size of Information fields
...to support fragmentation of IEs that do not fit in 254/255 bytes
This commit is contained in:
@@ -122,7 +122,7 @@ IeBeaconTiming::ClearTimingElement ()
|
||||
}
|
||||
m_neighbours.clear ();
|
||||
}
|
||||
uint8_t
|
||||
uint16_t
|
||||
IeBeaconTiming::GetInformationFieldSize () const
|
||||
{
|
||||
return (5 * m_numOfUnits );
|
||||
@@ -148,8 +148,8 @@ IeBeaconTiming::SerializeInformationField (Buffer::Iterator i) const
|
||||
i.WriteHtolsbU16 ((*j)->GetBeaconInterval ());
|
||||
}
|
||||
}
|
||||
uint8_t
|
||||
IeBeaconTiming::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
IeBeaconTiming::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
m_numOfUnits = length / 5;
|
||||
|
||||
@@ -131,9 +131,9 @@ public:
|
||||
|
||||
// Inherited from WifiInformationElement
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual uint8_t GetInformationFieldSize () const;
|
||||
virtual uint16_t GetInformationFieldSize () const;
|
||||
virtual void SerializeInformationField (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformationField (Buffer::Iterator i, uint8_t length);
|
||||
virtual uint16_t DeserializeInformationField (Buffer::Iterator i, uint16_t length);
|
||||
virtual void Print (std::ostream& os) const;
|
||||
|
||||
/**
|
||||
|
||||
@@ -104,7 +104,7 @@ IeConfiguration::IeConfiguration () :
|
||||
SYNC_NEIGHBOUR_OFFSET), m_APId (AUTH_NULL), m_neighbors (0)
|
||||
{
|
||||
}
|
||||
uint8_t
|
||||
uint16_t
|
||||
IeConfiguration::GetInformationFieldSize () const
|
||||
{
|
||||
return 0 // Version
|
||||
@@ -132,8 +132,8 @@ IeConfiguration::SerializeInformationField (Buffer::Iterator i) const
|
||||
i.WriteU8 (m_neighbors << 1);
|
||||
m_meshCap.Serialize (i);
|
||||
}
|
||||
uint8_t
|
||||
IeConfiguration::DeserializeInformationField (Buffer::Iterator i, uint8_t length)
|
||||
uint16_t
|
||||
IeConfiguration::DeserializeInformationField (Buffer::Iterator i, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator start = i;
|
||||
// Active Path Selection Protocol ID:
|
||||
|
||||
@@ -168,9 +168,9 @@ public:
|
||||
|
||||
// Inherited from WifiInformationElement
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual uint8_t GetInformationFieldSize () const;
|
||||
virtual uint16_t GetInformationFieldSize () const;
|
||||
virtual void SerializeInformationField (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformationField (Buffer::Iterator i, uint8_t length);
|
||||
virtual uint16_t DeserializeInformationField (Buffer::Iterator i, uint16_t length);
|
||||
virtual void Print (std::ostream& os) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -82,7 +82,7 @@ IeMeshId::PeekString (void) const
|
||||
{
|
||||
return (char *) m_meshId;
|
||||
}
|
||||
uint8_t
|
||||
uint16_t
|
||||
IeMeshId::GetInformationFieldSize (void) const
|
||||
{
|
||||
uint8_t size = 0;
|
||||
@@ -103,8 +103,8 @@ IeMeshId::SerializeInformationField (Buffer::Iterator i) const
|
||||
size++;
|
||||
}
|
||||
}
|
||||
uint8_t
|
||||
IeMeshId::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
IeMeshId::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
NS_ASSERT (length <= 32);
|
||||
|
||||
@@ -65,9 +65,9 @@ public:
|
||||
// Inherited from WifiInformationElement
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual void SerializeInformationField (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length);
|
||||
virtual uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length);
|
||||
virtual void Print (std::ostream& os) const;
|
||||
virtual uint8_t GetInformationFieldSize () const;
|
||||
virtual uint16_t GetInformationFieldSize () const;
|
||||
|
||||
private:
|
||||
uint8_t m_meshId[33]; ///< mesh ID
|
||||
|
||||
@@ -36,7 +36,7 @@ IeLinkMetricReport::ElementId () const
|
||||
{
|
||||
return IE_MESH_LINK_METRIC_REPORT;
|
||||
}
|
||||
uint8_t
|
||||
uint16_t
|
||||
IeLinkMetricReport::GetInformationFieldSize (void) const
|
||||
{
|
||||
return sizeof (uint32_t);
|
||||
@@ -56,8 +56,8 @@ IeLinkMetricReport::SerializeInformationField (Buffer::Iterator i) const
|
||||
{
|
||||
i.WriteHtolsbU32 (m_metric);
|
||||
}
|
||||
uint8_t
|
||||
IeLinkMetricReport::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
IeLinkMetricReport::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
m_metric = i.ReadLsbtohU32 ();
|
||||
|
||||
@@ -55,9 +55,9 @@ public:
|
||||
// Inherited from WifiInformationElement
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual void SerializeInformationField (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length);
|
||||
virtual uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length);
|
||||
virtual void Print (std::ostream& os) const;
|
||||
virtual uint8_t GetInformationFieldSize () const;
|
||||
virtual uint16_t GetInformationFieldSize () const;
|
||||
|
||||
private:
|
||||
uint32_t m_metric; ///< metric
|
||||
|
||||
@@ -79,7 +79,7 @@ IePeerManagement::GetPeerLinkId () const
|
||||
return m_peerLinkId;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
IePeerManagement::GetInformationFieldSize (void) const
|
||||
{
|
||||
return m_length;
|
||||
@@ -119,8 +119,8 @@ IePeerManagement::SerializeInformationField (Buffer::Iterator i) const
|
||||
i.WriteHtolsbU16 (m_reasonCode);
|
||||
}
|
||||
}
|
||||
uint8_t
|
||||
IePeerManagement::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
IePeerManagement::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
m_subtype = i.ReadU8 ();
|
||||
|
||||
@@ -115,9 +115,9 @@ public:
|
||||
|
||||
// Inherited from WifiInformationElement
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual uint8_t GetInformationFieldSize (void) const;
|
||||
virtual uint16_t GetInformationFieldSize (void) const;
|
||||
virtual void SerializeInformationField (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformationField (Buffer::Iterator i, uint8_t length);
|
||||
virtual uint16_t DeserializeInformationField (Buffer::Iterator i, uint16_t length);
|
||||
virtual void Print (std::ostream& os) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "ie-dot11s-peering-protocol.h"
|
||||
namespace ns3 {
|
||||
namespace dot11s {
|
||||
uint8_t
|
||||
uint16_t
|
||||
IePeeringProtocol::GetInformationFieldSize () const
|
||||
{
|
||||
return 1;
|
||||
@@ -40,8 +40,8 @@ IePeeringProtocol::SerializeInformationField (Buffer::Iterator i) const
|
||||
{
|
||||
i.WriteU8 (m_protocol);
|
||||
}
|
||||
uint8_t
|
||||
IePeeringProtocol::DeserializeInformationField (Buffer::Iterator i, uint8_t length)
|
||||
uint16_t
|
||||
IePeeringProtocol::DeserializeInformationField (Buffer::Iterator i, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator start = i;
|
||||
m_protocol = i.ReadU8 ();
|
||||
|
||||
@@ -42,9 +42,9 @@ public:
|
||||
|
||||
// Inherited from WifiInformationElement
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual uint8_t GetInformationFieldSize () const;
|
||||
virtual uint16_t GetInformationFieldSize () const;
|
||||
virtual void SerializeInformationField (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformationField (Buffer::Iterator i, uint8_t length);
|
||||
virtual uint16_t DeserializeInformationField (Buffer::Iterator i, uint16_t length);
|
||||
virtual void Print (std::ostream& os) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -64,8 +64,8 @@ IePerr::SerializeInformationField (Buffer::Iterator i) const
|
||||
i.WriteU8 (0);
|
||||
}
|
||||
}
|
||||
uint8_t
|
||||
IePerr::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
IePerr::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
i.Next (1); //TTL //Mode flags is not used now
|
||||
@@ -84,10 +84,10 @@ IePerr::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
return i.GetDistanceFrom (start);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
IePerr::GetInformationFieldSize () const
|
||||
{
|
||||
uint8_t retval = 1 //TTL //ModeFlags
|
||||
uint16_t retval = 1 //TTL //ModeFlags
|
||||
+ 1 //NumOfDests
|
||||
+ 1 * m_addressUnits.size () //ModeFlags
|
||||
+ (6 + 4) * m_addressUnits.size ()
|
||||
|
||||
@@ -67,9 +67,9 @@ public:
|
||||
// Inherited from WifiInformationElement
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual void SerializeInformationField (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length);
|
||||
virtual uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length);
|
||||
virtual void Print (std::ostream& os) const;
|
||||
virtual uint8_t GetInformationFieldSize () const;
|
||||
virtual uint16_t GetInformationFieldSize () const;
|
||||
|
||||
private:
|
||||
std::vector<HwmpProtocol::FailedDestination> m_addressUnits; ///< address units
|
||||
|
||||
@@ -157,8 +157,8 @@ IePrep::SerializeInformationField (Buffer::Iterator i) const
|
||||
WriteTo (i, m_originatorAddress);
|
||||
i.WriteHtolsbU32 (m_originatorSeqNumber);
|
||||
}
|
||||
uint8_t
|
||||
IePrep::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
IePrep::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
m_flags = i.ReadU8 ();
|
||||
@@ -172,7 +172,7 @@ IePrep::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
m_originatorSeqNumber = i.ReadLsbtohU32 ();
|
||||
return i.GetDistanceFrom (start);
|
||||
}
|
||||
uint8_t
|
||||
uint16_t
|
||||
IePrep::GetInformationFieldSize () const
|
||||
{
|
||||
uint32_t retval = 1 //Flags
|
||||
|
||||
@@ -138,8 +138,8 @@ public:
|
||||
// Inherited from WifiInformationElement
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual void SerializeInformationField (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length);
|
||||
virtual uint8_t GetInformationFieldSize () const;
|
||||
virtual uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length);
|
||||
virtual uint16_t GetInformationFieldSize () const;
|
||||
virtual void Print (std::ostream& os) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -249,8 +249,8 @@ IePreq::SerializeInformationField (Buffer::Iterator i) const
|
||||
}
|
||||
}
|
||||
}
|
||||
uint8_t
|
||||
IePreq::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
IePreq::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
m_flags = i.ReadU8 ();
|
||||
@@ -291,10 +291,10 @@ IePreq::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
}
|
||||
return i.GetDistanceFrom (start);
|
||||
}
|
||||
uint8_t
|
||||
uint16_t
|
||||
IePreq::GetInformationFieldSize () const
|
||||
{
|
||||
uint8_t retval = 1 //Flags
|
||||
uint16_t retval = 1 //Flags
|
||||
+ 1 //Hopcount
|
||||
+ 1 //TTL
|
||||
+ 4 //PREQ ID
|
||||
|
||||
@@ -256,8 +256,8 @@ public:
|
||||
// Inherited from WifiInformationElement
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual void SerializeInformationField (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformationField (Buffer::Iterator i, uint8_t length);
|
||||
virtual uint8_t GetInformationFieldSize () const;
|
||||
virtual uint16_t DeserializeInformationField (Buffer::Iterator i, uint16_t length);
|
||||
virtual uint16_t GetInformationFieldSize () const;
|
||||
virtual void Print (std::ostream& os) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -124,8 +124,8 @@ IeRann::SerializeInformationField (Buffer::Iterator i) const
|
||||
i.WriteHtolsbU32 (m_destSeqNumber);
|
||||
i.WriteHtolsbU32 (m_metric);
|
||||
}
|
||||
uint8_t
|
||||
IeRann::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
IeRann::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
m_flags = i.ReadU8 ();
|
||||
@@ -136,10 +136,10 @@ IeRann::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
m_metric = i.ReadLsbtohU32 ();
|
||||
return i.GetDistanceFrom (start);
|
||||
}
|
||||
uint8_t
|
||||
uint16_t
|
||||
IeRann::GetInformationFieldSize () const
|
||||
{
|
||||
uint8_t retval = 1 //Flags
|
||||
uint16_t retval = 1 //Flags
|
||||
+ 1 //Hopcount
|
||||
+ 1 //TTL
|
||||
+ 6 //OriginatorAddress
|
||||
|
||||
@@ -108,8 +108,8 @@ public:
|
||||
// Inherited from WifiInformationElement
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual void SerializeInformationField (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length);
|
||||
virtual uint8_t GetInformationFieldSize () const;
|
||||
virtual uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length);
|
||||
virtual uint16_t GetInformationFieldSize () const;
|
||||
virtual void Print (std::ostream &os) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -283,7 +283,7 @@ EdcaParameterSet::GetVoTxopLimit (void) const
|
||||
return (m_acVO >> 16);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
EdcaParameterSet::GetInformationFieldSize () const
|
||||
{
|
||||
return 18;
|
||||
@@ -300,8 +300,8 @@ EdcaParameterSet::SerializeInformationField (Buffer::Iterator start) const
|
||||
start.WriteU32 (m_acVO);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
EdcaParameterSet::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
EdcaParameterSet::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
m_qosInfo = i.ReadU8 ();
|
||||
|
||||
@@ -38,9 +38,6 @@ public:
|
||||
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length) override;
|
||||
|
||||
/**
|
||||
* Set the QoS Info field in the EdcaParameterSet information element.
|
||||
@@ -274,6 +271,10 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length) override;
|
||||
|
||||
uint8_t m_qosInfo; ///< QOS info
|
||||
uint8_t m_reserved; ///< reserved
|
||||
uint32_t m_acBE; ///< AC_BE
|
||||
|
||||
@@ -38,7 +38,7 @@ EhtCapabilities::ElementIdExt () const
|
||||
return IE_EXT_EHT_CAPABILITIES;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
EhtCapabilities::GetInformationFieldSize () const
|
||||
{
|
||||
return 1; //FIXME
|
||||
@@ -50,8 +50,8 @@ EhtCapabilities::SerializeInformationField (Buffer::Iterator start) const
|
||||
//TODO
|
||||
}
|
||||
|
||||
uint8_t
|
||||
EhtCapabilities::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
EhtCapabilities::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
//TODO
|
||||
return length;
|
||||
|
||||
@@ -37,11 +37,12 @@ public:
|
||||
// Implementations of pure virtual methods, or overridden from base class.
|
||||
WifiInformationElementId ElementId () const override;
|
||||
WifiInformationElementId ElementIdExt () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length) override;
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length) override;
|
||||
|
||||
//TODO: add fields
|
||||
};
|
||||
|
||||
|
||||
@@ -518,10 +518,10 @@ MultiLinkElement::PerStaProfileSubelement::ElementId () const
|
||||
return PER_STA_PROFILE_SUBELEMENT_ID;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
MultiLinkElement::PerStaProfileSubelement::GetInformationFieldSize (void) const
|
||||
{
|
||||
uint8_t ret = 2; // STA Control field
|
||||
uint16_t ret = 2; // STA Control field
|
||||
|
||||
ret += GetStaInfoLength ();
|
||||
|
||||
@@ -550,11 +550,11 @@ MultiLinkElement::PerStaProfileSubelement::SerializeInformationField (Buffer::It
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t
|
||||
MultiLinkElement::PerStaProfileSubelement::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
MultiLinkElement::PerStaProfileSubelement::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
uint8_t count = 0;
|
||||
uint16_t count = 0;
|
||||
|
||||
m_staControl = i.ReadLsbtohU16 ();
|
||||
count += 2;
|
||||
@@ -622,10 +622,10 @@ MultiLinkElement::GetPerStaProfile (std::size_t i) const
|
||||
return m_perStaProfileSubelements.at (i);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
MultiLinkElement::GetInformationFieldSize () const
|
||||
{
|
||||
uint8_t ret = 3; // ElementIdExt (1) + Multi-Link Control (2)
|
||||
uint16_t ret = 3; // ElementIdExt (1) + Multi-Link Control (2)
|
||||
|
||||
// add the Common Info field size (dependent on the Multi-Link Element variant)
|
||||
ret += std::visit ([](auto&& arg) -> uint8_t
|
||||
@@ -676,11 +676,11 @@ MultiLinkElement::SerializeInformationField (Buffer::Iterator start) const
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t
|
||||
MultiLinkElement::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
MultiLinkElement::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
uint8_t count = 0;
|
||||
uint16_t count = 0;
|
||||
|
||||
uint16_t mlControl = i.ReadLsbtohU16 ();
|
||||
count += 2;
|
||||
|
||||
@@ -178,9 +178,9 @@ public:
|
||||
|
||||
WifiInformationElementId ElementId () const override;
|
||||
WifiInformationElementId ElementIdExt () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length) override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length) override;
|
||||
|
||||
/**
|
||||
* Get the Multi-Link element variant
|
||||
@@ -460,9 +460,9 @@ public:
|
||||
uint8_t GetStaInfoLength (void) const;
|
||||
|
||||
private:
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length) override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length) override;
|
||||
|
||||
Variant m_variant; //!< Multi-Link element variant
|
||||
WifiMacType m_frameType; //!< type of the frame containing the Multi-Link Element
|
||||
|
||||
@@ -103,7 +103,7 @@ ExtendedCapabilities::SetVhtSupported (uint8_t vhtSupported)
|
||||
m_vhtSupported = vhtSupported;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
ExtendedCapabilities::GetInformationFieldSize () const
|
||||
{
|
||||
//we should not be here if it is not supported
|
||||
@@ -347,8 +347,8 @@ ExtendedCapabilities::SerializeInformationField (Buffer::Iterator start) const
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t
|
||||
ExtendedCapabilities::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
ExtendedCapabilities::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
uint8_t byte1 = i.ReadU8 ();
|
||||
|
||||
@@ -38,10 +38,10 @@ public:
|
||||
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length) override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint16_t length) override;
|
||||
/**
|
||||
* Set the HT Supported flag.
|
||||
*
|
||||
|
||||
@@ -135,7 +135,7 @@ HeCapabilities::ElementIdExt () const
|
||||
return IE_EXT_HE_CAPABILITIES;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
HeCapabilities::GetInformationFieldSize () const
|
||||
{
|
||||
// IEEE 802.11ax-2021 9.4.2.248 HE Capabilities element
|
||||
@@ -160,8 +160,8 @@ HeCapabilities::SerializeInformationField (Buffer::Iterator start) const
|
||||
// TODO: optional PPE Threshold field (variable length)
|
||||
}
|
||||
|
||||
uint8_t
|
||||
HeCapabilities::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
HeCapabilities::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
uint32_t macCapabilities1 = i.ReadLsbtohU32 ();
|
||||
|
||||
@@ -38,9 +38,6 @@ public:
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
WifiInformationElementId ElementIdExt () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length) override;
|
||||
|
||||
/**
|
||||
* Set the HE MAC Capabilities Info field in the HE Capabilities information element.
|
||||
@@ -210,6 +207,10 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length) override;
|
||||
|
||||
// MAC Capabilities Info fields
|
||||
// IEEE 802.11ax-2021 9.4.2.248.2 HE MAC Capabilities Information field
|
||||
uint8_t m_plusHtcHeSupport; //!< HTC HE support
|
||||
|
||||
@@ -48,7 +48,7 @@ HeOperation::ElementIdExt () const
|
||||
return IE_EXT_HE_OPERATION;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
HeOperation::GetInformationFieldSize () const
|
||||
{
|
||||
return 7;
|
||||
@@ -133,8 +133,8 @@ HeOperation::SerializeInformationField (Buffer::Iterator start) const
|
||||
//todo: VHT Operation Information (variable)
|
||||
}
|
||||
|
||||
uint8_t
|
||||
HeOperation::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
HeOperation::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
uint32_t heOperationParameters = i.ReadLsbtohU32 ();
|
||||
|
||||
@@ -40,9 +40,6 @@ public:
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
WifiInformationElementId ElementIdExt () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length) override;
|
||||
|
||||
/**
|
||||
* Set the HE Operation Parameters field in the HE Operation information element.
|
||||
@@ -84,6 +81,10 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length) override;
|
||||
|
||||
//HE Operation Parameters fields
|
||||
uint8_t m_bssColor; //!< BSS color
|
||||
uint8_t m_defaultPEDuration; //!< default PE duration
|
||||
|
||||
@@ -132,7 +132,7 @@ MuEdcaParameterSet::GetMuEdcaTimer (uint8_t aci) const
|
||||
return MicroSeconds (m_records[aci].muEdcaTimer * 8192);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
MuEdcaParameterSet::GetInformationFieldSize () const
|
||||
{
|
||||
// ElementIdExt (1) + QoS Info (1) + MU Parameter Records (4 * 3)
|
||||
@@ -151,8 +151,8 @@ MuEdcaParameterSet::SerializeInformationField (Buffer::Iterator start) const
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t
|
||||
MuEdcaParameterSet::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
MuEdcaParameterSet::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
m_qosInfo = i.ReadU8 ();
|
||||
|
||||
@@ -38,6 +38,9 @@ class MuEdcaParameterSet : public WifiInformationElement
|
||||
public:
|
||||
MuEdcaParameterSet ();
|
||||
|
||||
WifiInformationElementId ElementId () const override;
|
||||
WifiInformationElementId ElementIdExt () const override;
|
||||
|
||||
/**
|
||||
* Set the QoS Info field in the MuEdcaParameterSet information element.
|
||||
*
|
||||
@@ -123,35 +126,11 @@ public:
|
||||
*/
|
||||
Time GetMuEdcaTimer (uint8_t aci) const;
|
||||
|
||||
/**
|
||||
* Get the wifi information element ID
|
||||
* \return the wifi information element ID
|
||||
*/
|
||||
WifiInformationElementId ElementId () const;
|
||||
/**
|
||||
* Get the wifi information element ID extension
|
||||
* \return the wifi information element ID extension
|
||||
*/
|
||||
WifiInformationElementId ElementIdExt () const;
|
||||
/**
|
||||
* Get information field size function
|
||||
* \return the information field size
|
||||
*/
|
||||
uint8_t GetInformationFieldSize () const;
|
||||
/**
|
||||
* Serialize information field function
|
||||
* \param start the iterator
|
||||
*/
|
||||
void SerializeInformationField (Buffer::Iterator start) const;
|
||||
/**
|
||||
* Deserialize information field function
|
||||
* \param start the iterator
|
||||
* \param length the length
|
||||
* \return the size
|
||||
*/
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length);
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length) override;
|
||||
|
||||
/**
|
||||
* MU AC Parameter Record type
|
||||
*/
|
||||
|
||||
@@ -245,7 +245,7 @@ HtCapabilities::GetRxHighestSupportedAntennas (void) const
|
||||
return 4;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
HtCapabilities::GetInformationFieldSize () const
|
||||
{
|
||||
return 26;
|
||||
@@ -484,9 +484,9 @@ HtCapabilities::SerializeInformationField (Buffer::Iterator start) const
|
||||
start.WriteU8 (GetAntennaSelectionCapabilities ());
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
HtCapabilities::DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length)
|
||||
uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
uint16_t htinfo = i.ReadLsbtohU16 ();
|
||||
|
||||
@@ -45,10 +45,6 @@ public:
|
||||
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length) override;
|
||||
|
||||
/**
|
||||
* Set the HT Capabilities Info field in the HT Capabilities information element.
|
||||
@@ -259,6 +255,11 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint16_t length) override;
|
||||
|
||||
//HT Capabilities Info field
|
||||
uint8_t m_ldpc; ///< LDPC
|
||||
uint8_t m_supportedChannelWidth; ///< supported channel width
|
||||
|
||||
@@ -62,7 +62,7 @@ HtOperation::ElementId () const
|
||||
return IE_HT_OPERATION;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
HtOperation::GetInformationFieldSize () const
|
||||
{
|
||||
return 22;
|
||||
@@ -438,9 +438,9 @@ HtOperation::SerializeInformationField (Buffer::Iterator start) const
|
||||
start.WriteHtolsbU64 (GetBasicMcsSet2 ());
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
HtOperation::DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length)
|
||||
uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
uint8_t primarychannel = i.ReadU8 ();
|
||||
|
||||
@@ -54,10 +54,6 @@ public:
|
||||
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length) override;
|
||||
|
||||
/**
|
||||
* Set the Primary Channel field in the HT Operation information element.
|
||||
@@ -356,6 +352,11 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint16_t length) override;
|
||||
|
||||
uint8_t m_primaryChannel; ///< primary channel
|
||||
|
||||
//HT Information Subset 1
|
||||
|
||||
@@ -39,7 +39,7 @@ DsssParameterSet::SetCurrentChannel (uint8_t currentChannel)
|
||||
m_currentChannel = currentChannel;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
DsssParameterSet::GetInformationFieldSize () const
|
||||
{
|
||||
return 1;
|
||||
@@ -51,8 +51,8 @@ DsssParameterSet::SerializeInformationField (Buffer::Iterator start) const
|
||||
start.WriteU8 (m_currentChannel);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
DsssParameterSet::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
DsssParameterSet::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
m_currentChannel = i.ReadU8 ();
|
||||
|
||||
@@ -38,9 +38,6 @@ public:
|
||||
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length) override;
|
||||
|
||||
/**
|
||||
* Set the Current Channel field in the DsssParameterSet information element.
|
||||
@@ -51,6 +48,10 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length) override;
|
||||
|
||||
uint8_t m_currentChannel; ///< current channel number
|
||||
};
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ ErpInformation::GetNonErpPresent (void) const
|
||||
return (m_erpInformation & 0x01);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
ErpInformation::GetInformationFieldSize () const
|
||||
{
|
||||
return 1;
|
||||
@@ -81,9 +81,9 @@ ErpInformation::SerializeInformationField (Buffer::Iterator start) const
|
||||
start.WriteU8 (m_erpInformation);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
ErpInformation::DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length)
|
||||
uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
m_erpInformation = i.ReadU8 ();
|
||||
|
||||
@@ -38,10 +38,10 @@ public:
|
||||
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length) override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint16_t length) override;
|
||||
|
||||
/**
|
||||
* Set the Barker_Preamble_Mode field in the ErpInformation information element.
|
||||
|
||||
@@ -586,10 +586,10 @@ ReducedNeighborReport::ReadTbttInformationCount (std::size_t nbrApInfoId) const
|
||||
return 1 + m_nbrApInfoFields.at (nbrApInfoId).tbttInfoHdr.tbttInfoCount;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
ReducedNeighborReport::GetInformationFieldSize () const
|
||||
{
|
||||
uint8_t size = 0;
|
||||
uint16_t size = 0;
|
||||
|
||||
for (const auto& neighborApInfo : m_nbrApInfoFields)
|
||||
{
|
||||
@@ -676,11 +676,11 @@ ReducedNeighborReport::SerializeInformationField (Buffer::Iterator start) const
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t
|
||||
ReducedNeighborReport::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
ReducedNeighborReport::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
uint8_t count = 0;
|
||||
uint16_t count = 0;
|
||||
|
||||
while (count < length)
|
||||
{
|
||||
|
||||
@@ -96,9 +96,9 @@ public:
|
||||
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length) override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length) override;
|
||||
|
||||
/**
|
||||
* Get the number of Neighbor AP Information fields
|
||||
|
||||
@@ -92,7 +92,7 @@ Ssid::ElementId () const
|
||||
return IE_SSID;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
Ssid::GetInformationFieldSize () const
|
||||
{
|
||||
return m_length;
|
||||
@@ -105,9 +105,9 @@ Ssid::SerializeInformationField (Buffer::Iterator start) const
|
||||
start.Write (m_ssid, m_length);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
Ssid::DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length)
|
||||
uint16_t length)
|
||||
{
|
||||
m_length = length;
|
||||
NS_ASSERT (m_length <= 32);
|
||||
|
||||
@@ -48,10 +48,6 @@ public:
|
||||
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length) override;
|
||||
|
||||
/**
|
||||
* Check if the two SSIDs are equal.
|
||||
@@ -79,6 +75,11 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint16_t length) override;
|
||||
|
||||
uint8_t m_ssid[33]; //!< Raw SSID value
|
||||
uint8_t m_length; //!< Length of the SSID
|
||||
};
|
||||
|
||||
@@ -179,7 +179,7 @@ SupportedRates::ElementId () const
|
||||
return IE_SUPPORTED_RATES;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
SupportedRates::GetInformationFieldSize () const
|
||||
{
|
||||
//The Supported Rates Information Element contains only the first 8
|
||||
@@ -197,9 +197,9 @@ SupportedRates::SerializeInformationField (Buffer::Iterator start) const
|
||||
start.Write (m_rates, m_nRates > 8 ? 8 : m_nRates);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
SupportedRates::DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length)
|
||||
uint16_t length)
|
||||
{
|
||||
NS_ASSERT (length <= 8);
|
||||
m_nRates = length;
|
||||
@@ -228,7 +228,7 @@ ExtendedSupportedRatesIE::SetSupportedRates (SupportedRates *sr)
|
||||
m_supportedRates = sr;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
ExtendedSupportedRatesIE::GetInformationFieldSize () const
|
||||
{
|
||||
// If there are 8 or fewer rates then we don't need an Extended Supported
|
||||
@@ -251,9 +251,9 @@ ExtendedSupportedRatesIE::SerializeInformationField (Buffer::Iterator start) con
|
||||
start.Write (m_supportedRates->m_rates + 8, m_supportedRates->m_nRates - 8);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
ExtendedSupportedRatesIE::DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length)
|
||||
uint16_t length)
|
||||
{
|
||||
NS_ASSERT (length > 0);
|
||||
NS_ASSERT (m_supportedRates->m_nRates + length <= SupportedRates::MAX_SUPPORTED_RATES);
|
||||
|
||||
@@ -53,10 +53,6 @@ public:
|
||||
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length) override;
|
||||
|
||||
/**
|
||||
* Set supported rates.
|
||||
@@ -67,6 +63,11 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint16_t length) override;
|
||||
|
||||
/**
|
||||
* This member points to the SupportedRates object that contains the
|
||||
* actual rate details. This class is a friend of that, so we have
|
||||
@@ -99,11 +100,7 @@ public:
|
||||
SupportedRates (const SupportedRates & rates);
|
||||
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const;
|
||||
uint8_t GetInformationFieldSize () const;
|
||||
void SerializeInformationField (Buffer::Iterator start) const;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length);
|
||||
WifiInformationElementId ElementId () const override;
|
||||
|
||||
/**
|
||||
* Assignment operator
|
||||
@@ -197,6 +194,11 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint16_t length) override;
|
||||
|
||||
uint8_t m_nRates; //!< Number of supported rates
|
||||
uint8_t m_rates[MAX_SUPPORTED_RATES]; //!< List of supported bit rates (divided by 500000)
|
||||
};
|
||||
|
||||
@@ -61,7 +61,7 @@ VhtCapabilities::ElementId () const
|
||||
return IE_VHT_CAPABILITIES;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
VhtCapabilities::GetInformationFieldSize () const
|
||||
{
|
||||
return 12;
|
||||
@@ -75,9 +75,9 @@ VhtCapabilities::SerializeInformationField (Buffer::Iterator start) const
|
||||
start.WriteHtolsbU64 (GetSupportedMcsAndNssSet ());
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
VhtCapabilities::DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length)
|
||||
uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
uint32_t vhtinfo = i.ReadLsbtohU32 ();
|
||||
|
||||
@@ -38,9 +38,6 @@ public:
|
||||
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length) override;
|
||||
|
||||
/**
|
||||
* Set the VHT Capabilities Info field in the VHT Capabilities information element.
|
||||
@@ -211,6 +208,10 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length) override;
|
||||
|
||||
//Capabilities Info fields
|
||||
uint8_t m_maxMpduLength; ///< maximum MPDU length
|
||||
uint8_t m_supportedChannelWidthSet; ///< supported channel width set
|
||||
|
||||
@@ -36,7 +36,7 @@ VhtOperation::ElementId () const
|
||||
return IE_VHT_OPERATION;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
VhtOperation::GetInformationFieldSize () const
|
||||
{
|
||||
return 5;
|
||||
@@ -114,8 +114,8 @@ VhtOperation::SerializeInformationField (Buffer::Iterator start) const
|
||||
start.WriteU16 (GetBasicVhtMcsAndNssSet ());
|
||||
}
|
||||
|
||||
uint8_t
|
||||
VhtOperation::DeserializeInformationField (Buffer::Iterator start, uint8_t length)
|
||||
uint16_t
|
||||
VhtOperation::DeserializeInformationField (Buffer::Iterator start, uint16_t length)
|
||||
{
|
||||
Buffer::Iterator i = start;
|
||||
uint8_t channelWidth = i.ReadU8 ();
|
||||
|
||||
@@ -39,9 +39,6 @@ public:
|
||||
|
||||
// Implementations of pure virtual methods of WifiInformationElement
|
||||
WifiInformationElementId ElementId () const override;
|
||||
uint8_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length) override;
|
||||
|
||||
/**
|
||||
* Set the Channel Width field in the VHT Operation information element.
|
||||
@@ -103,6 +100,10 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
uint16_t GetInformationFieldSize () const override;
|
||||
void SerializeInformationField (Buffer::Iterator start) const override;
|
||||
uint16_t DeserializeInformationField (Buffer::Iterator start, uint16_t length) override;
|
||||
|
||||
//VHT Operation Information
|
||||
uint8_t m_channelWidth; ///< channel width
|
||||
uint8_t m_channelCenterFrequencySegment0; ///< channel center frequency segment 0
|
||||
|
||||
@@ -91,7 +91,7 @@ WifiInformationElement::DeserializeIfPresent (Buffer::Iterator i)
|
||||
return start;
|
||||
}
|
||||
|
||||
uint8_t length = i.ReadU8 ();
|
||||
uint16_t length = i.ReadU8 ();
|
||||
if (ElementId () == IE_EXTENSION)
|
||||
{
|
||||
uint8_t elementIdExt = i.ReadU8 ();
|
||||
|
||||
@@ -336,7 +336,7 @@ private:
|
||||
*
|
||||
* \return the length of serialized information
|
||||
*/
|
||||
virtual uint8_t GetInformationFieldSize () const = 0;
|
||||
virtual uint16_t GetInformationFieldSize () const = 0;
|
||||
/**
|
||||
* Serialize information (i.e., the body of the IE, not including
|
||||
* the Element ID and length octets)
|
||||
@@ -350,12 +350,12 @@ private:
|
||||
* the Element ID and length octets)
|
||||
*
|
||||
* \param start an iterator which points to where the information should be written.
|
||||
* \param length
|
||||
* \param length the expected number of bytes to read
|
||||
*
|
||||
* \return the number of bytes read
|
||||
*/
|
||||
virtual uint8_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint8_t length) = 0;
|
||||
virtual uint16_t DeserializeInformationField (Buffer::Iterator start,
|
||||
uint16_t length) = 0;
|
||||
};
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
Reference in New Issue
Block a user