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

Classes

struct  BriteEdgeInfo
 Edge information from BRITE. More...
 
struct  BriteNodeInfo
 Node information from BRITE. More...
 

Public Member Functions

 BriteTopologyHelper (std::string confFile, std::string seedFile, std::string newseedFile)
 
 BriteTopologyHelper (std::string confFile)
 
void AssignIpv4Addresses (Ipv4AddressHelper &address)
 
void AssignIpv6Addresses (Ipv6AddressHelper &address)
 
void AssignStreams (int64_t streamNumber)
 
void BuildBriteTopology (InternetStackHelper &stack)
 
void BuildBriteTopology (InternetStackHelper &stack, const uint32_t systemCount)
 
Ptr< NodeGetLeafNodeForAs (uint32_t asNum, uint32_t leafNum)
 
uint32_t GetNAs (void) const
 
uint32_t GetNEdgesTopology () const
 
uint32_t GetNLeafNodesForAs (uint32_t asNum)
 
uint32_t GetNNodesForAs (uint32_t asNum)
 
uint32_t GetNNodesTopology () const
 
Ptr< NodeGetNodeForAs (uint32_t asNum, uint32_t nodeNum)
 
uint32_t GetSystemNumberForAs (uint32_t asNum) const
 

Private Types

typedef std::vector
< BriteEdgeInfo
BriteEdgeInfoList
 
typedef std::vector
< BriteNodeInfo
BriteNodeInfoList
 

Private Member Functions

void BuildBriteEdgeInfoList (void)
 
void BuildBriteNodeInfoList (void)
 
void ConstructTopology (void)
 
void GenerateBriteTopology (void)
 

Private Attributes

std::vector< NodeContainer * > m_asLeafNodes
 
BriteEdgeInfoList m_briteEdgeInfoList
 
BriteNodeInfoList m_briteNodeInfoList
 
PointToPointHelper m_britePointToPointHelper
 
std::string m_confFile
 
std::vector< NetDeviceContainer * > m_netDevices
 
std::string m_newSeedFile
 
NodeContainer m_nodes
 
std::vector< NodeContainer * > m_nodesByAs
 
uint32_t m_numAs
 
uint32_t m_numEdges
 
uint32_t m_numNodes
 
std::string m_seedFile
 
std::vector< int > m_systemForAs
 
brite::Topology * m_topology
 
Ptr< UniformRandomVariablem_uv
 

Static Private Attributes

static const int mbpsToBps = 1000000
 

Detailed Description

Definition at line 52 of file brite-topology-helper.h.

Member Typedef Documentation

The BRITE code generates multiple nodes and edges. Each node and edge is stored in a BriteNodeInfo or BriteEdgeInfo struct, and each instance is stored in a vector.

Definition at line 284 of file brite-topology-helper.h.

Member Function Documentation

void ns3::BriteTopologyHelper::AssignIpv4Addresses ( Ipv4AddressHelper address)
Parameters
addressan Ipv4AddressHelper which is used to install Ipv4 addresses on all the node interfaces in the topology

Definition at line 418 of file brite-topology-helper.cc.

References ns3::Ipv4AddressHelper::Assign(), ns3::Ipv4AddressHelper::NewNetwork(), and NS_LOG_FUNCTION.

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

void ns3::BriteTopologyHelper::AssignIpv6Addresses ( Ipv6AddressHelper address)
Parameters
networkan IPv6 address representing the network portion of the IPv6 Address
prefixthe prefix length

Definition at line 430 of file brite-topology-helper.cc.

References ns3::Ipv6AddressHelper::Assign(), ns3::Ipv6AddressHelper::NewNetwork(), and NS_LOG_FUNCTION.

void ns3::BriteTopologyHelper::BuildBriteEdgeInfoList ( void  )
private

Definition at line 181 of file brite-topology-helper.cc.

References NS_FATAL_ERROR, and NS_LOG_FUNCTION.

void ns3::BriteTopologyHelper::BuildBriteNodeInfoList ( void  )
private

Definition at line 96 of file brite-topology-helper.cc.

References NS_FATAL_ERROR, and NS_LOG_FUNCTION.

void ns3::BriteTopologyHelper::ConstructTopology ( void  )
private

Definition at line 442 of file brite-topology-helper.cc.

References ns3::MilliSeconds(), NS_LOG_FUNCTION, and NS_LOG_INFO.

void ns3::BriteTopologyHelper::GenerateBriteTopology ( void  )
private

Definition at line 316 of file brite-topology-helper.cc.

References NS_ASSERT, NS_ASSERT_MSG, and NS_LOG_LOGIC.

uint32_t ns3::BriteTopologyHelper::GetNAs ( void  ) const

Returns the number of AS created in the topology

Returns
the number of AS created in the topology

Definition at line 305 of file brite-topology-helper.cc.

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

uint32_t ns3::BriteTopologyHelper::GetNEdgesTopology ( ) const

Returns the number of edges created within the topology

Returns
the total number of edges within the brite topology

Definition at line 299 of file brite-topology-helper.cc.

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

uint32_t ns3::BriteTopologyHelper::GetNNodesTopology ( ) const

Returns the number of nodes created within the topology

Returns
the total number of nodes within the brite topology

Definition at line 293 of file brite-topology-helper.cc.

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

uint32_t ns3::BriteTopologyHelper::GetSystemNumberForAs ( uint32_t  asNum) const

Returns the system number for the MPI instance that this AS is assigned to. Will always return 0 if MPI not used

Returns
The system number that the specified AS number belongs to

param asNum The AS Number

Definition at line 311 of file brite-topology-helper.cc.


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