A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::Ipv4GlobalRoutingHelper Class Reference

Helper class that adds ns3::Ipv4GlobalRouting objects. More...

#include "ipv4-global-routing-helper.h"

Inheritance diagram for ns3::Ipv4GlobalRoutingHelper:
Collaboration diagram for ns3::Ipv4GlobalRoutingHelper:

Public Member Functions

 Ipv4GlobalRoutingHelper ()
 Construct a GlobalRoutingHelper to make life easier for managing global routing tasks.
 Ipv4GlobalRoutingHelper (const Ipv4GlobalRoutingHelper &o)
 Construct a GlobalRoutingHelper from another previously initialized instance (Copy Constructor).
Ipv4GlobalRoutingHelperCopy () const override
Ptr< Ipv4RoutingProtocolCreate (Ptr< Node > node) const override
Ipv4GlobalRoutingHelperoperator= (const Ipv4GlobalRoutingHelper &)=delete
Public Member Functions inherited from ns3::Ipv4RoutingHelper
virtual ~Ipv4RoutingHelper ()

Static Public Member Functions

static void PopulateRoutingTables ()
 Build a routing database and initialize the routing tables of the nodes in the simulation.
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 PrintRoute (Ptr< Node > sourceNode, Ipv4Address dest, Ptr< OutputStreamWrapper > stream, bool nodeIdLookup=true, Time::Unit unit=Time::S)
 prints the routing path for a source and destination.
static void PrintRoute (Ptr< Node > sourceNode, Ptr< Node > dest, bool nodeIdLookup=true, Time::Unit unit=Time::S)
 prints the routing path for a source and destination to the standard cout output stream. If the routing path does not exist, it prints that the path does not exist between the nodes in the ostream.
static void PrintRoute (Ptr< Node > sourceNode, Ptr< Node > dest, Ptr< OutputStreamWrapper > stream, bool nodeIdLookup=true, Time::Unit unit=Time::S)
 prints the routing path for a source and destination.
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 output stream.
static void PrintRouteAt (Ptr< Node > sourceNode, Ipv4Address dest, Time printTime, Ptr< OutputStreamWrapper > stream, bool nodeIdLookup=true, Time::Unit unit=Time::S)
 Prints the routing path for the source and destination at a particular time.
