A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::Ipv6RoutingHelper Class Referenceabstract

A factory to create ns3::Ipv6RoutingProtocol objects. More...

#include "ipv6-routing-helper.h"

+ Inheritance diagram for ns3::Ipv6RoutingHelper:

Public Member Functions

virtual ~Ipv6RoutingHelper ()
 Destroy an Ipv6 Ipv6RoutingHelper.
 
virtual Ipv6RoutingHelperCopy () const =0
 virtual constructor
 
virtual Ptr< Ipv6RoutingProtocolCreate (Ptr< Node > node) const =0
 

Static Public Member Functions

template<class T >
static Ptr< T > GetRouting (Ptr< Ipv6RoutingProtocol > protocol)
 Request a specified routing protocol <T> from Ipv6RoutingProtocol 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.
 

Static Private Member Functions

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

Detailed Description

A factory to create ns3::Ipv6RoutingProtocol objects.

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

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

Constructor & Destructor Documentation

◆ ~Ipv6RoutingHelper()

ns3::Ipv6RoutingHelper::~Ipv6RoutingHelper ( )
virtual

Destroy an Ipv6 Ipv6RoutingHelper.

Definition at line 35 of file ipv6-routing-helper.cc.

Member Function Documentation

◆ Copy()

virtual Ipv6RoutingHelper * ns3::Ipv6RoutingHelper::Copy ( ) const
pure virtual

virtual constructor

Returns
pointer to clone of this Ipv6RoutingHelper

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::Ipv6ListRoutingHelper, ns3::Ipv6StaticRoutingHelper, and ns3::RipNgHelper.

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

+ Here is the caller graph for this function:

◆ Create()

virtual Ptr< Ipv6RoutingProtocol > ns3::Ipv6RoutingHelper::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::Ipv6ListRoutingHelper, ns3::Ipv6StaticRoutingHelper, and ns3::RipNgHelper.

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

+ Here is the caller graph for this function:

◆ GetRouting()

template<class T >
Ptr< T > ns3::Ipv6RoutingHelper::GetRouting ( Ptr< Ipv6RoutingProtocol protocol)
static

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

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

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

Definition at line 289 of file ipv6-routing-helper.h.

◆ Print()

void ns3::Ipv6RoutingHelper::Print ( Ptr< Node node,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit 
)
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 Ipv6RoutingProtocol stored in the Ipv6 object; the output format is routing protocol-specific.

Definition at line 92 of file ipv6-routing-helper.cc.

References NS_ASSERT.

Referenced by PrintRoutingTableAllAt(), and PrintRoutingTableAt().

+ Here is the caller graph for this function:

◆ PrintEvery()

void ns3::Ipv6RoutingHelper::PrintEvery ( Time  printInterval,
Ptr< Node node,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit 
)
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 Ipv6RoutingProtocol stored in the Ipv6 object, for the selected node at the specified interval; the output format is routing protocol-specific.

Definition at line 104 of file ipv6-routing-helper.cc.

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

Referenced by PrintEvery(), PrintRoutingTableAllEvery(), and PrintRoutingTableEvery().

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

◆ PrintNdiscCache()

