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

A global router implementation. More...

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

Public Member Functions

virtual void BuildGlobalRoutingDatabase ()
 Build the routing database by gathering Link State Advertisements from each node exporting a GlobalRouter interface. More...
 
void DebugSPFCalculate (Ipv4Address root)
 Debugging routine; call the core SPF from the unit tests. More...
 
void DebugUseLsdb (GlobalRouteManagerLSDB *)
 Debugging routine; allow client code to supply a pre-built LSDB. More...
 
virtual void DeleteGlobalRoutes ()
 Delete all static routes on all nodes that have a GlobalRouterInterface. More...
 
virtual void InitializeRoutes ()
 Compute routes using a Dijkstra SPF computation and populate per-node forwarding tables. More...
 

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.
 
bool CheckForStubNode (Ipv4Address root)
 
int32_t FindOutgoingInterfaceId (Ipv4Address a, Ipv4Mask amask=Ipv4Mask("255.255.255.255"))
 
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 ProcessASExternals (SPFVertex *v, GlobalRoutingLSA *extlsa)
 
void SPFAddASExternal (GlobalRoutingLSA *extlsa, SPFVertex *v)
 
void SPFCalculate (Ipv4Address root)
 
GlobalRoutingLinkRecordSPFGetNextLink (SPFVertex *v, SPFVertex *w, GlobalRoutingLinkRecord *prev_link)
 
void SPFIntraAddRouter (SPFVertex *v)
 
void SPFIntraAddStub (GlobalRoutingLinkRecord *l, SPFVertex *v)
 
void SPFIntraAddTransit (SPFVertex *v)
 
void SPFNext (SPFVertex *, CandidateQueue &)
 
int SPFNexthopCalculation (SPFVertex *v, SPFVertex *w, GlobalRoutingLinkRecord *l, uint32_t distance)
 
void SPFProcessStubs (SPFVertex *v)
 
void SPFVertexAddParent (SPFVertex *v)
 

Private Attributes

GlobalRouteManagerLSDBm_lsdb
 
SPFVertexm_spfroot
 

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 700 of file global-route-manager-impl.h.

Member Function Documentation

void ns3::GlobalRouteManagerImpl::BuildGlobalRoutingDatabase ( )
virtual

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

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

References ns3::NodeList::Begin(), ns3::NodeList::End(), ns3::GlobalRoutingLSA::GetLinkStateId(), ns3::Object::GetObject(), ns3::GlobalRouteManagerLSDB::Insert(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

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

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

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

References NS_LOG_FUNCTION.

Referenced by GlobalRouteManagerImplTestCase::DoRun().

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

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

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

References NS_LOG_FUNCTION.

Referenced by GlobalRouteManagerImplTestCase::DoRun().

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 562 of file global-route-manager-impl.cc.

References ns3::NodeList::Begin(), ns3::NodeList::End(), ns3::Node::GetId(), ns3::Object::GetObject(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

void ns3::GlobalRouteManagerImpl::InitializeRoutes ( )
virtual

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

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

References ns3::NodeList::Begin(), ns3::NodeList::End(), ns3::Object::GetObject(), ns3::Node::GetSystemId(), ns3::MpiInterface::GetSystemId(), NS_LOG_FUNCTION, and NS_LOG_INFO.


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