static void PrintRouteAt (Ptr< Node > sourceNode, Ptr< Node > 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 output stream.
static void PrintRouteAt (Ptr< Node > sourceNode, Ptr< Node > dest, Time printTime, Ptr< OutputStreamWrapper > stream, 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 output stream.
static void RecomputeRoutingTables ()
 Remove all routes that were previously installed in a prior call to either PopulateRoutingTables() or RecomputeRoutingTables(), and add a new set of routes.
Static Public Member Functions inherited from ns3::Ipv4RoutingHelper
template<class T>
static Ptr< T > GetRouting (Ptr< Ipv4RoutingProtocol > protocol)
 Request a specified routing protocol <T> from Ipv4RoutingProtocol protocol.
static void PrintNeighborCacheAllAt (Time printTime, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
 prints the neighbor cache of all nodes at a particular time.
static void PrintNeighborCacheAllEvery (Time printInterval, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
 prints the neighbor cache of all nodes at regular intervals specified by user.
static void PrintNeighborCacheAt (Time printTime, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
 prints the neighbor cache of a node at a particular time.
static void PrintNeighborCacheEvery (Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
 prints the neighbor cache of a node at regular intervals specified by user.
static void PrintRoutingTableAllAt (Time printTime, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
 prints the routing tables of all nodes at a particular time.
static void PrintRoutingTableAllEvery (Time printInterval, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
 prints the routing tables of all nodes at regular intervals specified by user.
static void PrintRoutingTableAt (Time printTime, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
 prints the routing tables of a node at a particular time.
static void PrintRoutingTableEvery (Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
 prints the routing tables of a node at regular intervals specified by user.

Detailed Description

Helper class that adds ns3::Ipv4GlobalRouting objects.

Definition at line 23 of file ipv4-global-routing-helper.h.

Constructor & Destructor Documentation

◆ Ipv4GlobalRoutingHelper() [1/2]

ns3::Ipv4GlobalRoutingHelper::Ipv4GlobalRoutingHelper ( )

Construct a GlobalRoutingHelper to make life easier for managing global routing tasks.

Definition at line 20 of file ipv4-global-routing-helper.cc.

Referenced by Ipv4GlobalRoutingHelper(), Copy(), and operator=().

Here is the caller graph for this function:

◆ Ipv4GlobalRoutingHelper() [2/2]

ns3::Ipv4GlobalRoutingHelper::Ipv4GlobalRoutingHelper ( const Ipv4GlobalRoutingHelper & o)

Construct a GlobalRoutingHelper from another previously initialized instance (Copy Constructor).

Parameters
oobject to be copied

Definition at line 24 of file ipv4-global-routing-helper.cc.

References Ipv4GlobalRoutingHelper().

Here is the call graph for this function:

Member Function Documentation

◆ Copy()

Ipv4GlobalRoutingHelper * ns3::Ipv4GlobalRoutingHelper::Copy ( ) const
overridevirtual
Returns
pointer to clone of this Ipv4GlobalRoutingHelper

This method is mainly for internal use by the other helpers; clients are expected to free the dynamic memory allocated by this method

Implements ns3::Ipv4RoutingHelper.

Definition at line 29 of file ipv4-global-routing-helper.cc.

References Ipv4GlobalRoutingHelper().

Here is the call graph for this function:

◆ Create()

Ptr< Ipv4RoutingProtocol > ns3::Ipv4GlobalRoutingHelper::Create ( Ptr< Node > node) const
overridevirtual
Parameters
nodethe node on which the routing protocol will run
Returns
a newly-created routing protocol

This method will be called by ns3::InternetStackHelper::Install

Implements ns3::Ipv4RoutingHelper.

Definition at line 35 of file ipv4-global-routing-helper.cc.

References ns3::CreateObject(), and NS_LOG_LOGIC.

Here is the call graph for this function:

◆ operator=()

Ipv4GlobalRoutingHelper & ns3::Ipv4GlobalRoutingHelper::operator= ( const Ipv4GlobalRoutingHelper & )
delete

References Ipv4GlobalRoutingHelper(), and ns3::Time::S.

Here is the call graph for this function:

◆ PopulateRoutingTables()

void ns3::Ipv4GlobalRoutingHelper::PopulateRoutingTables ( )
static

Build a routing database and initialize the routing tables of the nodes in the simulation.

Makes all nodes in the simulation into routers.

All this function does is call the functions BuildGlobalRoutingDatabase () and InitializeRoutes ().

Definition at line 50 of file ipv4-global-routing-helper.cc.

References ns3::GlobalRouteManager::BuildGlobalRoutingDatabase(), and ns3::GlobalRouteManager::InitializeRoutes().

Referenced by BridgeTest::DoRun(), BriteTopologyFunctionTestCase::DoRun(), CsmaStarTestCase::DoRun(), EcmpRouteCalculationTestCase::DoRun(), GlobalRoutingProtocolTestCase::DoRun(), IcmpTimeExceedTestCase::DoRun(), Ipv4DynamicGlobalRoutingTestCase::DoRun(), Ipv4GlobalRoutingSlash32TestCase::DoRun(), LanTest::DoRun(), LinkTest::DoRun(), Ns3TcpCubicTestCase::DoRun(), Ns3TcpLossTestCase::DoRun(), Ns3TcpStateTestCase::DoRun(), TwoBridgeTest::DoRun(), TwoLanTest::DoRun(), TwoLinkTest::DoRun(), and experiment().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintRoute() [1/4]

void ns3::Ipv4GlobalRoutingHelper::PrintRoute ( Ptr< Node > sourceNode,
Ipv4Address dest,
bool nodeIdLookup = true,
Time::Unit unit = Time::S )
static

prints the routing path for a source and destination to the standard cout output stream.

If the routing path does not exist, it prints that the path does not exist between the nodes in the ostream. This is a scheduler for the PrintRoute call.

Parameters
sourceNodethe source node
destthe IPv4 destination address
nodeIdLookupprint the node id
unitthe time unit to be used in the report

This method calls the PrintRoutingPath() method of the Ipv4GlobalRouting for the source and destination to provide the routing path at the specified time. Early return will be triggered if inputs are invalid. for example: if source or destination nodes do not exist, source or destination nodes lack IPv4 instances, or source node lacks a global routing instance. If the destination node has multiple IpAddresses, the routing path will be printed for the first Ip address of the destination Ipv4 Stack.

Definition at line 67 of file ipv4-global-routing-helper.cc.

References ns3::GlobalRouteManager::PrintRoute().

Referenced by PrintRouteAt(), PrintRouteAt(), PrintRouteAt(), and PrintRouteAt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintRoute() [2/4]

void ns3::Ipv4GlobalRoutingHelper::PrintRoute ( Ptr< Node > sourceNode,
Ipv4Address dest,
Ptr< OutputStreamWrapper > stream,
bool nodeIdLookup = true,
Time::Unit unit = Time::S )
static

prints the routing path for a source and destination.

If the routing path does not exist, it prints that the path does not exist between the nodes in the ostream. This is a scheduler for the PrintRoute call.

Parameters
sourceNodethe source node
destthe IPv4 destination address
nodeIdLookupprint the node id
unitthe time unit to be used in the report

This method calls the PrintRoutingPath() method of the Ipv4GlobalRouting for the source and destination to provide the routing path at the specified time. Early return will be triggered if inputs are invalid. for example: if source or destination nodes do not exist, source or destination nodes lack IPv4 instances, or source node lacks a global routing instance. If the destination node has multiple IpAddresses, the routing path will be printed for the first Ip address of the destination Ipv4 Stack.

Parameters
streamthe output stream object to use

Definition at line 57 of file ipv4-global-routing-helper.cc.

References ns3::GlobalRouteManager::PrintRoute().

Here is the call graph for this function:

◆ PrintRoute() [3/4]

void ns3::Ipv4GlobalRoutingHelper::PrintRoute ( Ptr< Node > sourceNode,
Ptr< Node > dest,
bool nodeIdLookup = true,
Time::Unit unit = Time::S )
static

prints the routing path for a source and destination to the standard cout output stream. If the routing path does not exist, it prints that the path does not exist between the nodes in the ostream.

This is a scheduler for the PrintRoute call.

Parameters
sourceNodethe source node
destthe destination node
nodeIdLookupprint the node id
unitthe time unit to be used in the report

This method calls the PrintRoutingPath() method of the Ipv4GlobalRouting for the source and destination to provide the routing path at the specified time. Early return will be triggered if inputs are invalid. for example: if source or destination nodes do not exist, source or destination nodes lack IPv4 instances, or source node lacks a global routing instance. If the destination node has multiple IpAddresses, the routing path will be printed for the first Ip address of the destination Ipv4 Stack.

Definition at line 86 of file ipv4-global-routing-helper.cc.

References ns3::GlobalRouteManager::PrintRoute().

Here is the call graph for this function:

◆ PrintRoute() [4/4]

void ns3::Ipv4GlobalRoutingHelper::PrintRoute ( Ptr< Node > sourceNode,
Ptr< Node > dest,
Ptr< OutputStreamWrapper > stream,
bool nodeIdLookup = true,
Time::Unit unit = Time::S )
static

prints the routing path for a source and destination.

This is a scheduler for the PrintRoute call.

Parameters
sourceNodethe source node
destthe destination node
nodeIdLookupprint the node id
unitthe time unit to be used in the report

This method calls the PrintRoutingPath() method of the Ipv4GlobalRouting for the source and destination to provide the routing path at the specified time. Early return will be triggered if inputs are invalid. for example: if source or destination nodes do not exist, source or destination nodes lack IPv4 instances, or source node lacks a global routing instance. If the destination node has multiple IpAddresses, the routing path will be printed for the first Ip address of the destination Ipv4 Stack.

Parameters
streamthe output stream object to use

Definition at line 76 of file ipv4-global-routing-helper.cc.

References ns3::GlobalRouteManager::PrintRoute().

Here is the call graph for this function:

◆ PrintRouteAt() [1/4]

void ns3::Ipv4GlobalRoutingHelper::PrintRouteAt ( Ptr< Node > sourceNode,
Ipv4Address dest,
Time printTime,
bool nodeIdLookup = true,
Time::Unit unit = Time::S )
static

prints the routing path for the source and destination at a particular time to the standard cout output stream.

If the routing path does not exist, it prints that the path does not exist between the nodes in the ostream. This is a scheduler for the PrintRoute call.

Parameters
sourceNodethe source node
destthe IPv4 destination address
nodeIdLookupprint the node id
unitthe time unit to be used in the report

This method calls the PrintRoutingPath() method of the Ipv4GlobalRouting for the source and destination to provide the routing path at the specified time. Early return will be triggered if inputs are invalid. for example: if source or destination nodes do not exist, source or destination nodes lack IPv4 instances, or source node lacks a global routing instance. If the destination node has multiple IpAddresses, the routing path will be printed for the first Ip address of the destination Ipv4 Stack.

Parameters
printTimethe time at which the routing path should be printed.

Definition at line 114 of file ipv4-global-routing-helper.cc.

References PrintRoute(), and ns3::Simulator::Schedule().

Here is the call graph for this function:

◆ PrintRouteAt() [2/4]

void ns3::Ipv4GlobalRoutingHelper::PrintRouteAt ( Ptr< Node > sourceNode,
Ipv4Address dest,
Time printTime,
Ptr< OutputStreamWrapper > stream,
bool nodeIdLookup = true,
Time::Unit unit = Time::S )
static

Prints the routing path for the source and destination at a particular time.

If the routing path does not exist, it prints that the path does not exist between the nodes in the ostream. This is a scheduler for the PrintRoute call.

Parameters
sourceNodethe source node
destthe IPv4 destination address
nodeIdLookupprint the node id
unitthe time unit to be used in the report

This method calls the PrintRoutingPath() method of the Ipv4GlobalRouting for the source and destination to provide the routing path at the specified time. Early return will be triggered if inputs are invalid. for example: if source or destination nodes do not exist, source or destination nodes lack IPv4 instances, or source node lacks a global routing instance. If the destination node has multiple IpAddresses, the routing path will be printed for the first Ip address of the destination Ipv4 Stack.

Parameters
printTimethe time at which the routing path should be printed.
streamthe output stream object to use

Definition at line 95 of file ipv4-global-routing-helper.cc.

References PrintRoute(), and ns3::Simulator::Schedule().

Here is the call graph for this function:

◆ PrintRouteAt() [3/4]

void ns3::Ipv4GlobalRoutingHelper::PrintRouteAt ( Ptr< Node > sourceNode,
Ptr< Node > dest,
Time printTime,
bool nodeIdLookup = true,
Time::Unit unit = Time::S )
static

prints the routing path for the source and destination at a particular time to the standard cout output stream.

This is a scheduler for the PrintRoute call.

Parameters
sourceNodethe source node
destthe destination node
nodeIdLookupprint the node id
unitthe time unit to be used in the report

This method calls the PrintRoutingPath() method of the Ipv4GlobalRouting for the source and destination to provide the routing path at the specified time. Early return will be triggered if inputs are invalid. for example: if source or destination nodes do not exist, source or destination nodes lack IPv4 instances, or source node lacks a global routing instance. If the destination node has multiple IpAddresses, the routing path will be printed for the first Ip address of the destination Ipv4 Stack.

Parameters
printTimethe time at which the routing path should be printed.

Definition at line 149 of file ipv4-global-routing-helper.cc.

References PrintRoute(), and ns3::Simulator::Schedule().

Here is the call graph for this function:

◆ PrintRouteAt() [4/4]

void ns3::Ipv4GlobalRoutingHelper::PrintRouteAt ( Ptr< Node > sourceNode,
Ptr< Node > dest,
Time printTime,
Ptr< OutputStreamWrapper > stream,
bool nodeIdLookup = true,
Time::Unit unit = Time::S )
static

prints the routing path for the source and destination at a particular time to the standard cout output stream.

This is a scheduler for the PrintRoute call.

Parameters
sourceNodethe source node
destthe destination node
nodeIdLookupprint the node id
unitthe time unit to be used in the report

This method calls the PrintRoutingPath() method of the Ipv4GlobalRouting for the source and destination to provide the routing path at the specified time. Early return will be triggered if inputs are invalid. for example: if source or destination nodes do not exist, source or destination nodes lack IPv4 instances, or source node lacks a global routing instance. If the destination node has multiple IpAddresses, the routing path will be printed for the first Ip address of the destination Ipv4 Stack.

Parameters
printTimethe time at which the routing path should be printed.
streamthe output stream object to use.

Definition at line 130 of file ipv4-global-routing-helper.cc.

References PrintRoute(), and ns3::Simulator::Schedule().

Here is the call graph for this function:

◆ RecomputeRoutingTables()

void ns3::Ipv4GlobalRoutingHelper::RecomputeRoutingTables ( )
static

Remove all routes that were previously installed in a prior call to either PopulateRoutingTables() or RecomputeRoutingTables(), and add a new set of routes.

This method does not change the set of nodes over which GlobalRouting is being used, but it will dynamically update its representation of the global topology before recomputing routes. Users must first call PopulateRoutingTables() and then may subsequently call RecomputeRoutingTables() at any later time in the simulation.

Definition at line 165 of file ipv4-global-routing-helper.cc.

References ns3::GlobalRouteManager::BuildGlobalRoutingDatabase(), ns3::GlobalRouteManager::DeleteGlobalRoutes(), and ns3::GlobalRouteManager::InitializeRoutes().

Here is the call graph for this function:

The documentation for this class was generated from the following files: