ns3::Ipv4ListRouting Class Reference
[Ipv4 Routing]

#include <ipv4-list-routing.h>

Inherits ns3::Ipv4RoutingProtocol.

Collaboration diagram for ns3::Ipv4ListRouting:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void AddRoutingProtocol (Ptr< Ipv4RoutingProtocol > routingProtocol, int16_t priority)
 Register a new routing protocol to be used in this IPv4 stack.
virtual uint32_t GetNRoutingProtocols (void) const
virtual Ptr< Ipv4RoutingProtocol > GetRoutingProtocol (uint32_t index, int16_t &priority) const

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::Ipv4ListRouting.

Protected Member Functions

void DoDispose (void)


Detailed Description

This class is a specialization of Ipv4RoutingProtocol that allows other instances of Ipv4RoutingProtocol to be inserted in a prioritized list. Routing protocols in the list are consulted one by one, from highest to lowest priority, until a routing protocol is found that will take the packet (this corresponds to a non-zero return value to RouteOutput, or a return value of true to RouteInput). The order by which routing protocols with the same priority value are consulted is undefined.

Member Function Documentation

virtual void ns3::Ipv4ListRouting::AddRoutingProtocol ( Ptr< Ipv4RoutingProtocol >  routingProtocol,
int16_t  priority 
) [virtual]

Register a new routing protocol to be used in this IPv4 stack.

Parameters:
routingProtocol new routing protocol implementation object
priority priority to give to this routing protocol. Values may range between -32768 and +32767.

void ns3::Ipv4ListRouting::DoDispose ( void   )  [protected, virtual]

This method is called by Object::Dispose or by the object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.

Reimplemented from ns3::Object.

virtual uint32_t ns3::Ipv4ListRouting::GetNRoutingProtocols ( void   )  const [virtual]

Returns:
number of routing protocols in the list

virtual Ptr<Ipv4RoutingProtocol> ns3::Ipv4ListRouting::GetRoutingProtocol ( uint32_t  index,
int16_t &  priority 
) const [virtual]

Return pointer to routing protocol stored at index, with the first protocol (index 0) the highest priority, the next one (index 1) the second highest priority, and so on. The priority parameter is an output parameter and it returns the integer priority of the protocol.

Returns:
pointer to routing protocol indexed by
Parameters:
index index of protocol to return
priority output parameter, set to the priority of the protocol being returned

static TypeId ns3::Ipv4ListRouting::GetTypeId ( void   )  [static]

This method returns the TypeId associated to ns3::Ipv4ListRouting.

No Attributes defined for this type.
No TraceSources defined for this type.

Reimplemented from ns3::Object.


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

Generated on Fri Apr 9 15:01:11 2010 for NS-3 by  doxygen 1.5.8