Helper class that adds Nix-vector routing to nodes. More...
#include "ipv4-nix-vector-helper.h"
Public Member Functions | |
Ipv4NixVectorHelper () | |
Construct an Ipv4NixVectorHelper to make life easier while adding Nix-vector routing to nodes. More... | |
Ipv4NixVectorHelper (const Ipv4NixVectorHelper &o) | |
Construct an Ipv4NixVectorHelper from another previously initialized instance (Copy Constructor). More... | |
Ipv4NixVectorHelper * | Copy (void) const |
virtual Ptr< Ipv4RoutingProtocol > | Create (Ptr< Node > node) const |
void | PrintRoutingPathAt (Time printTime, Ptr< Node > source, Ipv4Address dest, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) |
prints the routing path for a source and destination at a particular time. More... | |
![]() | |
virtual | ~Ipv4RoutingHelper () |
Private Member Functions | |
Ipv4NixVectorHelper & | operator= (const Ipv4NixVectorHelper &) |
Assignment operator declared private and not implemented to disallow assignment and prevent the compiler from happily inserting its own. More... | |
Static Private Member Functions | |
static void | PrintRoute (Ptr< Node > source, Ipv4Address dest, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) |
prints the routing path for the source and destination. More... | |
Private Attributes | |
ObjectFactory | m_agentFactory |
Object factory. More... | |
Additional Inherited Members | |
![]() | |
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, Time::Unit unit=Time::S) |
prints the neighbor cache of all nodes at a particular time. More... | |
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. More... | |
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. More... | |
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. 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... | |
Helper class that adds Nix-vector routing to nodes.
This class is expected to be used in conjunction with ns3::InternetStackHelper::SetRoutingHelper
Definition at line 38 of file ipv4-nix-vector-helper.h.
ns3::Ipv4NixVectorHelper::Ipv4NixVectorHelper | ( | ) |
Construct an Ipv4NixVectorHelper to make life easier while adding Nix-vector routing to nodes.
Definition at line 26 of file ipv4-nix-vector-helper.cc.
References m_agentFactory, and ns3::ObjectFactory::SetTypeId().
Referenced by Copy().
ns3::Ipv4NixVectorHelper::Ipv4NixVectorHelper | ( | const Ipv4NixVectorHelper & | o | ) |
Construct an Ipv4NixVectorHelper from another previously initialized instance (Copy Constructor).
o | object to copy |
Definition at line 31 of file ipv4-nix-vector-helper.cc.
|
virtual |
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 37 of file ipv4-nix-vector-helper.cc.
References Ipv4NixVectorHelper().
|
virtual |
node | the node on which the routing protocol will run |
This method will be called by ns3::InternetStackHelper::Install
Implements ns3::Ipv4RoutingHelper.
Definition at line 43 of file ipv4-nix-vector-helper.cc.
References ns3::Object::AggregateObject(), ns3::ObjectFactory::Create(), and m_agentFactory.
|
private |
Assignment operator declared private and not implemented to disallow assignment and prevent the compiler from happily inserting its own.
|
staticprivate |
prints the routing path for the source and destination.
If the routing path does not exist, it prints that the path does not exist between the nodes in the ostream.
source | the source node pointer to start traversing |
dest | the IPv4 destination address |
stream | the output stream object to use |
unit | the time unit to be used in the report |
This method calls the PrintRoutingPath() method of the Ipv4NixVectorRouting for the source and destination to provide the routing path.
Definition at line 58 of file ipv4-nix-vector-helper.cc.
References ns3::Object::GetObject(), and NS_ASSERT.
Referenced by PrintRoutingPathAt().
void ns3::Ipv4NixVectorHelper::PrintRoutingPathAt | ( | Time | printTime, |
Ptr< Node > | source, | ||
Ipv4Address | dest, | ||
Ptr< OutputStreamWrapper > | stream, | ||
Time::Unit | unit = Time::S |
||
) |
prints the routing path for a source and destination at a particular time.
If the routing path does not exist, it prints that the path does not exist between the nodes in the ostream.
printTime | the time at which the routing path is supposed to be printed. |
source | the source node pointer to start traversing |
dest | the IPv4 destination address |
stream | the output stream object to use |
unit | the time unit to be used in the report |
This method calls the PrintRoutingPath() method of the Ipv4NixVectorRouting for the source and destination to provide the routing path at the specified time.
Definition at line 52 of file ipv4-nix-vector-helper.cc.
References PrintRoute(), and ns3::Simulator::Schedule().
|
private |
Object factory.
Definition at line 95 of file ipv4-nix-vector-helper.h.
Referenced by Create(), and Ipv4NixVectorHelper().