ns3::SPFVertex Class Reference

Vertex used in shortest path first (SPF) computations. See RFC 2328, Section 16. More...

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

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

List of all members.

Public Types

enum  VertexType { VertexUnknown = 0, VertexRouter, VertexNetwork }
 

Enumeration of the possible types of SPFVertex objects.

More...

Public Member Functions

 SPFVertex ()
 Construct an empty ("uninitialized") SPFVertex (Shortest Path First Vertex).
 SPFVertex (GlobalRoutingLSA *lsa)
 Construct an initialized SPFVertex (Shortest Path First Vertex).
 ~SPFVertex ()
 Destroy an SPFVertex (Shortest Path First Vertex).
VertexType GetVertexType (void) const
 Get the Vertex Type field of a SPFVertex object.
void SetVertexType (VertexType type)
 Set the Vertex Type field of a SPFVertex object.
Ipv4Address GetVertexId (void) const
 Get the Vertex ID field of a SPFVertex object.
void SetVertexId (Ipv4Address id)
 Set the Vertex ID field of a SPFVertex object.
GlobalRoutingLSAGetLSA (void) const
 Get the Global Router Link State Advertisement returned by the Global Router represented by this SPFVertex during the route discovery process.
void SetLSA (GlobalRoutingLSA *lsa)
 Set the Global Router Link State Advertisement returned by the Global Router represented by this SPFVertex during the route discovery process.
uint32_t GetDistanceFromRoot (void) const
 Get the distance from the root vertex to "this" SPFVertex object.
void SetDistanceFromRoot (uint32_t distance)
 Set the distance from the root vertex to "this" SPFVertex object.
uint32_t GetOutgoingTypeId (void) const
 Get the interface ID that should be used to begin forwarding packets from the root SPFVertex to "this" SPFVertex.
void SetOutgoingTypeId (uint32_t id)
 Set the interface ID that should be used to begin forwarding packets from the root SPFVertex to "this" SPFVertex.
Ipv4Address GetNextHop (void) const
 Get the IP address that should be used to begin forwarding packets from the root SPFVertex to "this" SPFVertex.
void SetNextHop (Ipv4Address nextHop)
 Set the IP address that should be used to begin forwarding packets from the root SPFVertex to "this" SPFVertex.
SPFVertexGetParent (void) const
 Get a pointer to the SPFVector that is the parent of "this" SPFVertex.
void SetParent (SPFVertex *parent)
 Set the pointer to the SPFVector that is the parent of "this" SPFVertex.
uint32_t GetNChildren (void) const
 Get the number of children of "this" SPFVertex.
SPFVertexGetChild (uint32_t n) const
 Get a borrowed SPFVertex pointer to the specified child of "this" SPFVertex.
uint32_t AddChild (SPFVertex *child)
 Get a borrowed SPFVertex pointer to the specified child of "this" SPFVertex.
void SetVertexProcessed (bool value)
 Set the value of the VertexProcessed flag.
bool IsVertexProcessed (void) const
 Check the value of the VertexProcessed flag.

Private Types

typedef std::list< SPFVertex * > ListOfSPFVertex_t

Private Member Functions

 SPFVertex (SPFVertex &v)
 The SPFVertex copy construction is disallowed. There's no need for it and a compiler provided shallow copy would be wrong.
SPFVertexoperator= (SPFVertex &v)
 The SPFVertex copy assignment operator is disallowed. There's no need for it and a compiler provided shallow copy would be wrong.

Private Attributes

VertexType m_vertexType
Ipv4Address m_vertexId
GlobalRoutingLSAm_lsa
uint32_t m_distanceFromRoot
uint32_t m_rootOif
Ipv4Address m_nextHop
SPFVertexm_parent
ListOfSPFVertex_t m_children
bool m_vertexProcessed

Detailed Description

Vertex used in shortest path first (SPF) computations. See RFC 2328, Section 16.

Each router in the simulation is associated with an SPFVertex object. When calculating routes, each of these routers is, in turn, chosen as the "root" of the calculation and routes to all of the other routers are eventually saved in the routing tables of each of the chosen nodes. Each of these routers in the calculation has an associated SPFVertex.

The "Root" vertex is the SPFVertex representing the router that is having its routing tables set. The SPFVertex objects representing other routers or networks in the simulation are arranged in the SPF tree. It is this tree that represents the Shortest Paths to the other networks.

Each SPFVertex has a pointer to the Global Router Link State Advertisement (LSA) that its underlying router has exported. Within these LSAs are Global Router Link Records that describe the point to point links from the underlying router to other nodes (represented by other SPFVertex objects) in the simulation topology. The combination of the arrangement of the SPFVertex objects in the SPF tree, along with the details of the link records that connect them provide the information required to construct the required routes.

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


Member Typedef Documentation

typedef std::list<SPFVertex*> ns3::SPFVertex::ListOfSPFVertex_t [private]

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


Member Enumeration Documentation

Enumeration of the possible types of SPFVertex objects.

Enumerator:
VertexUnknown 

Uninitialized Link Record

VertexRouter 

Vertex representing a router in the topology

VertexNetwork 

Vertex representing a network in the topology

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


Constructor & Destructor Documentation

ns3::SPFVertex::SPFVertex (  ) 

Construct an empty ("uninitialized") SPFVertex (Shortest Path First Vertex).

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

References NS_LOG_FUNCTION_NOARGS.

ns3::SPFVertex::SPFVertex ( GlobalRoutingLSA lsa  ) 
ns3::SPFVertex::~SPFVertex (  ) 

Destroy an SPFVertex (Shortest Path First Vertex).

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

References m_children, and NS_LOG_FUNCTION_NOARGS.

ns3::SPFVertex::SPFVertex ( SPFVertex v  )  [private]

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


Member Function Documentation

uint32_t ns3::SPFVertex::AddChild ( SPFVertex child  ) 

Get a borrowed SPFVertex pointer to the specified child of "this" SPFVertex.

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

References m_children, and NS_LOG_FUNCTION.

Referenced by ns3::GlobalRouteManagerImpl::SPFVertexAddParent().

SPFVertex * ns3::SPFVertex::GetChild ( uint32_t  n  )  const

Get a borrowed SPFVertex pointer to the specified child of "this" SPFVertex.

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

References m_children, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by ns3::GlobalRouteManagerImpl::SPFProcessStubs().

uint32_t ns3::SPFVertex::GetDistanceFromRoot ( void   )  const

Get the distance from the root vertex to "this" SPFVertex object.

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

References m_distanceFromRoot, and NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::CandidateQueue::Push(), ns3::GlobalRouteManagerImplTest::RunTests(), and ns3::GlobalRouteManagerImpl::SPFNext().

GlobalRoutingLSA * ns3::SPFVertex::GetLSA ( void   )  const
uint32_t ns3::SPFVertex::GetNChildren ( void   )  const

Get the number of children of "this" SPFVertex.

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

References m_children, and NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::GlobalRouteManagerImpl::SPFProcessStubs().

Ipv4Address ns3::SPFVertex::GetNextHop ( void   )  const
uint32_t ns3::SPFVertex::GetOutgoingTypeId ( void   )  const
SPFVertex * ns3::SPFVertex::GetParent ( void   )  const

Get a pointer to the SPFVector that is the parent of "this" SPFVertex.

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

References m_parent, and NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::GlobalRouteManagerImpl::SPFNexthopCalculation(), and ns3::GlobalRouteManagerImpl::SPFVertexAddParent().

Ipv4Address ns3::SPFVertex::GetVertexId ( void   )  const
SPFVertex::VertexType ns3::SPFVertex::GetVertexType ( void   )  const
bool ns3::SPFVertex::IsVertexProcessed ( void   )  const

Check the value of the VertexProcessed flag.

Flag to note whether vertex has been processed in stage two of SPF computation

Returns:
value of underlying flag

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

References m_vertexProcessed.

Referenced by ns3::GlobalRouteManagerImpl::SPFProcessStubs().

SPFVertex& ns3::SPFVertex::operator= ( SPFVertex v  )  [private]

The SPFVertex copy assignment operator is disallowed. There's no need for it and a compiler provided shallow copy would be wrong.

void ns3::SPFVertex::SetDistanceFromRoot ( uint32_t  distance  ) 
void ns3::SPFVertex::SetLSA ( GlobalRoutingLSA lsa  ) 

Set the Global Router Link State Advertisement returned by the Global Router represented by this SPFVertex during the route discovery process.

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

References m_lsa, and NS_LOG_FUNCTION.

void ns3::SPFVertex::SetNextHop ( Ipv4Address  nextHop  ) 

Set the IP address that should be used to begin forwarding packets from the root SPFVertex to "this" SPFVertex.

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

References m_nextHop, and NS_LOG_FUNCTION.

Referenced by ns3::GlobalRouteManagerImpl::SPFNexthopCalculation().

void ns3::SPFVertex::SetOutgoingTypeId ( uint32_t  id  ) 

Set the interface ID that should be used to begin forwarding packets from the root SPFVertex to "this" SPFVertex.

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

References m_rootOif, and NS_LOG_FUNCTION.

Referenced by ns3::GlobalRouteManagerImpl::SPFNexthopCalculation().

void ns3::SPFVertex::SetParent ( SPFVertex parent  ) 

Set the pointer to the SPFVector that is the parent of "this" SPFVertex.

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

References m_parent, and NS_LOG_FUNCTION.

Referenced by ns3::GlobalRouteManagerImpl::SPFNexthopCalculation().

void ns3::SPFVertex::SetVertexId ( Ipv4Address  id  ) 

Set the Vertex ID field of a SPFVertex object.

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

References m_vertexId, and NS_LOG_FUNCTION.

void ns3::SPFVertex::SetVertexProcessed ( bool  value  ) 

Set the value of the VertexProcessed flag.

Flag to note whether vertex has been processed in stage two of SPF computation

Parameters:
value boolean value to set the flag

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

References m_vertexProcessed.

Referenced by ns3::GlobalRouteManagerImpl::SPFProcessStubs().

void ns3::SPFVertex::SetVertexType ( SPFVertex::VertexType  type  ) 

Set the Vertex Type field of a SPFVertex object.

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

References m_vertexType, and NS_LOG_FUNCTION.


Member Data Documentation

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

Referenced by AddChild(), GetChild(), GetNChildren(), and ~SPFVertex().

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

Referenced by GetDistanceFromRoot(), and SetDistanceFromRoot().

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

Referenced by GetLSA(), and SetLSA().

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

Referenced by GetNextHop(), and SetNextHop().

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

Referenced by GetParent(), and SetParent().

uint32_t ns3::SPFVertex::m_rootOif [private]

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

Referenced by GetOutgoingTypeId(), and SetOutgoingTypeId().

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

Referenced by GetVertexId(), and SetVertexId().

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

Referenced by IsVertexProcessed(), and SetVertexProcessed().

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

Referenced by GetVertexType(), SetVertexType(), and SPFVertex().


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