A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::RipNg Class Reference

RIPng Routing Protocol, defined in {2080}. More...

#include <ripng.h>

+ Inheritance diagram for ns3::RipNg:
+ Collaboration diagram for ns3::RipNg:

Public Types

enum  SplitHorizonType_e { NO_SPLIT_HORIZON, SPLIT_HORIZON, POISON_REVERSE }
 
- Public Types inherited from ns3::Ipv6RoutingProtocol
typedef Callback< void, Ptr
< const Packet >, const
Ipv6Header
&, Socket::SocketErrno
ErrorCallback
 Callback for routing errors (e.g., no route found) More...
 
typedef Callback< void, Ptr
< const Packet >, const
Ipv6Header &, uint32_t > 
LocalDeliverCallback
 Callback for packets to be locally delivered. More...
 
typedef Callback< void, Ptr
< const NetDevice >, Ptr
< Ipv6MulticastRoute >, Ptr
< const Packet >, const
Ipv6Header & > 
MulticastForwardCallback
 Callback for multicast packets to be forwarded. More...
 
typedef Callback< void, Ptr
< const NetDevice >, Ptr
< Ipv6Route >, Ptr< const
Packet >, const Ipv6Header & > 
UnicastForwardCallback
 Callback for unicast packets to be forwarded. More...
 

Public Member Functions

 RipNg ()
 
virtual ~RipNg ()
 
void AddDefaultRouteTo (Ipv6Address nextHop, uint32_t interface)
 Add a default route to the router through the nextHop located on interface. More...
 
int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model. More...
 
std::set< uint32_t > GetInterfaceExclusions () const
 Get the set of interface excluded from the protocol. More...
 
uint8_t GetInterfaceMetric (uint32_t interface) const
 Get the metric for an interface. More...
 
void SetInterfaceExclusions (std::set< uint32_t > exceptions)
 Set the set of interface excluded from the protocol. More...
 
void SetInterfaceMetric (uint32_t interface, uint8_t metric)
 Set the metric for an interface. More...
 
Ptr< Ipv6RouteRouteOutput (Ptr< Packet > p, const Ipv6Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr)
 Query routing cache for an existing route, for an outbound packet. More...
 
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) More...
 
virtual void NotifyInterfaceUp (uint32_t interface)
 Notify when specified interface goes UP. More...
 
virtual void NotifyInterfaceDown (uint32_t interface)
 Notify when specified interface goes DOWN. More...
 
virtual void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address)
 Notify when specified interface add an address. More...
 
virtual void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address)
 Notify when specified interface add an address. More...
 
virtual void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
 Notify a new route. More...
 
virtual void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
 Notify route removing. More...
 
virtual void SetIpv6 (Ptr< Ipv6 > ipv6)
 Typically, invoked directly or indirectly from ns3::Ipv6::SetRoutingProtocol. More...
 
virtual void PrintRoutingTable (Ptr< OutputStreamWrapper > stream) const
 Print the Routing Table entries. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 
virtual ~Object ()
 
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 Run the DoDispose methods of this object and all the objects aggregated to it. More...
 
AggregateIterator GetAggregateIterator (void) const
 
virtual TypeId GetInstanceTypeId (void) const
 
template<typename T >
Ptr< T > GetObject (void) const
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 
void Initialize (void)
 This method calls the virtual DoInitialize method on all the objects aggregated to this object. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
 
void SetAttribute (std::string name, const AttributeValue &value)
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 

Static Public Member Functions

static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Ipv6RoutingProtocol
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 Noop. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Protected Member Functions

virtual void DoDispose ()
 Dispose this object. More...
 
void DoInitialize ()
 Start protocol operation. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void NotifyNewAggregate (void)
 This method is invoked whenever two sets of objects are aggregated together. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 This method is invoked once all member attributes have been initialized. More...
 

Private Types

typedef std::list< std::pair
< RipNgRoutingTableEntry
*, EventId > > 
Routes
 Container for the network routes - pair RipNgRoutingTableEntry *, EventId (update event) More...
 
typedef std::list< std::pair
< RipNgRoutingTableEntry
*, EventId > >::const_iterator 
RoutesCI
 Const Iterator for container for the network routes. More...
 
typedef std::list< std::pair
< RipNgRoutingTableEntry
*, EventId > >::iterator 
RoutesI
 Iterator for container for the network routes. More...
 
