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

A global router implementation. More...

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

+ Collaboration diagram for ns3::GlobalRouteManagerImpl:

Public Member Functions

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

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.

Constructor & Destructor Documentation

ns3::GlobalRouteManagerImpl::GlobalRouteManagerImpl ( )

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

References m_lsdb, and NS_LOG_FUNCTION_NOARGS.

ns3::GlobalRouteManagerImpl::~GlobalRouteManagerImpl ( )
virtual

Definition at line 536 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::BuildGlobalRoutingDatabase ( )
virtual

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

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

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

+ Here is the call graph for this function:

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

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

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

References NS_LOG_FUNCTION, and SPFCalculate().

Referenced by ns3::GlobalRouteManagerImplTestCase::DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

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

References m_lsdb, and NS_LOG_FUNCTION.

Referenced by ns3::GlobalRouteManagerImplTestCase::DoRun().

+ Here is the caller graph for this function:

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

References ns3::NodeList::Begin(), ns3::NodeList::End(), ns3::Node::GetId(), ns3::Ipv4GlobalRouting::GetNRoutes(), ns3::Object::GetObject(), m_lsdb, NS_LOG_FUNCTION_NOARGS, NS_LOG_LOGIC, and ns3::Ipv4GlobalRouting::RemoveRoute().

+ Here is the call graph for this function:

int32_t ns3::GlobalRouteManagerImpl::FindOutgoingInterfaceId ( Ipv4Address  a,
Ipv4Mask  amask = Ipv4Mask ("255.255.255.255") 
)
private

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

References ns3::NodeList::Begin(), ns3::NodeList::End(), ns3::Object::GetObject(), ns3::SPFVertex::GetVertexId(), m_spfroot, NS_ASSERT_MSG, NS_FATAL_ERROR, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by CheckForStubNode(), and SPFNexthopCalculation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::GlobalRouteManagerImpl::InitializeRoutes ( )
virtual

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

Definition at line 684 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_NOARGS, NS_LOG_INFO, and SPFCalculate().

+ Here is the call graph for this function:

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.

GlobalRoutingLinkRecord * ns3::GlobalRouteManagerImpl::SPFGetNextLink ( SPFVertex v,
SPFVertex w,
GlobalRoutingLinkRecord prev_link 
)
private
void ns3::GlobalRouteManagerImpl::SPFNext ( SPFVertex v,
CandidateQueue candidate 
)
private
void ns3::GlobalRouteManagerImpl::SPFVertexAddParent ( SPFVertex v)
private

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

References ns3::SPFVertex::AddChild(), ns3::SPFVertex::GetParent(), and NS_LOG_FUNCTION.

Referenced by SPFCalculate(), and SPFNext().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation


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