22 #include "ns3/mesh-information-element-vector.h"
24 #include "ns3/ie-dot11s-beacon-timing.h"
25 #include "ns3/ie-dot11s-configuration.h"
26 #include "ns3/ie-dot11s-id.h"
27 #include "ns3/ie-dot11s-metric-report.h"
28 #include "ns3/ie-dot11s-peer-management.h"
29 #include "ns3/ie-dot11s-peering-protocol.h"
30 #include "ns3/ie-dot11s-perr.h"
31 #include "ns3/ie-dot11s-prep.h"
32 #include "ns3/ie-dot11s-preq.h"
33 #include "ns3/ie-dot11s-rann.h"
51 TestCase (
"Serialization test for all mesh information elements")
76 peerMan1->SetPeerOpen (1);
78 peerMan2->SetPeerConfirm (1, 2);
87 beaconTiming->AddNeighboursTimingElementUnit (1,
Seconds (1.0),
Seconds (4.0));
88 beaconTiming->AddNeighboursTimingElementUnit (2,
Seconds (2.0),
Seconds (3.0));
89 beaconTiming->AddNeighboursTimingElementUnit (3,
Seconds (3.0),
Seconds (2.0));
90 beaconTiming->AddNeighboursTimingElementUnit (4,
Seconds (4.0),
Seconds (1.0));
96 rann->SetHopcount (2);
98 rann->DecrementTtl ();
100 rann->SetOriginatorAddress (
Mac48Address (
"11:22:33:44:55:66"));
101 rann->SetDestSeqNumber (5);
103 rann->IncrementMetric (2);
109 preq->SetHopcount (0);
112 preq->SetOriginatorAddress (
Mac48Address (
"11:22:33:44:55:66"));
113 preq->SetOriginatorSeqNumber (3);
114 preq->SetLifetime (4);
115 preq->AddDestinationAddressElement (
false,
false,
Mac48Address (
"11:11:11:11:11:11"), 5);
116 preq->AddDestinationAddressElement (
false,
false,
Mac48Address (
"22:22:22:22:22:22"), 6);
122 prep->SetHopcount (11);
124 prep->SetDestinationAddress (
Mac48Address (
"11:22:33:44:55:66"));
125 prep->SetDestinationSeqNumber (123);
126 prep->SetLifetime (5000);
127 prep->SetMetric (4321);
128 prep->SetOriginatorAddress (
Mac48Address (
"33:00:22:00:11:00"));
129 prep->SetOriginatorSeqNumber (666);
137 perr->AddAddressUnit (dest);
140 perr->AddAddressUnit (dest);
143 perr->AddAddressUnit (dest);
151 NS_TEST_ASSERT_MSG_EQ (vector, resultVector,
"Roundtrip serialization of all known information elements works");
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
void AddHeader(const Header &header)
Add header to this packet.
Smart pointer class similar to boost::intrusive_ptr.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ REASON11S_MESH_CAPABILITY_POLICY_VIOLATION
#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.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
structure of unreachable destination - address and sequence number
Mac48Address destination
destination address
uint32_t seqnum
sequence number