9#include "ns3/header-serialization-test.h"
11#include "ns3/supported-rates.h"
12#include "ns3/wifi-information-element.h"
13#include "ns3/wifi-mgt-header.h"
91 for (uint16_t
i = 0;
i < length;
i++)
187 while (count < length)
204 :
public WifiMgtHeader<TestHeader, std::tuple<std::vector<TestWifiInformationElement>>>
237 .SetGroupName(
"Wifi")
288 void DoRun()
override;
293WifiIeFragmentationTest ::WifiIeFragmentationTest(
bool extended)
313 uint8_t
byte =
it.ReadU8();
Subelement to test fragmentation.
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
TestWifiSubElement()=default
std::list< uint8_t > m_content
content of the IE
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
Test fragmentation of Information Elements.
Buffer SerializeIntoBuffer(const WifiInformationElement &element)
Serialize the given element in a buffer.
bool m_extended
whether the IE includes an Element ID Extension field
void CheckSerializedByte(const Buffer &buffer, uint32_t position, uint8_t value)
Check that the given buffer contains the given value at the given position.
void DoRun() override
Implementation to actually run this TestCase.
~WifiIeFragmentationTest() override=default
wifi Information Element fragmentation Test Suite
WifiIeFragmentationTestSuite()
iterator in a Buffer instance
uint32_t GetDistanceFrom(const Iterator &o) const
void Next()
go forward by one byte
automatically resized byte buffer
void AddAtStart(uint32_t start)
Buffer::Iterator Begin() const
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static unsigned int value(char c)
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
static bool g_extendedIe
whether the test Information Element includes an Element ID Extension field
static WifiIeFragmentationTestSuite g_wifiIeFragmentationTestSuite
the test suite