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

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

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

+ Inheritance diagram for ns3::Ipv4StaticRoutingHelper:
+ Collaboration diagram for ns3::Ipv4StaticRoutingHelper:

Public Member Functions

 Ipv4StaticRoutingHelper ()
 
 Ipv4StaticRoutingHelper (const Ipv4StaticRoutingHelper &o)
 Construct an Ipv4StaticRoutingHelper from another previously initialized instance (Copy Constructor).
 
void AddMulticastRoute (Ptr< Node > n, Ipv4Address source, Ipv4Address group, Ptr< NetDevice > input, NetDeviceContainer output)
 Add a multicast route to a node and net device using explicit Ptr<Node> and Ptr<NetDevice>
 
void AddMulticastRoute (Ptr< Node > n, Ipv4Address source, Ipv4Address group, std::string inputName, NetDeviceContainer output)
 Add a multicast route to a node and device using a Ptr<Node> and a name string previously associated to the device using the Object Name Service.
 
void AddMulticastRoute (std::string n, Ipv4Address source, Ipv4Address group, Ptr< NetDevice > input, NetDeviceContainer output)
 Add a multicast route to a node and device using a name string previously associated to the node using the Object Name Service and a Ptr<NetDevice>
 
void AddMulticastRoute (std::string nName, Ipv4Address source, Ipv4Address group, std::string inputName, NetDeviceContainer output)
 Add a multicast route to a node and device using name strings previously associated to both the node and device using the Object Name Service.
 
Ipv4StaticRoutingHelperCopy () const override
 
Ptr< Ipv4RoutingProtocolCreate (Ptr< Node > node) const override
 
Ptr< Ipv4StaticRoutingGetStaticRouting (Ptr< Ipv4 > ipv4) const
 Try and find the static routing protocol as either the main routing protocol or in the list of routing protocols associated with the Ipv4 provided.
 
Ipv4StaticRoutingHelperoperator= (const Ipv4StaticRoutingHelper &)=delete
 
void SetDefaultMulticastRoute (Ptr< Node > n, Ptr< NetDevice > nd)
 Add a default route to the static routing protocol to forward packets out a particular interface.
 
void SetDefaultMulticastRoute (Ptr< Node > n, std::string ndName)
 Add a default route to the static routing protocol to forward packets out a particular interface.
 
void SetDefaultMulticastRoute (std::string nName, Ptr< NetDevice > nd)
 Add a default route to the static routing protocol to forward packets out a particular interface.
 
void SetDefaultMulticastRoute (std::string nName, std::string ndName)
 Add a default route to the static routing protocol to forward packets out a particular interface.
 
- Public Member Functions inherited from ns3::Ipv4RoutingHelper
virtual ~Ipv4RoutingHelper ()
 

Additional Inherited Members

- 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::Ipv4StaticRouting objects.

This class is expected to be used in conjunction with ns3::InternetStackHelper::SetRoutingHelper

Definition at line 32 of file ipv4-static-routing-helper.h.

Constructor & Destructor Documentation

◆ Ipv4StaticRoutingHelper() [1/2]

ns3::Ipv4StaticRoutingHelper::Ipv4StaticRoutingHelper ( )

Definition at line 27 of file ipv4-static-routing-helper.cc.

Referenced by Copy().

+ Here is the caller graph for this function:

◆ Ipv4StaticRoutingHelper() [2/2]

ns3::Ipv4StaticRoutingHelper::Ipv4StaticRoutingHelper ( const Ipv4StaticRoutingHelper & o)

Construct an Ipv4StaticRoutingHelper from another previously initialized instance (Copy Constructor).

Parameters
oobject to be copied

Definition at line 31 of file ipv4-static-routing-helper.cc.

Member Function Documentation

◆ AddMulticastRoute() [1/4]

void ns3::Ipv4StaticRoutingHelper::AddMulticastRoute ( Ptr< Node > n,
Ipv4Address source,
Ipv4Address group,
Ptr< NetDevice > input,
NetDeviceContainer output )

Add a multicast route to a node and net device using explicit Ptr<Node> and Ptr<NetDevice>

Parameters
nThe node.
sourceSource address.
groupMulticast group.
inputInput NetDevice.
outputOutput NetDevices.

Definition at line 78 of file ipv4-static-routing-helper.cc.

References ns3::NetDeviceContainer::Begin(), ns3::NetDeviceContainer::End(), GetStaticRouting(), and NS_ASSERT_MSG.

Referenced by AddMulticastRoute(), AddMulticastRoute(), AddMulticastRoute(), CsmaMulticastTestCase::DoRun(), Ipv4DeduplicationPerformanceTest::DoRun(), and Ipv4DeduplicationTest::DoRun().

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

◆ AddMulticastRoute() [2/4]

void ns3::Ipv4StaticRoutingHelper::AddMulticastRoute ( Ptr< Node > n,
Ipv4Address source,
Ipv4Address group,
std::string inputName,
NetDeviceContainer output )

Add a multicast route to a node and device using a Ptr<Node> and a name string previously associated to the device using the Object Name Service.

Parameters
nThe node.
sourceSource address.
groupMulticast group.
inputNameInput NetDevice.
outputOutput NetDevices.

Definition at line 115 of file ipv4-static-routing-helper.cc.

