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 GetOutgoingInterfaceId (void) const
 Get the interface ID that should be used to begin forwarding packets from the root SPFVertex to "this" SPFVertex.
void SetOutgoingInterfaceId (int32_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 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.


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.


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


Member Function Documentation

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

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


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

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