Helper class that adds RIPng routing to nodes. More...
#include "ripng-helper.h"
Public Member Functions | |
RipNgHelper () | |
RipNgHelper (const RipNgHelper &o) | |
Construct an RipNgHelper from another previously initialized instance (Copy Constructor). More... | |
virtual | ~RipNgHelper () |
int64_t | AssignStreams (NodeContainer c, int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. More... | |
RipNgHelper * | Copy (void) const |
virtual Ptr< Ipv6RoutingProtocol > | Create (Ptr< Node > node) const |
void | ExcludeInterface (Ptr< Node > node, uint32_t interface) |
Exclude an interface from RIPng protocol. More... | |
void | Set (std::string name, const AttributeValue &value) |
void | SetDefaultRouter (Ptr< Node > node, Ipv6Address nextHop, uint32_t interface) |
Install a default route in the node. More... | |
void | SetInterfaceMetric (Ptr< Node > node, uint32_t interface, uint8_t metric) |
Set a metric for an interface. More... | |
![]() | |
virtual | ~Ipv6RoutingHelper () |
Destroy an Ipv6 Ipv6RoutingHelper. More... | |
Private Member Functions | |
RipNgHelper & | operator= (const RipNgHelper &o) |
Assignment operator declared private and not implemented to disallow assignment and prevent the compiler from happily inserting its own. More... | |
Private Attributes | |
ObjectFactory | m_factory |
Object Factory. More... | |
std::map< Ptr< Node >, std::set< uint32_t > > | m_interfaceExclusions |
Interface Exclusion set. More... | |
std::map< Ptr< Node >, std::map< uint32_t, uint8_t > > | m_interfaceMetrics |
Interface Metric set. More... | |
Additional Inherited Members | |
![]() | |
template<class T > | |
static Ptr< T > | GetRouting (Ptr< Ipv6RoutingProtocol > protocol) |
Request a specified routing protocol <T> from Ipv6RoutingProtocol 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... | |
Helper class that adds RIPng routing to nodes.
This class is expected to be used in conjunction with ns3::InternetStackHelper::SetRoutingHelper
Definition at line 40 of file ripng-helper.h.
ns3::RipNgHelper::RipNgHelper | ( | ) |
Definition at line 29 of file ripng-helper.cc.
References m_factory, and ns3::ObjectFactory::SetTypeId().
Referenced by Copy().
ns3::RipNgHelper::RipNgHelper | ( | const RipNgHelper & | o | ) |
Construct an RipNgHelper from another previously initialized instance (Copy Constructor).
o | The object to copy from. |
Definition at line 34 of file ripng-helper.cc.
References m_interfaceExclusions, and m_interfaceMetrics.
|
virtual |
Definition at line 41 of file ripng-helper.cc.
References m_interfaceExclusions, and m_interfaceMetrics.
int64_t ns3::RipNgHelper::AssignStreams | ( | NodeContainer | c, |
int64_t | stream | ||
) |
Assign a fixed random variable stream number to the random variables used by this model.
Return the number of streams (possibly zero) that have been assigned. The Install() method should have previously been called by the user.
c | NetDeviceContainer of the set of net devices for which the SixLowPanNetDevice should be modified to use a fixed stream |
stream | first stream index to use |
Definition at line 88 of file ripng-helper.cc.
References ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), ns3::Object::GetObject(), list, and NS_ASSERT_MSG().
|
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::Ipv6RoutingHelper.
Definition at line 48 of file ripng-helper.cc.
References RipNgHelper().
|
virtual |
node | the node on which the routing protocol will run |
This method will be called by ns3::InternetStackHelper::Install
Implements ns3::Ipv6RoutingHelper.
Definition at line 54 of file ripng-helper.cc.
References ns3::Object::AggregateObject(), ns3::ObjectFactory::Create(), m_factory, m_interfaceExclusions, and m_interfaceMetrics.
Exclude an interface from RIPng protocol.
You have to call this function before installing RIPng in the nodes.
Note: the exclusion means that RIPng will not be propagated on that interface. The network prefix on that interface will be still considered in RIPng.
node | the node |
interface | the network interface to be excluded |
Definition at line 159 of file ripng-helper.cc.
References first::interfaces, and m_interfaceExclusions.
|
private |
Assignment operator declared private and not implemented to disallow assignment and prevent the compiler from happily inserting its own.
o | The object to copy from. |
void ns3::RipNgHelper::Set | ( | std::string | name, |
const AttributeValue & | value | ||
) |
name | the name of the attribute to set |
value | the value of the attribute to set. |
This method controls the attributes of ns3::RipNg
Definition at line 81 of file ripng-helper.cc.
References m_factory, and ns3::ObjectFactory::Set().
Referenced by Ipv6RipngSplitHorizonStrategyTest::DoRun().
void ns3::RipNgHelper::SetDefaultRouter | ( | Ptr< Node > | node, |
Ipv6Address | nextHop, | ||
uint32_t | interface | ||
) |
Install a default route in the node.
The traffic will be routed to the nextHop, located on the specified interface, unless a more specific route is found.
node | the node |
nextHop | the next hop |
interface | the network interface |
Definition at line 127 of file ripng-helper.cc.
References ns3::Object::GetObject(), list, and NS_ASSERT_MSG().
Set a metric for an interface.
You have to call this function before installing RIPng in the nodes.
Note: RIPng will apply the metric on route message reception. As a consequence, interface metric should be set on the receiver.
node | the node |
interface | the network interface |
metric | the interface metric |
Definition at line 176 of file ripng-helper.cc.
References m_interfaceMetrics.
Referenced by Ipv6RipngCountToInfinityTest::DoRun().
|
private |
Object Factory.
Definition at line 144 of file ripng-helper.h.
Referenced by Create(), RipNgHelper(), and Set().
Interface Exclusion set.
Definition at line 146 of file ripng-helper.h.
Referenced by Create(), ExcludeInterface(), RipNgHelper(), and ~RipNgHelper().
Interface Metric set.
Definition at line 147 of file ripng-helper.h.
Referenced by Create(), RipNgHelper(), SetInterfaceMetric(), and ~RipNgHelper().