typedef std::map< Ptr< Socket >
, uint32_t > 
SocketList
 Socket list type. More...
 
typedef std::map< Ptr< Socket >
, uint32_t >::const_iterator 
SocketListCI
 Socket list type const iterator. More...
 
typedef std::map< Ptr< Socket >
, uint32_t >::iterator 
SocketListI
 Socket list type iterator. More...
 

Private Member Functions

void AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse)
 Add route to network. More...
 
void AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface)
 Add route to network. More...
 
void DeleteRoute (RipNgRoutingTableEntry *route)
 Delete a route. More...
 
void DoSendRouteUpdate (bool periodic)
 Send Routing Updates on all interfaces. More...
 
void HandleRequests (RipNgHeader hdr, Ipv6Address senderAddress, uint16_t senderPort, uint32_t incomingInterface, uint8_t hopLimit)
 Handle RIPng requests. More...
 
void HandleResponses (RipNgHeader hdr, Ipv6Address senderAddress, uint32_t incomingInterface, uint8_t hopLimit)
 Handle RIPng responses. More...
 
void InvalidateRoute (RipNgRoutingTableEntry *route)
 Invalidate a route. More...
 
Ptr< Ipv6RouteLookup (Ipv6Address dest, Ptr< NetDevice >=0)
 Lookup in the forwarding table for destination. More...
 
void Receive (Ptr< Socket > socket)
 Receive RIPng packets. More...
 
void RecvMulticastRipng (Ptr< Socket > socket)
 Receive and process multicast packet. More...
 
void RecvUnicastRipng (Ptr< Socket > socket)
 Receive and process unicast packet. More...
 
void SendRouteRequest ()
 Send Routing Request on all interfaces. More...
 
void SendTriggeredRouteUpdate ()
 Send Triggered Routing Updates on all interfaces. More...
 
void SendUnsolicitedRouteUpdate (void)
 Send Unsolicited Routing Updates on all interfaces. More...
 

Private Attributes

Time m_garbageCollectionDelay
 Delay before deleting an INVALID route. More...
 
bool m_initialized
 
std::set< uint32_t > m_interfaceExclusions
 
std::map< uint32_t, uint8_t > m_interfaceMetrics
 
Ptr< Ipv6m_ipv6
 IPv6 reference. More...
 
Time m_maxTriggeredUpdateDelay
 Max cooldown delay after a Triggered Update. More...
 
Time m_minTriggeredUpdateDelay
 Min cooldown delay after a Triggered Update. More...
 
EventId m_nextTriggeredUpdate
 Next Triggered Update event. More...
 
EventId m_nextUnsolicitedUpdate
 Next Unsolicited Update event. More...
 
Ptr< Socketm_recvSocket
 
Ptr< UniformRandomVariablem_rng
 Rng stream. More...
 
Routes m_routes
 the forwarding table for network. More...
 
SocketList m_sendSocketList
 list of sockets for sending (socket, interface index) More...
 
SplitHorizonType_e m_splitHorizonStrategy
 
Time m_startupDelay
 Random delay before protocol startup. More...
 
Time m_timeoutDelay
 Delay before invalidating a route. More...
 
Time m_unsolicitedUpdate
 time between two Unsolicited Routing Updates More...
 

Detailed Description

RIPng Routing Protocol, defined in {2080}.

Doxygen introspection did not find any typical Config paths.


Attributes

  • UnsolicitedRoutingUpdate: The time between two Unsolicited Routing Updates.
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +30000000000.0ns
    • Flags: construct write read
  • StartupDelay: Maximum random delay for protocol startup (send route requests).
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +1000000000.0ns
    • Flags: construct write read
  • TimeoutDelay: The delay to invalidate a route.
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +180000000000.0ns
    • Flags: construct write read
  • GarbageCollectionDelay: The delay to delete an expired route.
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +120000000000.0ns
    • Flags: construct write read
  • MinTriggeredCooldown: Min cooldown delay after a Triggered Update.
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +1000000000.0ns
    • Flags: construct write read
  • MaxTriggeredCooldown: Max cooldown delay after a Triggered Update.
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +5000000000.0ns
    • Flags: construct write read
  • SplitHorizon: Split Horizon strategy.
    • Set with class: ns3::EnumValue
    • Underlying type:
    • Initial value: PoisonReverse
    • Flags: construct write read

