NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ns3::RocketfuelMapReader Class Reference

Topology file reader and topology estimator (extension of Rocketfuel-format type). More...

#include <rocketfuel-map-reader.hpp>

Inheritance diagram for ns3::RocketfuelMapReader:
Collaboration diagram for ns3::RocketfuelMapReader:

Public Member Functions

 RocketfuelMapReader (const std::string &path="", double scale=1.0, const string &referenceOspfRate="100Mbps")
 
virtual ~RocketfuelMapReader ()
 
virtual NodeContainer Read ()
 Deprecated call. More...
 
virtual NodeContainer Read (RocketfuelParams params, bool keepOneComponent=true, bool connectBackbones=true)
 Main topology reading function. More...
 
const NodeContainer & GetBackboneRouters () const
 
const NodeContainer & GetGatewayRouters () const
 
const NodeContainer & GetCustomerRouters () const
 
virtual void SaveTopology (const std::string &file)
 Save positions (e.g., after manual modification using visualizer) More...
 
virtual void SaveGraphviz (const std::string &file)
 Save topology in graphviz format (.dot file) More...
 
- Public Member Functions inherited from ns3::AnnotatedTopologyReader
 AnnotatedTopologyReader (const std::string &path="", double scale=1.0)
 Constructor. More...
 
virtual ~AnnotatedTopologyReader ()
 
virtual NodeContainer GetNodes () const
 Get nodes read by the reader. More...
 
virtual const std::list< Link > & GetLinks () const
 Get links read by the reader. More...
 
virtual void AssignIpv4Addresses (Ipv4Address base)
 Assign IPv4 addresses to all links. More...
 
virtual void SetBoundingBox (double ulx, double uly, double lrx, double lry)
 Set bounding box where nodes will be randomly places (if positions are unspecified) More...
 
virtual void SetMobilityModel (const std::string &model)
 Set mobility model to be used on nodes. More...
 
virtual void ApplyOspfMetric ()
 Apply OSPF metric on Ipv4 (if exists) and Ccnx (if exists) stacks. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::AnnotatedTopologyReader
Ptr< Node > CreateNode (const std::string name, uint32_t systemId)
 
Ptr< Node > CreateNode (const std::string name, double posX, double posY, uint32_t systemId)
 
void ApplySettings ()
 This method applies setting to corresponding nodes and links NetDeviceContainer must be allocated NodeContainer from Read method. More...
 
- Protected Attributes inherited from ns3::AnnotatedTopologyReader
std::string m_path
 
NodeContainer m_nodes
 

Detailed Description

Topology file reader and topology estimator (extension of Rocketfuel-format type).

http://www.cs.washington.edu/research/networking/rocketfuel/

Only map file (.cch) is supported

In addition to reading specified topology from the .cch file, this class divides nodes into three categories:

  • client nodes (nodes with degrees less or equal to RocketfuelParams.clientNodeDegrees
  • gateway nodes (nodes that directly connected to client nodes)
  • backbone nodes (all the rest)

As some of the .cch files do not give a connected network graph, this reader also allows to keep only the largest connected network graph component.

Definition at line 80 of file rocketfuel-map-reader.hpp.

Constructor & Destructor Documentation

◆ RocketfuelMapReader()

ns3::RocketfuelMapReader::RocketfuelMapReader ( const std::string &  path = "",
double  scale = 1.0,
const string &  referenceOspfRate = "100Mbps" 
)

Definition at line 63 of file rocketfuel-map-reader.cpp.

◆ ~RocketfuelMapReader()

ns3::RocketfuelMapReader::~RocketfuelMapReader ( )
virtual

Definition at line 71 of file rocketfuel-map-reader.cpp.

Member Function Documentation

◆ Read() [1/2]

NodeContainer ns3::RocketfuelMapReader::Read ( )
virtual

Deprecated call.

Read (RocketfuelParams params, bool keepOneComponent=true, bool connectBackbones=true) should be used instead

Reimplemented from ns3::AnnotatedTopologyReader.

Definition at line 76 of file rocketfuel-map-reader.cpp.

◆ Read() [2/2]

NodeContainer ns3::RocketfuelMapReader::Read ( RocketfuelParams  params,
bool  keepOneComponent = true,
bool  connectBackbones = true 
)
virtual

Main topology reading function.

Parameters
paramsparameters specifying range from which link bandwidths and delays should be assigned
keepOneComponentif true, then only the largest connected component will be kept
connectBackbonesif true, then extra links will be added to ensure connectivity of estimated backbone

This method opens an input stream and reads the Rocketfuel-format file. Every row represents a topology link (the ids of a couple of nodes), so the input file is read line by line to figure out how many links and nodes are in the topology.

Returns
the container of the nodes created (or empty container if there was an error)

Definition at line 268 of file rocketfuel-map-reader.cpp.

References ns3::AnnotatedTopologyReader::ApplySettings(), ns3::RocketfuelParams::averageRtt, buf, ns3::RocketfuelParams::clientNodeDegrees, ns3::AnnotatedTopologyReader::CreateNode(), nonstd::variants::get(), ns3::AnnotatedTopologyReader::GetLinks(), ns3::AnnotatedTopologyReader::m_nodes, ns3::RocketfuelParams::maxb2bBandwidth, ns3::RocketfuelParams::maxb2bDelay, ns3::RocketfuelParams::maxb2gBandwidth, ns3::RocketfuelParams::maxb2gDelay, ns3::RocketfuelParams::maxg2cBandwidth, ns3::RocketfuelParams::maxg2cDelay, ns3::RocketfuelParams::minb2bBandwidth, ns3::RocketfuelParams::minb2bDelay, ns3::RocketfuelParams::minb2gBandwidth, ns3::RocketfuelParams::minb2gDelay, ns3::RocketfuelParams::ming2cBandwidth, ns3::RocketfuelParams::ming2cDelay, REGMATCH_MAX, and ROCKETFUEL_MAPS_LINE.

◆ GetBackboneRouters()

const NodeContainer & ns3::RocketfuelMapReader::GetBackboneRouters ( ) const

Definition at line 466 of file rocketfuel-map-reader.cpp.

◆ GetGatewayRouters()

const NodeContainer & ns3::RocketfuelMapReader::GetGatewayRouters ( ) const

Definition at line 472 of file rocketfuel-map-reader.cpp.

◆ GetCustomerRouters()

const NodeContainer & ns3::RocketfuelMapReader::GetCustomerRouters ( ) const

Definition at line 478 of file rocketfuel-map-reader.cpp.

◆ SaveTopology()

void ns3::RocketfuelMapReader::SaveTopology ( const std::string &  file)
virtual

Save positions (e.g., after manual modification using visualizer)

Reimplemented from ns3::AnnotatedTopologyReader.

Definition at line 496 of file rocketfuel-map-reader.cpp.

References ns3::nodeWriter().

◆ SaveGraphviz()

void ns3::RocketfuelMapReader::SaveGraphviz ( const std::string &  file)
virtual

Save topology in graphviz format (.dot file)

Reimplemented from ns3::AnnotatedTopologyReader.

Definition at line 596 of file rocketfuel-map-reader.cpp.

References nonstd::variants::get().


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