ns3::GlobalRouteManagerImpl Class Reference

A global router implementation. More...

#include <global-route-manager-impl.h>

Collaboration diagram for ns3::GlobalRouteManagerImpl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GlobalRouteManagerImpl ()
virtual ~GlobalRouteManagerImpl ()
virtual void DeleteGlobalRoutes ()
 Delete all static routes on all nodes that have a GlobalRouterInterface.
virtual void SelectRouterNodes ()
 Select which nodes in the system are to be router nodes and aggregate the appropriate interfaces onto those nodes.
virtual void SelectRouterNodes (NodeContainer c)
 Select which nodes in the system are to be router nodes and aggregate the appropriate interfaces onto those nodes.
virtual void BuildGlobalRoutingDatabase ()
 Build the routing database by gathering Link State Advertisements from each node exporting a GlobalRouter interface.
virtual void InitializeRoutes ()
 Compute routes using a Dijkstra SPF computation and populate per-node forwarding tables.
void DebugUseLsdb (GlobalRouteManagerLSDB *)
 Debugging routine; allow client code to supply a pre-built LSDB.
void DebugSPFCalculate (Ipv4Address root)
 Debugging routine; call the core SPF from the unit tests.

Private Types

typedef std::list< std::pair
< uint32_t, Ptr
< Ipv4GlobalRouting > > > 
Ipv4GlobalRoutingList

Private Member Functions

 GlobalRouteManagerImpl (GlobalRouteManagerImpl &srmi)
 GlobalRouteManagerImpl copy construction is disallowed. There's no need for it and a compiler provided shallow copy would be wrong.
GlobalRouteManagerImploperator= (GlobalRouteManagerImpl &srmi)
 Global Route Manager Implementation assignment operator is disallowed. There's no need for it and a compiler provided shallow copy would be hopelessly wrong.
void SPFCalculate (Ipv4Address root)
void SPFProcessStubs (SPFVertex *v)
void SPFNext (SPFVertex *, CandidateQueue &)
int SPFNexthopCalculation (SPFVertex *v, SPFVertex *w, GlobalRoutingLinkRecord *l, uint32_t distance)
void SPFVertexAddParent (SPFVertex *v)
GlobalRoutingLinkRecordSPFGetNextLink (SPFVertex *v, SPFVertex *w, GlobalRoutingLinkRecord *prev_link)
void SPFIntraAddRouter (SPFVertex *v)
void SPFIntraAddTransit (SPFVertex *v)
void SPFIntraAddStub (GlobalRoutingLinkRecord *l, SPFVertex *v)
uint32_t FindOutgoingTypeId (Ipv4Address a, Ipv4Mask amask=Ipv4Mask("255.255.255.255"))
void AddGlobalRoutingProtocol (uint32_t nodeId, Ptr< Ipv4GlobalRouting > proto)
Ptr< Ipv4GlobalRoutingGetGlobalRoutingProtocol (uint32_t nodeId)

Private Attributes

SPFVertexm_spfroot
GlobalRouteManagerLSDBm_lsdb
Ipv4GlobalRoutingList m_routingProtocols

Detailed Description

A global router implementation.

This singleton object can query interface each node in the system for a GlobalRouter interface. For those nodes, it fetches one or more Link State Advertisements and stores them in a local database. Then, it can compute shortest paths on a per-node basis to all routers, and finally configure each of the node's forwarding tables.

The design is guided by OSPFv2 RFC 2328 section 16.1.1 and quagga ospfd.

Definition at line 717 of file global-route-manager-impl.h.


Member Typedef Documentation

typedef std::list< std::pair< uint32_t, Ptr<Ipv4GlobalRouting> > > ns3::GlobalRouteManagerImpl::Ipv4GlobalRoutingList [private]

Definition at line 806 of file global-route-manager-impl.h.


Constructor & Destructor Documentation

ns3::GlobalRouteManagerImpl::GlobalRouteManagerImpl (  ) 

Definition at line 340 of file global-route-manager-impl.cc.

References m_lsdb, and NS_LOG_FUNCTION_NOARGS.

ns3::GlobalRouteManagerImpl::~GlobalRouteManagerImpl (  )  [virtual]

Definition at line 348 of file global-route-manager-impl.cc.

References m_lsdb, and NS_LOG_FUNCTION_NOARGS.

ns3::GlobalRouteManagerImpl::GlobalRouteManagerImpl ( GlobalRouteManagerImpl srmi  )  [private]

GlobalRouteManagerImpl copy construction is disallowed. There's no need for it and a compiler provided shallow copy would be wrong.


Member Function Documentation

void ns3::GlobalRouteManagerImpl::AddGlobalRoutingProtocol ( uint32_t  nodeId,
Ptr< Ipv4GlobalRouting proto 
) [private]

Definition at line 1658 of file global-route-manager-impl.cc.

References m_routingProtocols, and NS_LOG_FUNCTION.

Referenced by SelectRouterNodes().

void ns3::GlobalRouteManagerImpl::BuildGlobalRoutingDatabase (  )  [virtual]

Build the routing database by gathering Link State Advertisements from each node exporting a GlobalRouter interface.

Definition at line 472 of file global-route-manager-impl.cc.

References ns3::NodeList::Begin(), ns3::NodeList::End(), ns3::GlobalRoutingLSA::GetLinkStateId(), ns3::GlobalRouteManagerLSDB::Insert(), m_lsdb, NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.

void ns3::GlobalRouteManagerImpl::DebugSPFCalculate ( Ipv4Address  root  ) 

Debugging routine; call the core SPF from the unit tests.

Definition at line 1055 of file global-route-manager-impl.cc.

References NS_LOG_FUNCTION, and SPFCalculate().

Referenced by ns3::GlobalRouteManagerImplTest::RunTests().

void ns3::GlobalRouteManagerImpl::DebugUseLsdb ( GlobalRouteManagerLSDB lsdb  ) 

Debugging routine; allow client code to supply a pre-built LSDB.

Definition at line 358 of file global-route-manager-impl.cc.

References m_lsdb, and NS_LOG_FUNCTION.

Referenced by ns3::GlobalRouteManagerImplTest::RunTests().

void ns3::GlobalRouteManagerImpl::DeleteGlobalRoutes (  )  [virtual]

Delete all static routes on all nodes that have a GlobalRouterInterface.

TODO: separate manually assigned static routes from static routes that the global routing code injects, and only delete the latter

Definition at line 369 of file global-route-manager-impl.cc.

References ns3::NodeList::Begin(), ns3::NodeList::End(), GetGlobalRoutingProtocol(), m_lsdb, NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.

uint32_t ns3::GlobalRouteManagerImpl::FindOutgoingTypeId ( Ipv4Address  a,
Ipv4Mask  amask = Ipv4Mask("255.255.255.255") 
) [private]
Ptr< Ipv4GlobalRouting > ns3::GlobalRouteManagerImpl::GetGlobalRoutingProtocol ( uint32_t  nodeId  )  [private]
void ns3::GlobalRouteManagerImpl::InitializeRoutes (  )  [virtual]

Compute routes using a Dijkstra SPF computation and populate per-node forwarding tables.

Definition at line 553 of file global-route-manager-impl.cc.

References ns3::NodeList::Begin(), ns3::NodeList::End(), NS_LOG_FUNCTION_NOARGS, and SPFCalculate().

GlobalRouteManagerImpl& ns3::GlobalRouteManagerImpl::operator= ( GlobalRouteManagerImpl srmi  )  [private]

Global Route Manager Implementation assignment operator is disallowed. There's no need for it and a compiler provided shallow copy would be hopelessly wrong.

void ns3::GlobalRouteManagerImpl::SelectRouterNodes ( NodeContainer  c  )  [virtual]

Select which nodes in the system are to be router nodes and aggregate the appropriate interfaces onto those nodes.

Definition at line 433 of file global-route-manager-impl.cc.

References AddGlobalRoutingProtocol(), ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

void ns3::GlobalRouteManagerImpl::SelectRouterNodes (  )  [virtual]

Select which nodes in the system are to be router nodes and aggregate the appropriate interfaces onto those nodes.

Definition at line 404 of file global-route-manager-impl.cc.

References AddGlobalRoutingProtocol(), ns3::NodeList::Begin(), ns3::NodeList::End(), NS_ASSERT_MSG, NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.

void ns3::GlobalRouteManagerImpl::SPFCalculate ( Ipv4Address  root  )  [private]
GlobalRoutingLinkRecord * ns3::GlobalRouteManagerImpl::SPFGetNextLink ( SPFVertex v,
SPFVertex w,
GlobalRoutingLinkRecord prev_link 
) [private]
void ns3::GlobalRouteManagerImpl::SPFIntraAddRouter ( SPFVertex v  )  [private]
void ns3::GlobalRouteManagerImpl::SPFIntraAddStub ( GlobalRoutingLinkRecord l,
SPFVertex v 
) [private]
void ns3::GlobalRouteManagerImpl::SPFIntraAddTransit ( SPFVertex v  )  [private]
void ns3::GlobalRouteManagerImpl::SPFNext ( SPFVertex v,
CandidateQueue candidate 
) [private]
int ns3::GlobalRouteManagerImpl::SPFNexthopCalculation ( SPFVertex v,
SPFVertex w,
GlobalRoutingLinkRecord l,
uint32_t  distance 
) [private]
void ns3::GlobalRouteManagerImpl::SPFProcessStubs ( SPFVertex v  )  [private]
void ns3::GlobalRouteManagerImpl::SPFVertexAddParent ( SPFVertex v  )  [private]

Member Data Documentation


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:12:11 2009 for NS-3 by  doxygen 1.6.3