A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::Ipv4RoutingHelper Class Reference

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
virtual Ptr< Ipv4RoutingProtocolCreate (Ptr< Node > node) const =0
void PrintRoutingTableAllAt (Time printTime, Ptr< OutputStreamWrapper > stream) const
 prints the routing tables of all nodes at a particular time.
void PrintRoutingTableAllEvery (Time printInterval, Ptr< OutputStreamWrapper > stream) const
 prints the routing tables of all nodes at regular intervals specified by user.
void PrintRoutingTableAt (Time printTime, Ptr< Node > node, Ptr< OutputStreamWrapper > stream) const
 prints the routing tables of a node at a particular time.
void PrintRoutingTableEvery (Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream) const
 prints the routing tables of a node at regular intervals specified by user.

Private Member Functions

void Print (Ptr< Node > node, Ptr< OutputStreamWrapper > stream) const
void PrintEvery (Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream) const

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 41 of file ipv4-routing-helper.h.

Constructor & Destructor Documentation

ns3::Ipv4RoutingHelper::~Ipv4RoutingHelper ( )
virtual

Definition at line 28 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::Ipv4ListRoutingHelper, ns3::Ipv4StaticRoutingHelper, ns3::OlsrHelper, ns3::Ipv4NixVectorHelper, ns3::DsdvHelper, ns3::Ipv4GlobalRoutingHelper, and ns3::AodvHelper.

Referenced by ns3::Ipv4ListRoutingHelper::Add(), ns3::InternetStackHelper::InternetStackHelper(), ns3::InternetStackHelper::operator=(), and ns3::InternetStackHelper::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::Ipv4StaticRoutingHelper, ns3::DsdvHelper, ns3::Ipv4NixVectorHelper, ns3::Ipv4GlobalRoutingHelper, and ns3::AodvHelper.

Referenced by ns3::InternetStackHelper::Install().

+ Here is the caller graph for this function:

void ns3::Ipv4RoutingHelper::Print ( Ptr< Node node,
Ptr< OutputStreamWrapper stream 
) const
private

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

References ns3::Object::GetObject(), ns3::Ipv4::GetRoutingProtocol(), 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::PrintEvery ( Time  printInterval,
Ptr< Node node,
Ptr< OutputStreamWrapper stream 
) const
private

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

References ns3::Object::GetObject(), ns3::Ipv4::GetRoutingProtocol(), 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::PrintRoutingTableAllAt ( Time  printTime,
Ptr< OutputStreamWrapper stream 
) const

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

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

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

Referenced by AodvExample::InstallInternetStack(), and DsdvManetExample::InstallInternetStack().

+ 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 
) const

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

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

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

+ Here is the call graph for this function:

void ns3::Ipv4RoutingHelper::PrintRoutingTableAt ( Time  printTime,
Ptr< Node node,
Ptr< OutputStreamWrapper stream 
) const

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

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

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

+ Here is the call graph for this function:

void ns3::Ipv4RoutingHelper::PrintRoutingTableEvery ( Time  printInterval,
Ptr< Node node,
Ptr< OutputStreamWrapper stream 
) const

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

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 59 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: