8#include "ns3/dot11s-mac-header.h"
9#include "ns3/hwmp-rtable.h"
10#include "ns3/ie-dot11s-peer-management.h"
11#include "ns3/mgt-headers.h"
12#include "ns3/packet.h"
13#include "ns3/peer-link-frame.h"
14#include "ns3/simulator.h"
18using namespace dot11s;
33 :
TestCase(
"Dot11sMeshHeader roundtrip serialization")
37 void DoRun()
override;
54 packet->RemoveHeader(b);
67 packet->RemoveHeader(b);
79 packet->RemoveHeader(b);
93 void DoRun()
override;
122 dst(
"01:00:00:01:00:01"),
123 hop(
"01:00:00:01:00:03"),
166 "Reactive expiration works");
169 "Proactive expiration works");
191 for (
unsigned i = 0; i <
precursors.size(); i++)
218 :
TestCase(
"PeerLinkFrames (open, confirm, close) unit tests")
222 void DoRun()
override;
235 packet->AddHeader(a);
237 packet->RemoveHeader(b);
247 packet->AddHeader(a);
249 packet->RemoveHeader(b);
258 packet->AddHeader(a);
260 packet->RemoveHeader(b);
Unit test for HwmpRtable.
Mac48Address dst
destination address
Ptr< HwmpRtable > table
tab;e
void TestLookup()
Test Add apth and lookup path;.
void TestAddPath()
Test add path and try to lookup after entry has expired.
std::vector< Mac48Address > precursors
precursors
uint32_t seqnum
sequence number
void DoRun() override
Implementation to actually run this TestCase.
void TestPrecursorFind()
Test add precursors and find precursor list in rtable.
void TestPrecursorAdd()
Test add precursors and find precursor list in rtable.
Time expire
expiration time
Mac48Address hop
hop address
void TestExpire()
Test add path and try to lookup after entry has expired.
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Simulation virtual time values and global simulation resolution.
std::vector< std::pair< uint32_t, Mac48Address > > PrecursorList
Path precursor = {MAC, interface ID}.
a IEEE 802.11 Mesh ID element (Section 8.4.2.101 of IEEE 802.11-2012)
802.11s Peer link close management frame
void SetPlinkCloseStart(PlinkCloseStartFields fields)
Set peer link close start fields.
802.11s Peer link confirm management frame
void SetPlinkConfirmStart(PlinkConfirmStartFields fields)
Set peer link confirm start fields.
802.11s Peer link open management frame
void SetPlinkOpenStart(PlinkOpenStartFields fields)
Set peer link open start fields.
static Dot11sTestSuite g_dot11sTestSuite
the test suite
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Built-in self test for PeerLinkFrameStart.
void DoRun() override
Implementation to actually run this TestCase.
Route lookup result, return type of LookupXXX methods.
IeMeshId meshId
open and close
uint16_t capability
open and confirm
IeMeshId meshId
open and close
uint16_t capability
open and confirm