No TraceSources are defined for this type.

Definition at line 173 of file ripng.h.

Member Typedef Documentation

typedef std::list<std::pair <RipNgRoutingTableEntry *, EventId> > ns3::RipNg::Routes
private

Container for the network routes - pair RipNgRoutingTableEntry *, EventId (update event)

Definition at line 267 of file ripng.h.

typedef std::list<std::pair <RipNgRoutingTableEntry *, EventId> >::const_iterator ns3::RipNg::RoutesCI
private

Const Iterator for container for the network routes.

Definition at line 270 of file ripng.h.

typedef std::list<std::pair <RipNgRoutingTableEntry *, EventId> >::iterator ns3::RipNg::RoutesI
private

Iterator for container for the network routes.

Definition at line 273 of file ripng.h.

typedef std::map< Ptr<Socket>, uint32_t> ns3::RipNg::SocketList
private

Socket list type.

Definition at line 387 of file ripng.h.

typedef std::map<Ptr<Socket>, uint32_t>::const_iterator ns3::RipNg::SocketListCI
private

Socket list type const iterator.

Definition at line 391 of file ripng.h.

typedef std::map<Ptr<Socket>, uint32_t>::iterator ns3::RipNg::SocketListI
private

Socket list type iterator.

Definition at line 389 of file ripng.h.

Member Enumeration Documentation

Enumerator
NO_SPLIT_HORIZON 
SPLIT_HORIZON 
POISON_REVERSE 

Definition at line 201 of file ripng.h.

Constructor & Destructor Documentation

ns3::RipNg::RipNg ( )

Definition at line 47 of file ripng.cc.

References m_rng.

ns3::RipNg::~RipNg ( )
virtual

Definition at line 53 of file ripng.cc.

Member Function Documentation

void ns3::RipNg::AddDefaultRouteTo ( Ipv6Address  nextHop,
uint32_t  interface 
)

Add a default route to the router through the nextHop located on interface.

The default route is usually installed manually, or it is the result of some "other" routing protocol (e.g., BGP).

Parameters
nextHopthe next hop
interfacethe interface

Definition at line 1285 of file ripng.cc.