References AddMulticastRoute(), and ns3::Names::Find().

+ Here is the call graph for this function:

◆ AddMulticastRoute() [3/4]

void ns3::Ipv4StaticRoutingHelper::AddMulticastRoute ( std::string n,
Ipv4Address source,
Ipv4Address group,
Ptr< NetDevice > input,
NetDeviceContainer output )

Add a multicast route to a node and device using a name string previously associated to the node using the Object Name Service and a Ptr<NetDevice>

Parameters
nThe node.
sourceSource address.
groupMulticast group.
inputInput NetDevice.
outputOutput NetDevices.

Definition at line 126 of file ipv4-static-routing-helper.cc.

References AddMulticastRoute(), and ns3::Names::Find().

+ Here is the call graph for this function:

◆ AddMulticastRoute() [4/4]

void ns3::Ipv4StaticRoutingHelper::AddMulticastRoute ( std::string nName,
Ipv4Address source,
Ipv4Address group,
std::string inputName,
NetDeviceContainer output )

Add a multicast route to a node and device using name strings previously associated to both the node and device using the Object Name Service.

Parameters
nNameThe node.
sourceSource address.
groupMulticast group.
inputNameInput NetDevice.
outputOutput NetDevices.

Definition at line 137 of file ipv4-static-routing-helper.cc.

References AddMulticastRoute(), and ns3::Names::Find().

+ Here is the call graph for this function:

◆ Copy()

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

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 36 of file ipv4-static-routing-helper.cc.

References Ipv4StaticRoutingHelper().

+ Here is the call graph for this function:

◆ Create()

Ptr< Ipv4RoutingProtocol > ns3::Ipv4StaticRoutingHelper::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 42 of file ipv4-static-routing-helper.cc.

References ns3::CreateObject().

+ Here is the call graph for this function:

◆ GetStaticRouting()

Ptr< Ipv4StaticRouting > ns3::Ipv4StaticRoutingHelper::GetStaticRouting ( Ptr< Ipv4 > ipv4) const

Try and find the static routing protocol as either the main routing protocol or in the list of routing protocols associated with the Ipv4 provided.

Parameters
ipv4the Ptr<Ipv4> to search for the static routing protocol
Returns
Ipv4StaticRouting pointer or 0 if not found

Definition at line 48 of file ipv4-static-routing-helper.cc.

References ns3::DynamicCast(), NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::DhcpClient::AcceptAck(), AddMulticastRoute(), EpcS1uDlTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), Ipv4DeduplicationPerformanceTest::DoRun(), Ipv4DeduplicationTest::DoRun(), Ipv4StaticRoutingSlash32TestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LteCellSelectionTestCase::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteRadioLinkFailureTestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), LteAggregationThroughputScaleTestCase::GetThroughput(), ns3::DhcpClient::LinkStateHandler(), ns3::DhcpClient::RemoveAndStart(), and SetDefaultMulticastRoute().

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

◆ operator=()

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

◆ SetDefaultMulticastRoute() [1/4]

void ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute ( Ptr< Node > n,
Ptr< NetDevice > nd )

Add a default route to the static routing protocol to forward packets out a particular interface.

Functionally equivalent to: route add 224.0.0.0 netmask 240.0.0.0 dev nd

Parameters
nnode
nddevice of the node to add default route

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

References GetStaticRouting(), and NS_ASSERT_MSG.

Referenced by CsmaMulticastTestCase::DoRun(), SetDefaultMulticastRoute(), SetDefaultMulticastRoute(), and SetDefaultMulticastRoute().

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

◆ SetDefaultMulticastRoute() [2/4]

void ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute ( Ptr< Node > n,
std::string ndName )

Add a default route to the static routing protocol to forward packets out a particular interface.

Functionally equivalent to: route add 224.0.0.0 netmask 240.0.0.0 dev nd

Parameters
nnode
ndNamestring with name previously associated to device using the Object Name Service

Definition at line 168 of file ipv4-static-routing-helper.cc.

References ns3::Names::Find(), and SetDefaultMulticastRoute().

+ Here is the call graph for this function:

◆ SetDefaultMulticastRoute() [3/4]

void ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute ( std::string nName,
Ptr< NetDevice > nd )

Add a default route to the static routing protocol to forward packets out a particular interface.

Functionally equivalent to: route add 224.0.0.0 netmask 240.0.0.0 dev nd

Parameters
nNamestring with name previously associated to node using the Object Name Service
nddevice of the node to add default route

Definition at line 175 of file ipv4-static-routing-helper.cc.

References ns3::Names::Find(), and SetDefaultMulticastRoute().

+ Here is the call graph for this function:

◆ SetDefaultMulticastRoute() [4/4]

void ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute ( std::string nName,
std::string ndName )

Add a default route to the static routing protocol to forward packets out a particular interface.

Functionally equivalent to: route add 224.0.0.0 netmask 240.0.0.0 dev nd

Parameters
nNamestring with name previously associated to node using the Object Name Service
ndNamestring with name previously associated to device using the Object Name Service

Definition at line 182 of file ipv4-static-routing-helper.cc.

References ns3::Names::Find(), and SetDefaultMulticastRoute().

+ Here is the call graph for this function:

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