24#include "ns3/candidate-queue.h"
25#include "ns3/global-route-manager-impl.h"
26#include "ns3/simulator.h"
48 void DoRun()
override;
52 :
TestCase(
"GlobalRouteManagerImplTestCase")
61 for (
int i = 0; i < 100; ++i)
68 for (
int i = 0; i < 100; ++i)
201 "The Ipv4Address is not stored as the link state ID");
239 :
TestSuite(
"global-route-manager-impl", UNIT)
Global Route Manager Test.
GlobalRouteManagerImplTestCase()
void DoRun() override
Implementation to actually run this TestCase.
Global Route Manager TestSuite.
GlobalRouteManagerImplTestSuite()
A Candidate Queue used in routing calculations.
SPFVertex * Pop()
Pop the Shortest Path First Vertex pointer at the top of the queue.
void Push(SPFVertex *vNew)
Push a Shortest Path First Vertex pointer onto the queue according to the priority scheme.
A global router implementation.
void DebugUseLsdb(GlobalRouteManagerLSDB *lsdb)
Debugging routine; allow client code to supply a pre-built LSDB.
void DebugSPFCalculate(Ipv4Address root)
Debugging routine; call the core SPF from the unit tests.
The Link State DataBase (LSDB) of the Global Route Manager.
GlobalRoutingLSA * GetLSA(Ipv4Address addr) const
Look up the Link State Advertisement associated with the given link state ID (address).
void Insert(Ipv4Address addr, GlobalRoutingLSA *lsa)
Insert an IP address / Link State Advertisement pair into the Link State Database.
a Link State Advertisement (LSA) for a router, used in global routing.
uint32_t AddLinkRecord(GlobalRoutingLinkRecord *lr)
Add a given Global Routing Link Record to the LSA.
void SetLSType(LSType typ)
Set the LS type field of the LSA.
void SetAdvertisingRouter(Ipv4Address rtr)
Set the Advertising Router as defined by the OSPF spec.
void SetLinkStateId(Ipv4Address addr)
Set the Link State ID is defined by the OSPF spec.
Ipv4Address GetLinkStateId() const
Get the Link State ID as defined by the OSPF spec.
A single link record for a link state advertisement.
@ StubNetwork
Record represents a leaf node network.
@ PointToPoint
Record representing a point to point channel.
Vertex used in shortest path first (SPF) computations.
void SetDistanceFromRoot(uint32_t distance)
Set the distance from the root vertex to "this" SPFVertex object.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
static GlobalRouteManagerImplTestSuite g_globalRoutingManagerImplTestSuite
Static variable for test initialization.
#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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.