void ns3::Ipv6RoutingHelper::PrintNdiscCache ( Ptr< Node node,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
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
unitThe time unit to be used in the report

This method calls the PrintNdiscCache() method of the NdiscCache associated with each Ipv6Interface stored in the Ipv6 object, for all nodes at the specified time. The output format is similar to:

2001:db8::f00d:beef:cafe 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 177 of file ipv6-routing-helper.cc.

References ns3::Time::As(), ns3::Names::FindName(), and ns3::Simulator::Now().

Referenced by PrintNeighborCacheAllAt(), and PrintNeighborCacheAt().

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

◆ PrintNdiscCacheEvery()

void ns3::Ipv6RoutingHelper::PrintNdiscCacheEvery ( Time  printInterval,
Ptr< Node node,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
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
unitThe time unit to be used in the report

This method calls the PrintNdiscCache() method of the NdiscCache associated with each Ipv6Interface stored in the Ipv6 object, for all nodes at the specified time. The output format is similar to:

  2001:db8::f00d:beef:cafe 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 210 of file ipv6-routing-helper.cc.

References ns3::Time::As(), ns3::Names::FindName(), ns3::Simulator::Now(), PrintNdiscCacheEvery(), and ns3::Simulator::Schedule().

Referenced by PrintNdiscCacheEvery(), PrintNeighborCacheAllEvery(), and PrintNeighborCacheEvery().

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

◆ PrintNeighborCacheAllAt()

void ns3::Ipv6RoutingHelper::PrintNeighborCacheAllAt ( Time  printTime,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
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
unitThe time unit to be used in the report

This method calls the PrintNdiscCache() method of the NdiscCache associated with each Ipv6Interface stored in the Ipv6 object, for all nodes at the specified time. The output format is similar to:

2001:db8::f00d:beef:cafe 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 125 of file ipv6-routing-helper.cc.

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

Referenced by DynamicNeighborCacheTest::DoRun(), ChannelTest::DoRun(), NetDeviceContainerTest::DoRun(), InterfaceContainerTest::DoRun(), FlushTest::DoRun(), DuplicateTest::DoRun(), DynamicPartialTest::DoRun(), and NeighborCacheExample::Run().

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

◆ PrintNeighborCacheAllEvery()

void ns3::Ipv6RoutingHelper::PrintNeighborCacheAllEvery ( Time  printInterval,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
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
unitThe time unit to be used in the report

This method calls the PrintNdiscCache() method of the NdiscCache associated with each Ipv6Interface stored in the Ipv6 object, for all nodes at the specified time. The output format is similar to:

  2001:db8::f00d:beef:cafe 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 137 of file ipv6-routing-helper.cc.

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

+ Here is the call graph for this function:

◆ PrintNeighborCacheAt()

void ns3::Ipv6RoutingHelper::PrintNeighborCacheAt ( Time  printTime,
Ptr< Node node,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
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
unitThe time unit to be used in the report

This method calls the PrintNdiscCache() method of the NdiscCache associated with each Ipv6Interface stored in the Ipv6 object, for all nodes at the specified time. The output format is similar to:

2001:db8::f00d:beef:cafe 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 154 of file ipv6-routing-helper.cc.

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

+ Here is the call graph for this function:

◆ PrintNeighborCacheEvery()

void ns3::Ipv6RoutingHelper::PrintNeighborCacheEvery ( Time  printInterval,
Ptr< Node node,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
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
unitThe time unit to be used in the report

This method calls the PrintNdiscCache() method of the NdiscCache associated with each Ipv6Interface stored in the Ipv6 object, for all nodes at the specified time. The output format is similar to:

  2001:db8::f00d:beef:cafe 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 163 of file ipv6-routing-helper.cc.

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

+ Here is the call graph for this function:

◆ PrintRoutingTableAllAt()

void ns3::Ipv6RoutingHelper::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 Ipv6RoutingProtocol stored in the Ipv6 object, for all nodes at the specified time; the output format is routing protocol-specific.

Definition at line 40 of file ipv6-routing-helper.cc.

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

+ Here is the call graph for this function:

◆ PrintRoutingTableAllEvery()

void ns3::Ipv6RoutingHelper::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 Ipv6RoutingProtocol stored in the Ipv6 object, for all nodes at the specified time interval; the output format is routing protocol-specific.

Definition at line 52 of file ipv6-routing-helper.cc.

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

+ Here is the call graph for this function:

◆ PrintRoutingTableAt()

void ns3::Ipv6RoutingHelper::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 Ipv6RoutingProtocol stored in the Ipv6 object, for the selected node at the specified time; the output format is routing protocol-specific.

Definition at line 69 of file ipv6-routing-helper.cc.

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

+ Here is the call graph for this function:

◆ PrintRoutingTableEvery()

void ns3::Ipv6RoutingHelper::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 Ipv6RoutingProtocol stored in the Ipv6 object, for the selected node at the specified interval; the output format is routing protocol-specific.

Definition at line 78 of file ipv6-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: