24 #include "ns3/abort.h" 
   25 #include "ns3/assert.h" 
   26 #include "ns3/unused.h" 
   27 #include "ns3/random-variable-stream.h" 
   28 #include "ns3/ipv6-route.h" 
   30 #include "ns3/names.h" 
   31 #include "ns3/ripng-header.h" 
   32 #include "ns3/udp-header.h" 
   34 #include "ns3/ipv6-packet-info-tag.h" 
   36 #define RIPNG_ALL_NODE "ff02::9" 
   37 #define RIPNG_PORT 521 
   46   : m_ipv6 (0), m_splitHorizonStrategy (
RipNg::POISON_REVERSE), m_initialized (false)
 
   48   m_rng = CreateObject<UniformRandomVariable> ();
 
   60     .AddConstructor<RipNg> ()
 
   61     .AddAttribute (
"UnsolicitedRoutingUpdate", 
"The time between two Unsolicited Routing Updates.",
 
   65     .AddAttribute (
"StartupDelay", 
"Maximum random delay for protocol startup (send route requests).",
 
   69     .AddAttribute (
"TimeoutDelay", 
"The delay to invalidate a route.",
 
   73     .AddAttribute (
"GarbageCollectionDelay", 
"The delay to delete an expired route.",
 
   77     .AddAttribute (
"MinTriggeredCooldown", 
"Min cooldown delay after a Triggered Update.",
 
   81     .AddAttribute (
"MaxTriggeredCooldown", 
"Max cooldown delay after a Triggered Update.",
 
   85     .AddAttribute (
"SplitHorizon", 
"Split Horizon strategy.",
 
  107   bool addedGlobal = 
false;
 
  115   for (uint32_t i = 0 ; i < 
m_ipv6->GetNInterfaces (); i++)
 
  117       bool activeInterface = 
false;
 
  120           activeInterface = 
true;
 
  123       for (uint32_t j = 0; j < 
m_ipv6->GetNAddresses (i); j++)
 
  133               int ret = socket->Bind (local);
 
  135               socket->BindToNetDevice (
m_ipv6->GetNetDevice (i));
 
  136               socket->ShutdownRecv ();
 
  137               socket->SetIpv6RecvHopLimit (
true);
 
  154       m_recvSocket->Bind (local);
 
  156       m_recvSocket->SetIpv6RecvHopLimit (
true);
 
  157       m_recvSocket->SetRecvPktInfo (
true);
 
  191   rtentry = 
Lookup (destination, oif);
 
  212   uint32_t iif = 
m_ipv6->GetInterfaceForDevice (idev);
 
  217       NS_LOG_LOGIC (
"Multicast route not supported by RIPng");
 
  227   for (uint32_t j = 0; j < 
m_ipv6->GetNInterfaces (); j++)
 
  229       for (uint32_t i = 0; i < 
m_ipv6->GetNAddresses (j); i++)
 
  237                   NS_LOG_LOGIC (
"For me (destination " << addr << 
" match)");
 
  243               lcb (p, header, iif);
 
  250   if (
m_ipv6->IsForwarding (iif) == 
false)
 
  252       NS_LOG_LOGIC (
"Forwarding disabled for this interface");
 
  262       NS_LOG_LOGIC (
"Found unicast destination- calling unicast callback");
 
  263       ucb (idev, rtentry, p, header);  
 
  268       NS_LOG_LOGIC (
"Did not find unicast destination- returning false");
 
  277   for (uint32_t j = 0; j < 
m_ipv6->GetNAddresses (i); j++)
 
  303   bool sendSocketFound = 
false;
 
  306       if (iter->second == i)
 
  308           sendSocketFound = 
true;
 
  313   bool activeInterface = 
false;
 
  316       activeInterface = 
true;
 
  319   for (uint32_t j = 0; j < 
m_ipv6->GetNAddresses (i); j++)
 
  334           socket->Bind (local);
 
  335           socket->BindToNetDevice (
m_ipv6->GetNetDevice (i));
 
  336           socket->ShutdownRecv ();
 
  337           socket->SetIpv6RecvHopLimit (
true);
 
  353       m_recvSocket->Bind (local);
 
  355       m_recvSocket->SetIpv6RecvHopLimit (
true);
 
  356       m_recvSocket->SetRecvPktInfo (
true);
 
  367       if (it->first->GetInterface () == interface)
 
  375       NS_LOG_INFO (
"Checking socket for interface " << interface);
 
  376       if (iter->second == interface)
 
  378           NS_LOG_INFO (
"Removed socket for interface " << interface);
 
  379           iter->first->Close ();
 
  395   if (!
m_ipv6->IsUp (interface))
 
  420   if (!
m_ipv6->IsUp (interface))
 
  437       if (it->first->GetInterface () == interface
 
  438           && it->first->IsNetwork ()
 
  439           && it->first->GetDestNetwork () == networkAddress
 
  440           && it->first->GetDestNetworkPrefix () == networkMask)
 
  455   NS_LOG_INFO (
this << dst << mask << nextHop << interface << prefixToUse);
 
  473   for (i = 0; i < 
m_ipv6->GetNInterfaces (); i++)
 
  492   *os << 
"Node: " << 
m_ipv6->GetObject<
Node> ()->GetId ()
 
  494       << 
"Ipv6 RIPng table" << std::endl;
 
  498       *os << 
"Destination                    Next Hop                   Flag Met Ref Use If" << std::endl;
 
  506               std::ostringstream dest, gw, mask, flags;
 
  509               *os << std::setiosflags (std::ios::left) << std::setw (31) << dest.str ();
 
  511               *os << std::setiosflags (std::ios::left) << std::setw (27) << gw.str ();
 
  521               *os << std::setiosflags (std::ios::left) << std::setw (5) << flags.str ();
 
  522               *os << std::setiosflags (std::ios::left) << std::setw (4) << int(route->
GetRouteMetric ());
 
  558       iter->first->Close ();
 
  576   uint16_t longestMask = 0;
 
  581       NS_ASSERT_MSG (interface, 
"Try to send on link-local multicast address, and no interface index is given!");
 
  582       rtentry = Create<Ipv6Route> ();
 
  583       rtentry->SetSource (
m_ipv6->SourceAddressSelection (
m_ipv6->GetInterfaceForDevice (interface), dst));
 
  584       rtentry->SetDestination (dst);
 
  586       rtentry->SetOutputDevice (interface);
 
  600           NS_LOG_LOGIC (
"Searching for route to " << dst << 
", mask length " << maskLen);
 
  604               NS_LOG_LOGIC (
"Found global network route " << j << 
", mask length " << maskLen);
 
  609                   if (maskLen < longestMask)
 
  615                   longestMask = maskLen;
 
  619                   rtentry = Create<Ipv6Route> ();
 
  623                       rtentry->SetSource (
m_ipv6->SourceAddressSelection (interfaceIdx, route->
GetDest ()));
 
  631                       rtentry->SetSource (
m_ipv6->SourceAddressSelection (interfaceIdx, route->
GetDest ()));
 
  634                   rtentry->SetDestination (route->
GetDest ());
 
  636                   rtentry->SetOutputDevice (
m_ipv6->GetNetDevice (interfaceIdx));
 
  644       NS_LOG_LOGIC (
"Matching route via " << rtentry->GetDestination () << 
" (through " << rtentry->GetGateway () << 
") at the end");
 
  651   NS_LOG_FUNCTION (
this << network << networkPrefix << nextHop << interface << prefixToUse);
 
  655       NS_LOG_WARN (
"Ripng::AddNetworkRouteTo - Next hop should be link-local");
 
  684       if (it->first == route)
 
  689           if (it->second.IsRunning ())
 
  691               it->second.Cancel ();
 
  697   NS_ABORT_MSG (
"Ripng::InvalidateRoute - cannot find the route to update");
 
  706       if (it->first == route)
 
  713   NS_ABORT_MSG (
"Ripng::DeleteRoute - cannot find the route to delete");
 
  727       NS_ABORT_MSG (
"No incoming interface on RIPng message, aborting.");
 
  729   uint32_t incomingIf = interfaceInfo.
GetRecvIf ();
 
  730   Ptr<Node> node = this->GetObject<Node> ();
 
  732   uint32_t ipInterfaceIndex = 
m_ipv6->GetInterfaceForDevice (dev);
 
  737       NS_ABORT_MSG (
"No incoming Hop Count on RIPng message, aborting.");
 
  744       NS_ABORT_MSG (
"No incoming sender address on RIPng message, aborting.");
 
  749   int32_t interfaceForAddress = 
m_ipv6->GetInterfaceForAddress (senderAddress);
 
  750   if (interfaceForAddress != -1)
 
  765       HandleRequests (hdr, senderAddress, senderPort, ipInterfaceIndex, hopLimit);
 
  776   NS_LOG_FUNCTION (
this << senderAddress << 
int (senderPort) << incomingInterface << 
int (hopLimit) << requestHdr);
 
  778   std::list<RipNgRte> rtes = requestHdr.
GetRteList ();
 
  786   if (rtes.size () == 1 && senderAddress.
IsLinkLocal ())
 
  789           rtes.begin ()->GetPrefixLen () == 0 &&
 
  790           rtes.begin ()->GetRouteMetric () == 16)
 
  800                   if (iter->second == incomingInterface)
 
  802                       sendingSoket = iter->first;
 
  805               NS_ASSERT_MSG (sendingSoket, 
"HandleRequest - Impossible to find a socket to send the reply");
 
  807               uint16_t mtu = 
m_ipv6->GetMtu (incomingInterface);
 
  813               tag.SetHopLimit (255);
 
  821                   bool splitHorizoning = (rtIter->first->GetInterface () == incomingInterface);
 
  828                       (rtIter->first->GetInterface () != incomingInterface));
 
  830                   if ((isGlobal || isDefaultRoute) &&
 
  834                       rte.
SetPrefix (rtIter->first->GetDestNetwork ());
 
  835                       rte.
SetPrefixLen (rtIter->first->GetDestNetworkPrefix ().GetPrefixLength ());
 
  880               if (iter->second == incomingInterface)
 
  882                   sendingSoket = iter->first;
 
  894       tag.SetHopLimit (255);
 
  900       for (std::list<RipNgRte>::iterator iter = rtes.begin ();
 
  901           iter != rtes.end (); iter++)
 
  912                   Ipv6Address rtAddress = rtIter->first->GetDestNetwork ();
 
  913                   rtAddress.
CombinePrefix (rtIter->first->GetDestNetworkPrefix ());
 
  915                   if (requestedAddress == rtAddress)
 
  917                       iter->SetRouteMetric (rtIter->first->GetRouteMetric ());
 
  918                       iter->SetRouteTag (rtIter->first->GetRouteTag ());
 
  927               iter->SetRouteMetric (16);
 
  928               iter->SetRouteTag (0);
 
  941   NS_LOG_FUNCTION (
this << senderAddress << incomingInterface << 
int (hopLimit) << hdr);
 
  945       NS_LOG_LOGIC (
"Ignoring an update message from an excluded interface: " << incomingInterface);
 
  951       NS_LOG_LOGIC (
"Ignoring an update message from a non-link-local source: " << senderAddress);
 
  957       NS_LOG_LOGIC (
"Ignoring an update message with suspicious hop count: " << 
int (hopLimit));
 
  964   for (std::list<RipNgRte>::iterator iter = rtes.begin ();
 
  965       iter != rtes.end (); iter++)
 
  967       if (iter->GetRouteMetric () == 0 || iter->GetRouteMetric () > 16)
 
  969           NS_LOG_LOGIC (
"Ignoring an update message with malformed metric: " << 
int (iter->GetRouteMetric ()));
 
  972       if (iter->GetPrefixLen () > 128)
 
  974           NS_LOG_LOGIC (
"Ignoring an update message with malformed prefix length: " << 
int (iter->GetPrefixLen ()));
 
  977       if (iter->GetPrefix ().IsLocalhost () ||
 
  978           iter->GetPrefix ().IsLinkLocal () ||
 
  979           iter->GetPrefix ().IsMulticast ())
 
  981           NS_LOG_LOGIC (
"Ignoring an update message with wrong prefixes: " << iter->GetPrefix ());
 
  986   bool changed = 
false;
 
  988   for (std::list<RipNgRte>::iterator iter = rtes.begin ();
 
  989       iter != rtes.end (); iter++)
 
  996       uint8_t interfaceMetric = 1;
 
 1001       uint8_t rteMetric = std::min (iter->GetRouteMetric () + interfaceMetric, 16);
 
 1006           if (it->first->GetDestNetwork () == rteAddr &&
 
 1007               it->first->GetDestNetworkPrefix () == rtePrefix)
 
 1010               if (rteMetric < it->
first->GetRouteMetric ())
 
 1012                   if (senderAddress != it->first->GetGateway ())
 
 1020                   it->first->SetRouteTag (iter->GetRouteTag ());
 
 1021                   it->first->SetRouteChanged (
true);
 
 1022                   it->second.Cancel ();
 
 1026               else if (rteMetric == it->first->GetRouteMetric ())
 
 1028                   if (senderAddress == it->first->GetGateway ())
 
 1030                       it->second.Cancel ();
 
 1044                           it->second.Cancel ();
 
 1050               else if (rteMetric > it->first->GetRouteMetric () && senderAddress == it->first->GetGateway ())
 
 1052                   it->second.Cancel ();
 
 1055                       it->first->SetRouteMetric (rteMetric);
 
 1057                       it->first->SetRouteTag (iter->GetRouteTag ());
 
 1058                       it->first->SetRouteChanged (
true);
 
 1059                       it->second.Cancel ();
 
 1070       if (!found && rteMetric != 16)
 
 1072           NS_LOG_LOGIC (
"Received a RTE with new route, adding.");
 
 1080           (
m_routes.begin ())->second = invalidateEvent;
 
 1097       uint32_t 
interface = iter->second;
 
 1101           uint16_t mtu = 
m_ipv6->GetMtu (interface);
 
 1114               bool splitHorizoning = (rtIter->first->GetInterface () == interface);
 
 1117               NS_LOG_DEBUG (
"Processing RT " << rtDestAddr << 
" " << 
int(rtIter->first->IsRouteChanged ()));
 
 1122                   (rtIter->first->GetInterface () != interface));
 
 1124               if ((isGlobal || isDefaultRoute) &&
 
 1125                   (periodic || rtIter->first->IsRouteChanged ()))
 
 1128                   rte.
SetPrefix (rtIter->first->GetDestNetwork ());
 
 1129                   rte.
SetPrefixLen (rtIter->first->GetDestNetworkPrefix ().GetPrefixLength ());
 
 1167       rtIter->first->SetRouteChanged (
false);
 
 1177       NS_LOG_LOGIC (
"Skipping Triggered Update due to cooldown");
 
 1232   std::map<uint32_t, uint8_t>::const_iterator iter = 
m_interfaceMetrics.find (interface);
 
 1235       return iter->second;
 
 1257   tag.SetHopLimit (255);
 
 1273       uint32_t 
interface = iter->second;
 
 1296   : m_tag (0), m_metric (16), m_status (RIPNG_INVALID), m_changed (false)
 
 1302     m_tag (0), m_metric (16), m_status (RIPNG_INVALID), m_changed (false)
 
 1308     m_tag (0), m_metric (16), m_status (RIPNG_INVALID), m_changed (false)
 
 1319   if (
m_tag != routeTag)
 
 1372   os << static_cast<const Ipv6RoutingTableEntry &>(rte);
 
bool IsMatch(Ipv6Address a, Ipv6Address b) const 
If the Address match the type. 
static Time GetDelayLeft(const EventId &id)
Get the remaining time until this event will execute. 
bool IsAny() const 
If the IPv6 address is the "Any" address. 
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer. 
SplitHorizonType_e m_splitHorizonStrategy
Split Horizon strategy. 
std::map< Ptr< Socket >, uint32_t >::iterator SocketListI
Socket list type iterator. 
Simulation virtual time values and global simulation resolution. 
virtual void NotifyInterfaceDown(uint32_t interface)
Notify when specified interface goes DOWN. 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void SetStream(int64_t stream)
Specifies the stream number for this RNG stream. 
Ipv6Address GetPrefixToUse() const 
Get the prefix to use (for multihomed link). 
SocketErrno
Enumeration of the possible errors returned by a socket. 
bool IsLinkLocalMulticast() const 
If the IPv6 address is link-local multicast (ff02::/16). 
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message. 
Ipv6Prefix GetDestNetworkPrefix() const 
Get the destination prefix. 
void SetRouteTag(uint16_t routeTag)
Set the route tag. 
void AddNetworkRouteTo(Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse)
Add route to network. 
This class implements a tag that carries the socket-specific HOPLIMIT of a packet to the IPv6 layer...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
void SetInterfaceExclusions(std::set< uint32_t > exceptions)
Set the set of interface excluded from the protocol. 
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void AddPacketTag(const Tag &tag) const 
Add a packet tag. 
void SetPrefix(Ipv6Address prefix)
Set the prefix. 
bool IsLinkLocal() const 
If the IPv6 address is a link-local address (fe80::/64). 
EventId m_nextTriggeredUpdate
Next Triggered Update event. 
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
static Ipv6Address GetAny()
Get the "any" (::) Ipv6Address. 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
IPv6 address associated with an interface. 
uint8_t m_metric
route metric 
Link-local address (fe80::/64) 
bool IsEqual(const Ipv6Address &other) const 
Comparison operation between two Ipv6Addresses. 
void SetInterfaceMetric(uint32_t interface, uint8_t metric)
Set the metric for an interface. 
void SendUnsolicitedRouteUpdate(void)
Send Unsolicited Routing Updates on all interfaces. 
EventId m_nextUnsolicitedUpdate
Next Unsolicited Update event. 
virtual void DoDispose(void)
Destructor implementation. 
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO. 
void Receive(Ptr< Socket > socket)
Receive RIPng packets. 
bool IsRunning(void) const 
This method is syntactic sugar for !IsExpired(). 
virtual void DoDispose()
Dispose this object. 
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached. 
static Ipv6Prefix GetZero()
Get the zero prefix ( /0). 
void AddDefaultRouteTo(Ipv6Address nextHop, uint32_t interface)
Add a default route to the router through the nextHop located on interface. 
SocketList m_sendSocketList
list of sockets for sending (socket, interface index) 
void InvalidateRoute(RipNgRoutingTableEntry *route)
Invalidate a route. 
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range. 
RIPng Routing Protocol, defined in RFC 2080. 
void SendTriggeredRouteUpdate()
Send Triggered Routing Updates on all interfaces. 
std::set< uint32_t > m_interfaceExclusions
Set of excluded interfaces. 
double GetSeconds(void) const 
Get an approximation of the time stored in this instance in the indicated unit. 
Ipv6Address GetDestNetwork() const 
Get the destination network. 
void DoInitialize()
Start protocol operation. 
Ipv6Address GetAddress() const 
Get the IPv6 address. 
A record of an IPv6 route. 
virtual void NotifyAddRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
Notify a new route. 
void SetRouteMetric(uint8_t routeMetric)
Set the route metric. 
Hold variables of type enum. 
uint8_t GetInterfaceMetric(uint32_t interface) const 
Get the metric for an interface. 
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
AttributeValue implementation for Time. 
Ptr< Ipv6 > m_ipv6
IPv6 reference. 
static Ipv6Address GetZero()
Get the 0 (::) Ipv6Address. 
Time m_timeoutDelay
Delay before invalidating a route. 
Ptr< NetDevice > GetDevice(uint32_t index) const 
Retrieve the index-th NetDevice associated to this node. 
This class implements a tag that carries an address of a packet across the socket interface...
void DoSendRouteUpdate(bool periodic)
Send Routing Updates on all interfaces. 
void SetRouteTag(uint16_t routeTag)
Set the route tag. 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
bool IsHost() const 
Is the route entry correspond to a host ? 
static Ptr< Socket > CreateSocket(Ptr< Node > node, TypeId tid)
This method wraps the creation of sockets that is performed on a given node by a SocketFactory specif...
void SetRouteChanged(bool changed)
Set the route as changed. 
Ipv6Prefix GetPrefix() const 
Get the IPv6 prefix. 
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC. 
void SetHopLimit(uint8_t hopLimit)
Set the tag's Hop Limit. 
Ptr< Socket > m_recvSocket
receive socket 
virtual void NotifyRemoveAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address. 
void DeleteRoute(RipNgRoutingTableEntry *route)
Delete a route. 
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output 
Ptr< Ipv6Route > RouteOutput(Ptr< Packet > p, const Ipv6Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr)
Query routing cache for an existing route, for an outbound packet. 
void SetRouteMetric(uint8_t routeMetric)
Set the route metric. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
bool RouteInput(Ptr< const Packet > p, const Ipv6Header &header, Ptr< const NetDevice > idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb)
Route an input packet (to be forwarded or locally delivered) 
Status_e GetRouteStatus(void) const 
Get the route status. 
Time m_unsolicitedUpdate
time between two Unsolicited Routing Updates 
Global address (2000::/3) 
virtual ~RipNgRoutingTableEntry()
virtual Ptr< Packet > Recv(uint32_t maxSize, uint32_t flags)=0
Read data from the socket. 
uint8_t GetRouteMetric(void) const 
Get the route metric. 
virtual void NotifyAddAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address. 
void HandleResponses(RipNgHeader hdr, Ipv6Address senderAddress, uint32_t incomingInterface, uint8_t hopLimit)
Handle RIPng responses. 
bool IsMulticast() const 
If the IPv6 address is multicast (ff00::/8). 
void HandleRequests(RipNgHeader hdr, Ipv6Address senderAddress, uint16_t senderPort, uint32_t incomingInterface, uint8_t hopLimit)
Handle RIPng requests. 
virtual void SetIpv6(Ptr< Ipv6 > ipv6)
Typically, invoked directly or indirectly from ns3::Ipv6::SetRoutingProtocol. 
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Ipv6Address GetGateway() const 
Get the gateway. 
static Time Now(void)
Return the current simulation virtual time. 
uint32_t GetInterface() const 
Get the interface index. 
Ptr< UniformRandomVariable > m_rng
Rng stream. 
std::set< uint32_t > GetInterfaceExclusions() const 
Get the set of interface excluded from the protocol. 
void SetRouteStatus(Status_e status)
Set the route status. 
virtual void NotifyInterfaceUp(uint32_t interface)
Notify when specified interface goes UP. 
uint16_t GetRouteTag(void) const 
Get the route tag. 
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
virtual uint32_t GetSerializedSize(void) const 
Get the serialized size of the packet. 
uint8_t GetHopLimit(void) const 
Get the tag's Hop Limit. 
Ptr< const AttributeChecker > MakeEnumChecker(int v1, std::string n1, int v2, std::string n2, int v3, std::string n3, int v4, std::string n4, int v5, std::string n5, int v6, std::string n6, int v7, std::string n7, int v8, std::string n8, int v9, std::string n9, int v10, std::string n10, int v11, std::string n11, int v12, std::string n12, int v13, std::string n13, int v14, std::string n14, int v15, std::string n15, int v16, std::string n16, int v17, std::string n17, int v18, std::string n18, int v19, std::string n19, int v20, std::string n20, int v21, std::string n21, int v22, std::string n22)
Make an EnumChecker pre-configured with a set of allowed values by name. 
Describes an IPv6 address. 
void SendRouteRequest()
Send Routing Request on all interfaces. 
Ipv6InterfaceAddress::Scope_e GetScope() const 
Get address scope. 
static Ipv6Prefix GetOnes()
Get the "all-1" IPv6 mask (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff). 
static TypeId GetTypeId(void)
Get the type ID. 
An identifier for simulation events. 
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN. 
std::map< uint32_t, uint8_t > m_interfaceMetrics
Map of interface metrics. 
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream) const 
Print the Routing Table entries. 
Address GetAddress(void) const 
Get the tag's address. 
std::list< std::pair< RipNgRoutingTableEntry *, EventId > >::const_iterator RoutesCI
Const Iterator for container for the network routes. 
RipNg Routing Table Entry. 
Ipv6Address GetDest() const 
Get the destination. 
bool RemovePacketTag(Tag &tag)
Remove a packet tag. 
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG. 
Time Seconds(double value)
Construct a Time in the indicated unit. 
static Inet6SocketAddress ConvertFrom(const Address &addr)
Convert the address to a InetSocketAddress. 
Routes m_routes
the forwarding table for network. 
std::list< std::pair< RipNgRoutingTableEntry *, EventId > >::iterator RoutesI
Iterator for container for the network routes. 
uint32_t GetRecvIf(void) const 
Get the tag's receiving interface. 
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method. 
static std::string FindName(Ptr< Object > object)
Given a pointer to an object, look to see if that object has a name associated with it and...
Ptr< Ipv6Route > Lookup(Ipv6Address dest, Ptr< NetDevice >=0)
Lookup in the forwarding table for destination. 
Describes an IPv6 prefix. 
bool m_changed
route has been updated 
virtual int SendTo(Ptr< Packet > p, uint32_t flags, const Address &toAddress)=0
Send data to a specified peer. 
bool IsGateway() const 
Is it the gateway ? 
uint8_t GetPrefixLength() const 
Get prefix length. 
This class implements a tag that carries socket ancillary data to the socket interface. 
bool m_initialized
flag to allow socket's late-creation. 
RipNgRoutingTableEntry(void)
Time m_maxTriggeredUpdateDelay
Max cooldown delay after a Triggered Update. 
Time m_garbageCollectionDelay
Delay before deleting an INVALID route. 
virtual int Close(void)=0
Close a socket. 
RipNg Routing Table Entry (RTE) - see RFC 2080 
Poison Reverse Split Horizon. 
Ipv6Address CombinePrefix(Ipv6Prefix const &prefix)
Combine this address with a prefix. 
Abstract base class for Ipv6 routing protocols. 
virtual void NotifyRemoveRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
Notify route removing. 
Status_e m_status
route status 
a unique identifier for an interface. 
TypeId SetParent(TypeId tid)
std::ostream * GetStream(void)
Return a pointer to an ostream previously set in the wrapper. 
Time m_startupDelay
Random delay before protocol startup. 
void AddHeader(const Header &header)
Add header to this packet. 
virtual void DoInitialize(void)
Initialize() implementation. 
Time m_minTriggeredUpdateDelay
Min cooldown delay after a Triggered Update. 
static TypeId LookupByName(std::string name)
bool IsRouteChanged(void) const 
Get the route changed status. 
void SetPrefixLen(uint8_t prefixLen)
Set the prefix length.