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