10#include "ns3/global-router-interface.h"
11#include "ns3/ipv4-global-routing.h"
12#include "ns3/ipv4-list-routing.h"
37 NS_LOG_LOGIC(
"Adding GlobalRouter interface to node " << node->GetId());
40 node->AggregateObject(globalRouter);
42 NS_LOG_LOGIC(
"Adding GlobalRouting Protocol to node " << node->GetId());
44 globalRouter->SetRoutingProtocol(globalRouting);
static void DeleteGlobalRoutes()
Delete all static routes on all nodes that have a GlobalRouterInterface.
static void PrintRoute(Ptr< Node > sourceNode, Ipv4Address dest, Ptr< OutputStreamWrapper > stream, bool nodeIdLookup=true, Time::Unit unit=Time::S)
prints the path from this node to the destination node at a particular time.
static void InitializeRoutes()
Compute routes using a Dijkstra SPF computation and populate per-node forwarding tables.
static void BuildGlobalRoutingDatabase()
Build the routing database by gathering Link State Advertisements from each node exporting a GlobalRo...
Ipv4 addresses are stored in host order in this class.
Helper class that adds ns3::Ipv4GlobalRouting objects.
static void PrintRouteAt(Ptr< Node > sourceNode, Ipv4Address dest, Time printTime, bool nodeIdLookup=true, Time::Unit unit=Time::S)
prints the routing path for the source and destination at a particular time to the standard cout outp...
static void PrintRoute(Ptr< Node > sourceNode, Ipv4Address dest, bool nodeIdLookup=true, Time::Unit unit=Time::S)
prints the routing path for a source and destination to the standard cout output stream.
static void PopulateRoutingTables()
Build a routing database and initialize the routing tables of the nodes in the simulation.
static void RecomputeRoutingTables()
Remove all routes that were previously installed in a prior call to either PopulateRoutingTables() or...
Ptr< Ipv4RoutingProtocol > Create(Ptr< Node > node) const override
Ipv4GlobalRoutingHelper()
Construct a GlobalRoutingHelper to make life easier for managing global routing tasks.
Ipv4GlobalRoutingHelper * Copy() const override
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.
Simulation virtual time values and global simulation resolution.
Unit
The unit to use to interpret a number representing time.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Every class exported by the ns3 library is enclosed in the ns3 namespace.