19#include "ns3/boolean.h"
20#include "ns3/double.h"
21#include "ns3/dsdv-helper.h"
22#include "ns3/dsdv-packet.h"
23#include "ns3/dsdv-rtable.h"
24#include "ns3/internet-stack-helper.h"
25#include "ns3/ipv4-address-helper.h"
26#include "ns3/mesh-helper.h"
27#include "ns3/mobility-helper.h"
28#include "ns3/pcap-file.h"
29#include "ns3/simulator.h"
30#include "ns3/string.h"
32#include "ns3/uinteger.h"
53 void DoRun()
override;
57 :
TestCase(
"Verifying the DSDV header")
75 packet->AddHeader(hdr1);
80 packet->AddHeader(hdr2);
86 packet->RemoveHeader(hdr2);
92 packet->RemoveHeader(hdr1);
110 void DoRun()
override;
114 :
TestCase(
"Dsdv Routing Table test case")
DSDV routing table tests (adding and looking up routes)
void DoRun() override
Implementation to actually run this TestCase.
~DsdvTableTestCase() override
Ipv4 addresses are stored in host order in this class.
a class to store IPv4 address information on an interface
Ipv4Address GetLocal() const
Get the local address.
Ipv4Address GetBroadcast() const
Get the broadcast address.
a class to represent an Ipv4 address mask
Smart pointer class similar to boost::intrusive_ptr.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static constexpr auto UNIT
Ipv4Address GetDestination() const
Get destination IP address.
Ipv4InterfaceAddress GetInterface() const
Get interface address.
uint32_t GetSeqNo() const
Get sequence number.
uint32_t GetHop() const
Get hop.
The Routing table used by DSDV protocol.
bool LookupRoute(Ipv4Address dst, RoutingTableEntry &rt)
Lookup routing table entry with destination address dst.
bool AddRoute(RoutingTableEntry &r)
Add routing table entry if it doesn't yet exist in routing table.
uint32_t RoutingTableSize()
Provides the number of routes present in that nodes routing table.
DsdvTestSuite g_dsdvTestSuite
the test suite
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.