a factory to create ns3::Ipv4RoutingProtocol objects More...
#include "ipv4-routing-helper.h"
Public Member Functions | |
virtual | ~Ipv4RoutingHelper () |
virtual Ipv4RoutingHelper * | Copy () const =0 |
virtual constructor | |
virtual Ptr< Ipv4RoutingProtocol > | Create (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. | |
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=Time::S) |
prints the routing tables of a node. | |
static void | PrintArpCache (Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) |
prints the neighbor cache of a node. | |
static void | PrintArpCacheEvery (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 | 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. | |
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 34 of file ipv4-routing-helper.h.
|
virtual |
Definition at line 24 of file ipv4-routing-helper.cc.
|
pure virtual |
virtual constructor
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::AodvHelper, ns3::DsdvHelper, ns3::Ipv4GlobalRoutingHelper, ns3::Ipv4ListRoutingHelper, ns3::Ipv4StaticRoutingHelper, ns3::OlsrHelper, and ns3::RipHelper.
Referenced by ns3::InternetStackHelper::InternetStackHelper(), ns3::Ipv4ListRoutingHelper::Add(), ns3::InternetStackHelper::operator=(), and ns3::InternetStackHelper::SetRoutingHelper().
|
pure virtual |
node | the node within which the new routing protocol will run |
Implemented in ns3::AodvHelper, ns3::DsdvHelper, ns3::Ipv4GlobalRoutingHelper, ns3::Ipv4ListRoutingHelper, ns3::Ipv4StaticRoutingHelper, ns3::OlsrHelper, and ns3::RipHelper.
Referenced by ns3::InternetStackHelper::Install().
|
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
protocol | Smart pointer to Ipv4RoutingProtocol object |
Definition at line 278 of file ipv4-routing-helper.h.
References ns3::DynamicCast(), and GetRouting().
Referenced by Ipv4ForwardingTest::DoRun(), Ipv4RipCountToInfinityTest::DoRun(), Ipv4RipTest::DoRun(), and GetRouting().
|
staticprivate |
prints the routing tables of a node.
node | The node ptr for which we need the routing table to be printed |
stream | The output stream object to use |
unit | The 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 81 of file ipv4-routing-helper.cc.
References NS_ASSERT.
Referenced by PrintRoutingTableAllAt(), and PrintRoutingTableAt().
|
staticprivate |
prints the neighbor cache of a node.
node | The node ptr for which we need the neighbor cache to be printed |
stream | The output stream object to use |
unit | The time unit to be used in the report |
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 166 of file ipv4-routing-helper.cc.
References ns3::Names::FindName(), ns3::Time::GetSeconds(), and ns3::Simulator::Now().
Referenced by PrintNeighborCacheAllAt(), and PrintNeighborCacheAt().
|
staticprivate |
prints the neighbor cache of a node at regular intervals specified by user.
printInterval | the time interval for which the neighbor cache is supposed to be printed. |
node | The node ptr for which we need the neighbor cache to be printed |
stream | The output stream object to use |
unit | The time unit to be used in the report |
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 197 of file ipv4-routing-helper.cc.
References ns3::Names::FindName(), ns3::Time::GetSeconds(), ns3::Simulator::Now(), PrintArpCacheEvery(), and ns3::Simulator::Schedule().
Referenced by PrintArpCacheEvery(), PrintNeighborCacheAllEvery(), and PrintNeighborCacheEvery().
|
staticprivate |
prints the routing tables of a node at regular intervals specified by user.
printInterval | the time interval for which the routing table is supposed to be printed. |
node | The node ptr for which we need the routing table to be printed |
stream | The output stream object to use |
unit | The 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 93 of file ipv4-routing-helper.cc.
References NS_ASSERT, PrintEvery(), and ns3::Simulator::Schedule().
Referenced by PrintEvery(), PrintRoutingTableAllEvery(), and PrintRoutingTableEvery().
|
static |
prints the neighbor cache of all nodes at a particular time.
printTime | the time at which the neighbor cache is supposed to be printed. |
stream | The output stream object to use |
unit | The time unit to be used in the report |
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 114 of file ipv4-routing-helper.cc.
References ns3::NodeList::GetNNodes(), ns3::NodeList::GetNode(), PrintArpCache(), and ns3::Simulator::Schedule().
Referenced by ChannelTest::DoRun(), DuplicateTest::DoRun(), DynamicNeighborCacheTest::DoRun(), DynamicPartialTest::DoRun(), FlushTest::DoRun(), InterfaceContainerTest::DoRun(), NetDeviceContainerTest::DoRun(), and NeighborCacheExample::Run().
|
static |
prints the neighbor cache of all nodes at regular intervals specified by user.
printInterval | the time interval for which the neighbor cache is supposed to be printed. |
stream | The output stream object to use |
unit | The time unit to be used in the report |
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 126 of file ipv4-routing-helper.cc.
References ns3::NodeList::GetNNodes(), ns3::NodeList::GetNode(), PrintArpCacheEvery(), and ns3::Simulator::Schedule().
|
static |
prints the neighbor cache of a node at a particular time.
printTime | the time at which the neighbor cache is supposed to be printed. |
node | The node ptr for which we need the neighbor cache to be printed |
stream | The output stream object to use |
unit | The time unit to be used in the report |
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 143 of file ipv4-routing-helper.cc.
References PrintArpCache(), and ns3::Simulator::Schedule().
|
static |
prints the neighbor cache of a node at regular intervals specified by user.
printInterval | the time interval for which the neighbor cache is supposed to be printed. |
node | The node ptr for which we need the neighbor cache to be printed |
stream | The output stream object to use |
unit | The time unit to be used in the report |
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 152 of file ipv4-routing-helper.cc.
References PrintArpCacheEvery(), and ns3::Simulator::Schedule().
|
static |
prints the routing tables of all nodes at a particular time.
printTime | the time at which the routing table is supposed to be printed. |
stream | The output stream object to use |
unit | The 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 29 of file ipv4-routing-helper.cc.
References ns3::NodeList::GetNNodes(), ns3::NodeList::GetNode(), Print(), and ns3::Simulator::Schedule().
Referenced by AodvExample::InstallInternetStack(), DsdvManetExample::InstallInternetStack(), and TracerouteExample::InstallInternetStack().
|
static |
prints the routing tables of all nodes at regular intervals specified by user.
printInterval | the time interval for which the routing table is supposed to be printed. |
stream | The output stream object to use |
unit | The 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 41 of file ipv4-routing-helper.cc.
References ns3::NodeList::GetNNodes(), ns3::NodeList::GetNode(), PrintEvery(), and ns3::Simulator::Schedule().
|
static |
prints the routing tables of a node at a particular time.
printTime | the time at which the routing table is supposed to be printed. |
node | The node ptr for which we need the routing table to be printed |
stream | The output stream object to use |
unit | The 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 58 of file ipv4-routing-helper.cc.
References Print(), and ns3::Simulator::Schedule().
|
static |
prints the routing tables of a node at regular intervals specified by user.
printInterval | the time interval for which the routing table is supposed to be printed. |
node | The node ptr for which we need the routing table to be printed |
stream | The output stream object to use |
unit | The 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 67 of file ipv4-routing-helper.cc.
References PrintEvery(), and ns3::Simulator::Schedule().