|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #include "ns3/packet.h"
22 #include "ns3/simulator.h"
23 #include "ns3/mgt-headers.h"
24 #include "ns3/dot11s-mac-header.h"
25 #include "ns3/hwmp-rtable.h"
26 #include "ns3/peer-link-frame.h"
27 #include "ns3/ie-dot11s-peer-management.h"
30 using namespace dot11s;
47 TestCase (
"Dot11sMeshHeader roundtrip serialization")
107 virtual void DoRun ();
119 void TestPrecursorAdd ();
121 void TestPrecursorFind ();
136 dst (
"01:00:00:01:00:01"),
137 hop (
"01:00:00:01:00:03"),
188 for (std::vector<Mac48Address>::const_iterator i =
precursors.begin (); i !=
precursors.end (); i++)
201 for (
unsigned i = 0; i <
precursors.size (); i++)
211 table = CreateObject<HwmpRtable> ();
220 Simulator::Destroy ();
227 TestCase (
"PeerLinkFrames (open, confirm, close) unit tests")
230 virtual void DoRun ();
285 :
TestSuite (
"devices-mesh-dot11s", UNIT)
void DeleteReactivePath(Mac48Address destination)
Delete the reactive paths toward a destination.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
void TestPrecursorFind()
Test add precursors and find precursor list in rtable.
uint16_t capability
open and confirm
void AddReactivePath(Mac48Address destination, Mac48Address retransmitter, uint32_t interface, uint32_t metric, Time lifetime, uint32_t seqnum)
Add a reactive path.
void AddHeader(const Header &header)
Add header to this packet.
void TestAddPath()
Test add path and try to lookup after entry has expired.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetPlinkOpenStart(PlinkOpenStartFields fields)
Set peer link open start fields.
uint32_t seqnum
sequence number
void TestLookup()
Test Add apth and lookup path;.
Route lookup result, return type of LookupXXX methods.
a IEEE 802.11 Mesh ID element (Section 8.4.2.101 of IEEE 802.11-2012)
void AddProactivePath(uint32_t metric, Mac48Address root, Mac48Address retransmitter, uint32_t interface, Time lifetime, uint32_t seqnum)
Add a proactive path.
void DeleteProactivePath()
Delete all the proactive paths.
Built-in self test for PeerLinkFrameStart.
void TestPrecursorAdd()
Test add precursors and find precursor list in rtable.
Time expire
expiration time
virtual void DoRun()
Implementation to actually run this TestCase.
LookupResult LookupReactiveExpired(Mac48Address destination)
Return all reactive paths, including expired.
virtual void DoRun()
Implementation to actually run this TestCase.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Mac48Address dst
destination address
Simulation virtual time values and global simulation resolution.
PrecursorList GetPrecursors(Mac48Address destination)
Get the precursors list.
LookupResult LookupReactive(Mac48Address destination)
Lookup path to destination.
Mac48Address hop
hop address
void SetPlinkCloseStart(PlinkCloseStartFields fields)
Set peer link close start fields.
void AddPrecursor(Mac48Address destination, uint32_t precursorInterface, Mac48Address precursorAddress, Time lifetime)
Add a precursor.
LookupResult LookupProactiveExpired()
Return all proactive paths, including expired.
void SetPlinkConfirmStart(PlinkConfirmStartFields fields)
Set peer link confirm start fields.
#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.
802.11s Peer link open management frame
Unit test for HwmpRtable.
void TestExpire()
Test add path and try to lookup after entry has expired.
IeMeshId meshId
open and close
802.11s Peer link confirm management frame
LookupResult LookupProactive()
Find proactive path to tree root.
Time Seconds(double value)
Construct a Time in the indicated unit.
Ptr< HwmpRtable > table
tab;e
std::vector< Mac48Address > precursors
precursors
std::vector< std::pair< uint32_t, Mac48Address > > PrecursorList
Path precursor = {MAC, interface ID}.
static Dot11sTestSuite g_dot11sTestSuite
the test suite
uint16_t capability
open and confirm
IeMeshId meshId
open and close
802.11s Peer link close management frame