A Discrete-Event Network Simulator
API
ns3::Ipv4RoutingHelper Class Referenceabstract

a factory to create ns3::Ipv4RoutingProtocol objects More...

#include "ipv4-routing-helper.h"

+ Inheritance diagram for ns3::Ipv4RoutingHelper:

Public Member Functions

virtual ~Ipv4RoutingHelper ()
 
virtual Ipv4RoutingHelperCopy (void) const =0
 virtual constructor More...
 
virtual Ptr< Ipv4RoutingProtocolCreate (Ptr< Node > node) const =0
 

Static Public Member Functions

template<class T >
static Ptr< T > GetRouting (Ptr< Ipv4RoutingProtocol > protocol)
 Request a specified routing protocol <T> from Ipv4RoutingProtocol protocol. More...
 
static void PrintNeighborCacheAllAt (Time printTime, Ptr< OutputStreamWrapper > stream)
 prints the neighbor cache of all nodes at a particular time. More...
 
static void PrintNeighborCacheAllEvery (Time printInterval, Ptr< OutputStreamWrapper > stream)
 prints the neighbor cache of all nodes at regular intervals specified by user. More...
 
static void PrintNeighborCacheAt (Time printTime, Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
 prints the neighbor cache of a node at a particular time. More...
 
static void PrintNeighborCacheEvery (Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
 prints the neighbor cache of a node at regular intervals specified by user. More...
 
static void PrintRoutingTableAllAt (Time printTime, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
 prints the routing tables of all nodes at a particular time. More...
 
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. More...
 
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. More...
 
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. More...
 

Static Private Member Functions

static void Print (Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
 prints the routing tables of a node. More...
 
static void PrintArpCache (Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
 prints the neighbor cache of a node. More...
 
static void PrintArpCacheEvery (Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
 prints the neighbor cache of a node at regular intervals specified by user. More...
 
static void PrintEvery (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. More...
 

Detailed Description

a factory to create ns3::Ipv4RoutingProtocol objects

For each new routing protocol created as a subclass of ns3::Ipv4RoutingProtocol, you need to create a subclass of ns3::Ipv4RoutingHelper which can be used by ns3::InternetStackHelper::SetRoutingHelper and ns3::InternetStackHelper::Install.

Definition at line 45 of file ipv4-routing-helper.h.

Constructor & Destructor Documentation

ns3::Ipv4RoutingHelper::~Ipv4RoutingHelper ( )
virtual

Definition at line 34 of file ipv4-routing-helper.cc.

Member Function Documentation

virtual Ipv4RoutingHelper* ns3::Ipv4RoutingHelper::Copy ( void  ) const
pure virtual

virtual constructor

Returns
pointer to clone of this Ipv4RoutingHelper

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

Implemented in ns3::RipHelper, ns3::Ipv4ListRoutingHelper, ns3::Ipv4StaticRoutingHelper, ns3::OlsrHelper, ns3::Ipv4NixVectorHelper, ns3::DsdvHelper, ns3::DsdvqHelper, ns3::Ipv4GlobalRoutingHelper, ns3::AodvHelper, and ns3::AodvqHelper.

Referenced by ns3::Ipv4ListRoutingHelper::Add(), ns3::InternetStackHelper::InternetStackHelper(), ns3::InternetStackHelper::operator=(), ns3::InternetStackHelper::SetRoutingHelper(), and ns3::QKDHelper::SetRoutingHelper().

+ Here is the caller graph for this function:

virtual Ptr<Ipv4RoutingProtocol> ns3::Ipv4RoutingHelper::Create ( Ptr< Node node) const
pure virtual
Parameters
nodethe node within which the new routing protocol will run
Returns
a newly-created routing protocol

Implemented in ns3::Ipv4ListRoutingHelper, ns3::OlsrHelper, ns3::RipHelper, ns3::Ipv4StaticRoutingHelper, ns3::Ipv4NixVectorHelper, ns3::DsdvHelper, ns3::DsdvqHelper, ns3::Ipv4GlobalRoutingHelper, ns3::AodvHelper, and ns3::AodvqHelper.

Referenced by ns3::InternetStackHelper::Install(), and ns3::QKDHelper::InstallOverlayQKD().

+ Here is the caller graph for this function:

template<class T >
Ptr< T > ns3::Ipv4RoutingHelper::GetRouting ( Ptr< Ipv4RoutingProtocol protocol)
static

Request a specified routing protocol <T> from Ipv4RoutingProtocol protocol.

If protocol is Ipv4ListRouting, then protocol will be searched in the list, otherwise a simple DynamicCast will be performed

Parameters
protocolSmart pointer to Ipv4RoutingProtocol object
Returns
a Smart Pointer to the requested protocol (zero if the protocol can't be found)

Definition at line 261 of file ipv4-routing-helper.h.

void ns3::Ipv4RoutingHelper::Print ( Ptr< Node node,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
staticprivate

prints the routing tables of a node.

Parameters
nodeThe node ptr for which we need the routing table to be printed
streamThe output stream object to use
unitThe time unit to be used in the report

This method calls the PrintRoutingTable() method of the Ipv4RoutingProtocol stored in the Ipv4 object; the output format is routing protocol-specific.

Definition at line 71 of file ipv4-routing-helper.cc.

References ns3::Object::GetObject(), and NS_ASSERT.

Referenced by PrintRoutingTableAllAt(), and PrintRoutingTableAt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv4RoutingHelper::PrintArpCache ( Ptr< Node node,
Ptr< OutputStreamWrapper stream 
)
staticprivate

prints the neighbor cache of a node.

Parameters
nodeThe node ptr for which we need the neighbor cache to be printed
streamThe output stream object to use

This method calls the PrintArpCache() method of the ArpCache associated with each Ipv4Interface stored in the Ipv4 object, for all nodes at the specified time. The output format is similar to:

10.1.1.2 dev 1 lladdr 00-06-00:00:00:00:00:02 REACHABLE

Note that the MAC address is printed as "type"-"size"-"actual address"

Definition at line 128 of file ipv4-routing-helper.cc.

References ns3::Names::FindName(), ns3::Node::GetId(), ns3::Object::GetObject(), ns3::Time::GetSeconds(), ns3::OutputStreamWrapper::GetStream(), ns3::Simulator::Now(), and ns3::ArpCache::PrintArpCache().

Referenced by PrintNeighborCacheAllAt(), and PrintNeighborCacheAt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv4RoutingHelper::PrintArpCacheEvery ( Time  printInterval,
Ptr< Node node,
Ptr< OutputStreamWrapper stream 
)
staticprivate

prints the neighbor cache of a node at regular intervals specified by user.

Parameters
printIntervalthe time interval for which the neighbor cache is supposed to be printed.
nodeThe node ptr for which we need the neighbor cache to be printed
streamThe output stream object to use

This method calls the PrintArpCache() method of the ArpCache associated with each Ipv4Interface stored in the Ipv4 object, for all nodes at the specified time. The output format is similar to:

10.1.1.2 dev 1 lladdr 00-06-00:00:00:00:00:02 REACHABLE

Note that the MAC address is printed as "type"-"size"-"actual address"

Definition at line 159 of file ipv4-routing-helper.cc.

References ns3::Names::FindName(), ns3::Node::GetId(), ns3::Object::GetObject(), ns3::Time::GetSeconds(), ns3::OutputStreamWrapper::GetStream(), ns3::Simulator::Now(), ns3::ArpCache::PrintArpCache(), and ns3::Simulator::Schedule().

Referenced by PrintNeighborCacheAllEvery(), and PrintNeighborCacheEvery().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv4RoutingHelper::PrintEvery ( Time  printInterval,
Ptr< Node node,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
staticprivate

prints the routing tables of a node at regular intervals specified by user.

Parameters
printIntervalthe time interval for which the routing table is supposed to be printed.
nodeThe node ptr for which we need the routing table to be printed
streamThe output stream object to use
unitThe time unit to be used in the report

This method calls the PrintRoutingTable() method of the Ipv4RoutingProtocol stored in the Ipv4 object, for the selected node at the specified interval; the output format is routing protocol-specific.

Definition at line 83 of file ipv4-routing-helper.cc.

References ns3::Object::GetObject(), NS_ASSERT, and ns3::Simulator::Schedule().

Referenced by PrintRoutingTableAllEvery(), and PrintRoutingTableEvery().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv4RoutingHelper::PrintNeighborCacheAllAt ( Time  printTime,
Ptr< OutputStreamWrapper stream 
)
static

prints the neighbor cache of all nodes at a particular time.

Parameters
printTimethe time at which the neighbor cache is supposed to be printed.
streamThe output stream object to use

This method calls the PrintArpCache() method of the ArpCache associated with each Ipv4Interface stored in the Ipv4 object, for all nodes at the specified time. The output format is similar to:

10.1.1.2 dev 1 lladdr 00-06-00:00:00:00:00:02 REACHABLE

Note that the MAC address is printed as "type"-"size"-"actual address"

Definition at line 96 of file ipv4-routing-helper.cc.

References ns3::NodeList::GetNNodes(), ns3::NodeList::GetNode(), PrintArpCache(), and ns3::Simulator::Schedule().

+ Here is the call graph for this function:

void ns3::Ipv4RoutingHelper::PrintNeighborCacheAllEvery ( Time  printInterval,
Ptr< OutputStreamWrapper stream 
)
static

prints the neighbor cache of all nodes at regular intervals specified by user.

Parameters
printIntervalthe time interval for which the neighbor cache is supposed to be printed.
streamThe output stream object to use

This method calls the PrintArpCache() method of the ArpCache associated with each Ipv4Interface stored in the Ipv4 object, for all nodes at the specified time. The output format is similar to:

10.1.1.2 dev 1 lladdr 00-06-00:00:00:00:00:02 REACHABLE

Note that the MAC address is printed as "type"-"size"-"actual address"

Definition at line 106 of file ipv4-routing-helper.cc.

References ns3::NodeList::GetNNodes(), ns3::NodeList::GetNode(), PrintArpCacheEvery(), and ns3::Simulator::Schedule().

Referenced by GenerateTraffic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv4RoutingHelper::PrintNeighborCacheAt ( Time  printTime,
Ptr< Node node,
Ptr< OutputStreamWrapper stream 
)
static

prints the neighbor cache of a node at a particular time.

Parameters
printTimethe time at which the neighbor cache is supposed to be printed.
nodeThe node ptr for which we need the neighbor cache to be printed
streamThe output stream object to use

This method calls the PrintArpCache() method of the ArpCache associated with each Ipv4Interface stored in the Ipv4 object, for all nodes at the specified time. The output format is similar to:

10.1.1.2 dev 1 lladdr 00-06-00:00:00:00:00:02 REACHABLE

Note that the MAC address is printed as "type"-"size"-"actual address"

Definition at line 116 of file ipv4-routing-helper.cc.

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

+ Here is the call graph for this function:

void ns3::Ipv4RoutingHelper::PrintNeighborCacheEvery ( Time  printInterval,
Ptr< Node node,
Ptr< OutputStreamWrapper stream 
)
static

prints the neighbor cache of a node at regular intervals specified by user.

Parameters
printIntervalthe time interval for which the neighbor cache is supposed to be printed.
nodeThe node ptr for which we need the neighbor cache to be printed
streamThe output stream object to use

This method calls the PrintArpCache() method of the ArpCache associated with each Ipv4Interface stored in the Ipv4 object, for all nodes at the specified time. The output format is similar to:

10.1.1.2 dev 1 lladdr 00-06-00:00:00:00:00:02 REACHABLE

Note that the MAC address is printed as "type"-"size"-"actual address"

Definition at line 122 of file ipv4-routing-helper.cc.

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

+ Here is the call graph for this function:

void ns3::Ipv4RoutingHelper::PrintRoutingTableAllAt ( Time  printTime,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
static

prints the routing tables of all nodes at a particular time.

Parameters
printTimethe time at which the routing table is supposed to be printed.
streamThe output stream object to use
unitThe time unit to be used in the report

This method calls the PrintRoutingTable() method of the Ipv4RoutingProtocol stored in the Ipv4 object, for all nodes at the specified time; the output format is routing protocol-specific.

Definition at line 39 of file ipv4-routing-helper.cc.

References ns3::NodeList::GetNNodes(), ns3::NodeList::GetNode(), Print(), and ns3::Simulator::Schedule().

Referenced by AodvExample::InstallInternetStack(), AodvqExample::InstallInternetStack(), DsdvqManetExample::InstallInternetStack(), DsdvManetExample::InstallInternetStack(), and RoutingHelper::SetupRoutingProtocol().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv4RoutingHelper::PrintRoutingTableAllEvery ( Time  printInterval,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
static

prints the routing tables of all nodes at regular intervals specified by user.

Parameters
printIntervalthe time interval for which the routing table is supposed to be printed.
streamThe output stream object to use
unitThe time unit to be used in the report

This method calls the PrintRoutingTable() method of the Ipv4RoutingProtocol stored in the Ipv4 object, for all nodes at the specified time interval; the output format is routing protocol-specific.

Definition at line 49 of file ipv4-routing-helper.cc.

References ns3::NodeList::GetNNodes(), ns3::NodeList::GetNode(), PrintEvery(), and ns3::Simulator::Schedule().

Referenced by GenerateTraffic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv4RoutingHelper::PrintRoutingTableAt ( Time  printTime,
Ptr< Node node,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
static

prints the routing tables of a node at a particular time.

Parameters
printTimethe time at which the routing table is supposed to be printed.
nodeThe node ptr for which we need the routing table to be printed
streamThe output stream object to use
unitThe time unit to be used in the report

This method calls the PrintRoutingTable() method of the Ipv4RoutingProtocol stored in the Ipv4 object, for the selected node at the specified time; the output format is routing protocol-specific.

Definition at line 59 of file ipv4-routing-helper.cc.

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

Referenced by TearDownLink().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv4RoutingHelper::PrintRoutingTableEvery ( Time  printInterval,
Ptr< Node node,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
static

prints the routing tables of a node at regular intervals specified by user.

Parameters
printIntervalthe time interval for which the routing table is supposed to be printed.
nodeThe node ptr for which we need the routing table to be printed
streamThe output stream object to use
unitThe time unit to be used in the report

This method calls the PrintRoutingTable() method of the Ipv4RoutingProtocol stored in the Ipv4 object, for the selected node at the specified interval; the output format is routing protocol-specific.

Definition at line 65 of file ipv4-routing-helper.cc.

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

+ Here is the call graph for this function:


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