References AddNetworkRouteTo(), ns3::Ipv6Prefix::GetZero(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::RipNg::AddNetworkRouteTo ( Ipv6Address  network,
Ipv6Prefix  networkPrefix,
Ipv6Address  nextHop,
uint32_t  interface,
Ipv6Address  prefixToUse 
)
private

Add route to network.

Parameters
networknetwork address
networkPrefixnetwork prefix*
nextHopnext hop address to route the packet.
interfaceinterface index
prefixToUseprefix that should be used for source address for this destination
metricmetric of route in case of multiple routes to same destination

Definition at line 651 of file ripng.cc.

References ns3::Ipv6Address::IsLinkLocal(), m_routes, NS_LOG_FUNCTION, NS_LOG_WARN, ns3::RipNgRoutingTableEntry::RIPNG_VALID, ns3::RipNgRoutingTableEntry::SetRouteChanged(), ns3::RipNgRoutingTableEntry::SetRouteMetric(), and ns3::RipNgRoutingTableEntry::SetRouteStatus().

Referenced by AddDefaultRouteTo(), NotifyAddAddress(), and NotifyInterfaceUp().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RipNg::AddNetworkRouteTo ( Ipv6Address  network,
Ipv6Prefix  networkPrefix,
uint32_t  interface 
)
private

Add route to network.

Parameters
networknetwork address
networkPrefixnetwork prefix
interfaceinterface index
metricmetric of route in case of multiple routes to same destination

Definition at line 668 of file ripng.cc.

References m_routes, NS_LOG_FUNCTION, ns3::RipNgRoutingTableEntry::RIPNG_VALID, ns3::RipNgRoutingTableEntry::SetRouteChanged(), ns3::RipNgRoutingTableEntry::SetRouteMetric(), and ns3::RipNgRoutingTableEntry::SetRouteStatus().

+ Here is the call graph for this function:

int64_t ns3::RipNg::AssignStreams ( 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.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 97 of file ripng.cc.

References m_rng, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().

+ Here is the call graph for this function:

void ns3::RipNg::DeleteRoute ( RipNgRoutingTableEntry route)
private

Delete a route.

Parameters
routethe route to be removed

Definition at line 702 of file ripng.cc.

References m_routes, NS_ABORT_MSG, and NS_LOG_FUNCTION.

Referenced by InvalidateRoute().

+ Here is the caller graph for this function:

void ns3::RipNg::DoDispose ( void  )
protectedvirtual

Dispose this object.

Reimplemented from ns3::Object.

Definition at line 543 of file ripng.cc.

References ns3::EventId::Cancel(), ns3::Socket::Close(), ns3::Object::DoDispose(), m_ipv6, m_nextTriggeredUpdate, m_nextUnsolicitedUpdate, m_recvSocket, m_routes, m_sendSocketList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

std::set< uint32_t > ns3::RipNg::GetInterfaceExclusions ( ) const

Get the set of interface excluded from the protocol.

Returns
the set of excluded interfaces

Definition at line 1218 of file ripng.cc.

References m_interfaceExclusions.

uint8_t ns3::RipNg::GetInterfaceMetric ( uint32_t  interface) const

Get the metric for an interface.

Parameters
interfacethe interface
Returns
the interface metric

Definition at line 1230 of file ripng.cc.

References m_interfaceMetrics, and NS_LOG_FUNCTION.

void ns3::RipNg::HandleRequests ( RipNgHeader  hdr,
Ipv6Address  senderAddress,
uint16_t  senderPort,
uint32_t  incomingInterface,
uint8_t  hopLimit 
)
private
void ns3::RipNg::HandleResponses ( RipNgHeader  hdr,
Ipv6Address  senderAddress,
uint32_t  incomingInterface,
uint8_t  hopLimit 
)
private
void ns3::RipNg::InvalidateRoute ( RipNgRoutingTableEntry route)
private

Invalidate a route.

Parameters
routethe route to be removed

Definition at line 680 of file ripng.cc.

References DeleteRoute(), m_garbageCollectionDelay, m_routes, NS_ABORT_MSG, NS_LOG_FUNCTION, ns3::RipNgRoutingTableEntry::RIPNG_INVALID, ns3::Simulator::Schedule(), ns3::RipNgRoutingTableEntry::SetRouteChanged(), ns3::RipNgRoutingTableEntry::SetRouteMetric(), and ns3::RipNgRoutingTableEntry::SetRouteStatus().

Referenced by HandleResponses(), NotifyInterfaceDown(), and NotifyRemoveAddress().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< Ipv6Route > ns3::RipNg::Lookup ( Ipv6Address  dest,
Ptr< NetDevice interface = 0 
)
private
void ns3::RipNg::NotifyAddAddress ( uint32_t  interface,
Ipv6InterfaceAddress  address 
)
virtual

Notify when specified interface add an address.

Protocols are expected to implement this method to be notified whenever a new address is added to an interface. Typically used to add a 'network route' on an interface. Can be invoked on an up or down interface.

Parameters
interfacethe index of the interface we are being notified about
addressa new address being added to an interface
Todo:
Configurable option to enable RFC 1222 Strong End System Model

Implements ns3::Ipv6RoutingProtocol.

Definition at line 393 of file ripng.cc.

References AddNetworkRouteTo(), ns3::Ipv6Address::CombinePrefix(), ns3::Ipv6InterfaceAddress::GetAddress(), ns3::Ipv6InterfaceAddress::GetPrefix(), m_interfaceExclusions, m_ipv6, NS_LOG_FUNCTION, and SendTriggeredRouteUpdate().

+ Here is the call graph for this function:

void ns3::RipNg::NotifyAddRoute ( Ipv6Address  dst,
Ipv6Prefix  mask,
Ipv6Address  nextHop,
uint32_t  interface,
Ipv6Address  prefixToUse = Ipv6Address::GetZero() 
)
virtual

Notify a new route.

Typically this is used to add another route from IPv6 stack (i.e. ICMPv6 redirect case, ...).

Parameters
dstdestination address
maskdestination mask
nextHopnextHop for this destination
interfaceoutput interface
prefixToUseprefix to use as source with this route
Todo:
Configurable option to enable RFC 1222 Strong End System Model

Implements ns3::Ipv6RoutingProtocol.

Definition at line 455 of file ripng.cc.

References NS_LOG_INFO.

void ns3::RipNg::NotifyInterfaceDown ( uint32_t  interface)
virtual

Notify when specified interface goes DOWN.

Protocols are expected to implement this method to be notified of the state change of an interface in a node.

Parameters
interfacethe index of the interface we are being notified about
Todo:
Configurable option to enable RFC 1222 Strong End System Model

Implements ns3::Ipv6RoutingProtocol.

Definition at line 362 of file ripng.cc.

References InvalidateRoute(), m_interfaceExclusions, m_routes, m_sendSocketList, NS_LOG_FUNCTION, NS_LOG_INFO, and SendTriggeredRouteUpdate().

Referenced by SetIpv6().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RipNg::NotifyInterfaceUp ( uint32_t  interface)
virtual

Notify when specified interface goes UP.

Protocols are expected to implement this method to be notified of the state change of an interface in a node.

Parameters
interfacethe index of the interface we are being notified about
Todo:
Configurable option to enable RFC 1222 Strong End System Model

Implements ns3::Ipv6RoutingProtocol.

Definition at line 275 of file ripng.cc.

References AddNetworkRouteTo(), first::address, ns3::Ipv6Address::CombinePrefix(), ns3::Socket::CreateSocket(), ns3::Ipv6InterfaceAddress::GetAddress(), ns3::Ipv6Address::GetAny(), ns3::Ipv6Prefix::GetOnes(), ns3::Ipv6InterfaceAddress::GetPrefix(), ns3::Ipv6InterfaceAddress::GetScope(), ns3::Ipv6InterfaceAddress::GLOBAL, ns3::Ipv6InterfaceAddress::LINKLOCAL, ns3::TypeId::LookupByName(), m_initialized, m_interfaceExclusions, m_ipv6, m_recvSocket, m_sendSocketList, ns3::MakeCallback(), NS_LOG_FUNCTION, NS_LOG_LOGIC, Receive(), RIPNG_PORT, and SendTriggeredRouteUpdate().

Referenced by SetIpv6().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RipNg::NotifyRemoveAddress ( uint32_t  interface,
Ipv6InterfaceAddress  address 
)
virtual

Notify when specified interface add an address.

Protocols are expected to implement this method to be notified whenever a new address is removed from an interface. Typically used to remove the 'network route' of an interface. Can be invoked on an up or down interface.

Parameters
interfacethe index of the interface we are being notified about
addressa new address being added to an interface
Todo:
Configurable option to enable RFC 1222 Strong End System Model

Implements ns3::Ipv6RoutingProtocol.

Definition at line 418 of file ripng.cc.

References ns3::Ipv6Address::CombinePrefix(), ns3::Ipv6InterfaceAddress::GetAddress(), ns3::Ipv6InterfaceAddress::GetPrefix(), ns3::Ipv6InterfaceAddress::GetScope(), ns3::Ipv6InterfaceAddress::GLOBAL, InvalidateRoute(), m_interfaceExclusions, m_ipv6, m_routes, NS_LOG_FUNCTION, and SendTriggeredRouteUpdate().

+ Here is the call graph for this function:

void ns3::RipNg::NotifyRemoveRoute ( Ipv6Address  dst,
Ipv6Prefix  mask,
Ipv6Address  nextHop,
uint32_t  interface,
Ipv6Address  prefixToUse = Ipv6Address::GetZero() 
)
virtual

Notify route removing.

Parameters
dstdestination address
maskdestination mask
nextHopnextHop for this destination
interfaceoutput interface
prefixToUseprefix to use as source with this route
Todo:
Configurable option to enable RFC 1222 Strong End System Model

Implements ns3::Ipv6RoutingProtocol.

Definition at line 461 of file ripng.cc.

References NS_LOG_FUNCTION.

void ns3::RipNg::Receive ( Ptr< Socket socket)
private
void ns3::RipNg::RecvMulticastRipng ( Ptr< Socket socket)
private

Receive and process multicast packet.

Parameters
socketsocket where packet is arrived
void ns3::RipNg::RecvUnicastRipng ( Ptr< Socket socket)
private

Receive and process unicast packet.

Parameters
socketsocket where packet is arrived
bool ns3::RipNg::RouteInput ( Ptr< const Packet p,
const Ipv6Header header,
Ptr< const NetDevice idev,
UnicastForwardCallback  ucb,
MulticastForwardCallback  mcb,
LocalDeliverCallback  lcb,
ErrorCallback  ecb 
)
virtual

Route an input packet (to be forwarded or locally delivered)

This lookup is used in the forwarding process. The packet is handed over to the Ipv6RoutingProtocol, and will get forwarded onward by one of the callbacks. The Linux equivalent is ip_route_input (). There are four valid outcomes, and a matching callbacks to handle each.

Parameters
preceived packet
headerinput parameter used to form a search key for a route
idevPointer to ingress network device
ucbCallback for the case in which the packet is to be forwarded as unicast
mcbCallback for the case in which the packet is to be forwarded as multicast
lcbCallback for the case in which the packet is to be locally delivered
ecbCallback to call if there is an error in forwarding
Returns
true if the Ipv6RoutingProtocol takes responsibility for forwarding or delivering the packet, false otherwise
Todo:
Configurable option to enable RFC 1222 Strong End System Model

Implements ns3::Ipv6RoutingProtocol.

Definition at line 205 of file ripng.cc.

References ns3::Socket::ERROR_NOROUTETOHOST, ns3::Ipv6InterfaceAddress::GetAddress(), ns3::Ipv6Header::GetDestinationAddress(), ns3::Ipv6Header::GetSourceAddress(), ns3::Ipv6Address::IsEqual(), ns3::Ipv6Address::IsMulticast(), Lookup(), m_ipv6, NS_ASSERT, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

+ Here is the call graph for this function:

Ptr< Ipv6Route > ns3::RipNg::RouteOutput ( Ptr< Packet p,
const Ipv6Header header,
Ptr< NetDevice oif,
Socket::SocketErrno sockerr 
)
virtual

Query routing cache for an existing route, for an outbound packet.

This lookup is used by transport protocols. It does not cause any packet to be forwarded, and is synchronous. Can be used for multicast or unicast. The Linux equivalent is ip_route_output ()

Parameters
ppacket to be routed. Note that this method may modify the packet. Callers may also pass in a null pointer.
headerinput parameter (used to form key to search for the route)
oifOutput interface device. May be zero, or may be bound via socket options to a particular output interface.
sockerrOutput parameter; socket errno
Returns
a code that indicates what happened in the lookup
Todo:
Configurable option to enable RFC 1222 Strong End System Model

Implements ns3::Ipv6RoutingProtocol.

Definition at line 175 of file ripng.cc.

References ns3::Socket::ERROR_NOROUTETOHOST, ns3::Socket::ERROR_NOTERROR, ns3::Ipv6Header::GetDestinationAddress(), ns3::Ipv6Address::IsMulticast(), Lookup(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

+ Here is the call graph for this function:

void ns3::RipNg::SendRouteRequest ( )
private
void ns3::RipNg::SendTriggeredRouteUpdate ( )
private

Send Triggered Routing Updates on all interfaces.

Definition at line 1173 of file ripng.cc.

References DoSendRouteUpdate(), ns3::Time::GetSeconds(), ns3::UniformRandomVariable::GetValue(), ns3::EventId::IsRunning(), m_maxTriggeredUpdateDelay, m_minTriggeredUpdateDelay, m_nextTriggeredUpdate, m_rng, NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::Simulator::Schedule().

Referenced by HandleResponses(), NotifyAddAddress(), NotifyInterfaceDown(), NotifyInterfaceUp(), and NotifyRemoveAddress().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RipNg::SendUnsolicitedRouteUpdate ( void  )
private

Send Unsolicited Routing Updates on all interfaces.

Definition at line 1203 of file ripng.cc.

References ns3::EventId::Cancel(), DoSendRouteUpdate(), ns3::Time::GetSeconds(), ns3::UniformRandomVariable::GetValue(), ns3::EventId::IsRunning(), m_nextTriggeredUpdate, m_nextUnsolicitedUpdate, m_rng, m_unsolicitedUpdate, NS_LOG_FUNCTION, and ns3::Simulator::Schedule().

Referenced by DoInitialize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RipNg::SetInterfaceExclusions ( std::set< uint32_t >  exceptions)

Set the set of interface excluded from the protocol.

Parameters
exceptionsthe set of excluded interfaces

Definition at line 1223 of file ripng.cc.

References m_interfaceExclusions, and NS_LOG_FUNCTION.

void ns3::RipNg::SetInterfaceMetric ( uint32_t  interface,
uint8_t  metric 
)

Set the metric for an interface.

Parameters
interfacethe interface
metricthe interface metric

Definition at line 1242 of file ripng.cc.

References m_interfaceMetrics, and NS_LOG_FUNCTION.

void ns3::RipNg::SetIpv6 ( Ptr< Ipv6 ipv6)
virtual

Typically, invoked directly or indirectly from ns3::Ipv6::SetRoutingProtocol.

Parameters
ipv6the ipv6 object this routing protocol is being associated with
Todo:
Configurable option to enable RFC 1222 Strong End System Model

Implements ns3::Ipv6RoutingProtocol.

Definition at line 467 of file ripng.cc.

References m_ipv6, NotifyInterfaceDown(), NotifyInterfaceUp(), NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Data Documentation

Time ns3::RipNg::m_garbageCollectionDelay
private

Delay before deleting an INVALID route.

Definition at line 382 of file ripng.h.

Referenced by GetTypeId(), and InvalidateRoute().

bool ns3::RipNg::m_initialized
private

Definition at line 406 of file ripng.h.

Referenced by DoInitialize(), and NotifyInterfaceUp().

std::map<uint32_t, uint8_t> ns3::RipNg::m_interfaceMetrics
private

Definition at line 402 of file ripng.h.

Referenced by GetInterfaceMetric(), HandleResponses(), and SetInterfaceMetric().

Time ns3::RipNg::m_maxTriggeredUpdateDelay
private

Max cooldown delay after a Triggered Update.

Definition at line 379 of file ripng.h.

Referenced by DoInitialize(), GetTypeId(), and SendTriggeredRouteUpdate().

Time ns3::RipNg::m_minTriggeredUpdateDelay
private

Min cooldown delay after a Triggered Update.

Definition at line 378 of file ripng.h.

Referenced by DoInitialize(), GetTypeId(), and SendTriggeredRouteUpdate().

EventId ns3::RipNg::m_nextTriggeredUpdate
private

Next Triggered Update event.

Definition at line 397 of file ripng.h.

Referenced by DoDispose(), DoInitialize(), SendTriggeredRouteUpdate(), and SendUnsolicitedRouteUpdate().

EventId ns3::RipNg::m_nextUnsolicitedUpdate
private

Next Unsolicited Update event.

Definition at line 396 of file ripng.h.

Referenced by DoDispose(), DoInitialize(), and SendUnsolicitedRouteUpdate().

Ptr<Socket> ns3::RipNg::m_recvSocket
private

Definition at line 394 of file ripng.h.

Referenced by DoDispose(), DoInitialize(), HandleRequests(), and NotifyInterfaceUp().

Ptr<UniformRandomVariable> ns3::RipNg::m_rng
private

Rng stream.

Definition at line 399 of file ripng.h.

Referenced by AssignStreams(), DoInitialize(), RipNg(), SendTriggeredRouteUpdate(), and SendUnsolicitedRouteUpdate().

Routes ns3::RipNg::m_routes
private
SocketList ns3::RipNg::m_sendSocketList
private

list of sockets for sending (socket, interface index)

Definition at line 393 of file ripng.h.

Referenced by DoDispose(), DoInitialize(), DoSendRouteUpdate(), HandleRequests(), NotifyInterfaceDown(), NotifyInterfaceUp(), and SendRouteRequest().

SplitHorizonType_e ns3::RipNg::m_splitHorizonStrategy
private

Definition at line 404 of file ripng.h.

Referenced by DoSendRouteUpdate(), GetTypeId(), and HandleRequests().

Time ns3::RipNg::m_startupDelay
private

Random delay before protocol startup.

Definition at line 377 of file ripng.h.

Referenced by DoInitialize(), and GetTypeId().

Time ns3::RipNg::m_timeoutDelay
private

Delay before invalidating a route.

Definition at line 381 of file ripng.h.

Referenced by GetTypeId(), and HandleResponses().

Time ns3::RipNg::m_unsolicitedUpdate
private

time between two Unsolicited Routing Updates

Definition at line 380 of file ripng.h.

Referenced by DoInitialize(), GetTypeId(), and SendUnsolicitedRouteUpdate().


The documentation for this class was generated from the following files: