22 #include "ns3/ipv6-list-routing.h"
23 #include "ns3/node-list.h"
25 #include "ns3/ripng.h"
38 : m_factory(o.m_factory)
65 ripng->SetInterfaceExclusions(it->second);
72 for (
auto subiter = iter->second.begin(); subiter != iter->second.end(); subiter++)
74 ripng->SetInterfaceMetric(subiter->first, subiter->second);
91 int64_t currentStream = stream;
93 for (
auto i = c.
Begin(); i != c.
End(); ++i)
103 currentStream += ripng->AssignStreams(currentStream);
113 for (uint32_t i = 0; i <
list->GetNRoutingProtocols(); i++)
115 listProto =
list->GetRoutingProtocol(i, priority);
116 listRipng = DynamicCast<RipNg>(listProto);
119 currentStream += listRipng->AssignStreams(currentStream);
125 return (currentStream - stream);
138 ripng->AddDefaultRouteTo(nextHop, interface);
147 for (uint32_t i = 0; i <
list->GetNRoutingProtocols(); i++)
149 listProto =
list->GetRoutingProtocol(i, priority);
150 listRipng = DynamicCast<RipNg>(listProto);
153 listRipng->AddDefaultRouteTo(nextHop, interface);
174 it->second.insert(interface);
Hold a value for an Attribute.
Describes an IPv6 address.
Access to the IPv6 forwarding table, interfaces, and configuration.
keep track of a set of node pointers.
Iterator End() const
Get an iterator which indicates past-the-last Node in the container.
Iterator Begin() const
Get an iterator which refers to the first Node in the container.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
Smart pointer class similar to boost::intrusive_ptr.
Helper class that adds RIPng routing to nodes.
void SetDefaultRouter(Ptr< Node > node, Ipv6Address nextHop, uint32_t interface)
Install a default route in the node.
void ExcludeInterface(Ptr< Node > node, uint32_t interface)
Exclude an interface from RIPng protocol.
Ptr< Ipv6RoutingProtocol > Create(Ptr< Node > node) const override
int64_t AssignStreams(NodeContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
RipNgHelper * Copy() const override
void SetInterfaceMetric(Ptr< Node > node, uint32_t interface, uint8_t metric)
Set a metric for an interface.
std::map< Ptr< Node >, std::set< uint32_t > > m_interfaceExclusions
Interface Exclusion set.
void Set(std::string name, const AttributeValue &value)
std::map< Ptr< Node >, std::map< uint32_t, uint8_t > > m_interfaceMetrics
Interface Metric set.
ObjectFactory m_factory
Object Factory.
RIPng Routing Protocol, defined in RFC 2080.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Every class exported by the ns3 library is enclosed in the ns3 namespace.