A Discrete-Event Network Simulator
API
ns3::V4TraceRouteHelper Class Reference

Create a IPv4 traceroute application and associate it to a node. More...

#include "v4traceroute-helper.h"

+ Collaboration diagram for ns3::V4TraceRouteHelper:

Public Member Functions

 V4TraceRouteHelper (Ipv4Address remote)
 Create a V4TraceRouteHelper which is used to make life easier for people wanting to use TraceRoute. More...
 
ApplicationContainer Install (NodeContainer nodes) const
 Install a TraceRoute application on each Node in the provided NodeContainer. More...
 
ApplicationContainer Install (Ptr< Node > node) const
 Install a TraceRoute application on the provided Node. More...
 
ApplicationContainer Install (std::string nodeName) const
 Install a TraceRoute application on the provided Node. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Configure traceRoute applications attribute. More...
 

Static Public Member Functions

static void PrintTraceRouteAt (Ptr< Node > node, Ptr< OutputStreamWrapper > stream)
 Print the resulting trace routes from given node. More...
 

Private Member Functions

Ptr< ApplicationInstallPriv (Ptr< Node > node) const
 Do the actual application installation in the node. More...
 

Private Attributes

ObjectFactory m_factory
 Object factory. More...
 

Detailed Description

Create a IPv4 traceroute application and associate it to a node.

This class creates one or multiple instances of ns3::V4TraceRoute and associates it/them to one/multiple node(s).

Definition at line 40 of file v4traceroute-helper.h.

Constructor & Destructor Documentation

◆ V4TraceRouteHelper()

ns3::V4TraceRouteHelper::V4TraceRouteHelper ( Ipv4Address  remote)

Create a V4TraceRouteHelper which is used to make life easier for people wanting to use TraceRoute.

Parameters
remoteThe address which should be traced

Definition at line 30 of file v4traceroute-helper.cc.

References m_factory, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

Member Function Documentation

◆ Install() [1/3]

ApplicationContainer ns3::V4TraceRouteHelper::Install ( NodeContainer  nodes) const

Install a TraceRoute application on each Node in the provided NodeContainer.

Parameters
nodesThe NodeContainer containing all of the nodes to get a V4TraceRoute application.
Returns
A list of TraceRoute applications, one for each input node

Definition at line 56 of file v4traceroute-helper.cc.

References ns3::ApplicationContainer::Add(), ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), and InstallPriv().

Referenced by TracerouteExample::InstallApplications().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Install() [2/3]

ApplicationContainer ns3::V4TraceRouteHelper::Install ( Ptr< Node node) const

Install a TraceRoute application on the provided Node.

The Node is specified directly by a Ptr<Node>

Parameters
nodeThe node to install the V4TraceRouteApplication on.
Returns
An ApplicationContainer holding the TraceRoute application created.

Definition at line 43 of file v4traceroute-helper.cc.

References InstallPriv().

+ Here is the call graph for this function:

◆ Install() [3/3]

ApplicationContainer ns3::V4TraceRouteHelper::Install ( std::string  nodeName) const

Install a TraceRoute application on the provided Node.

The Node is specified by a string that must have previously been associated with a Node using the Object Name Service.

Parameters
nodeNameThe node to install the V4TraceRouteApplication on.
Returns
An ApplicationContainer holding the TraceRoute application created.

Definition at line 49 of file v4traceroute-helper.cc.

References InstallPriv().

+ Here is the call graph for this function:

◆ InstallPriv()

Ptr< Application > ns3::V4TraceRouteHelper::InstallPriv ( Ptr< Node node) const
private

Do the actual application installation in the node.

Parameters
nodethe node
Returns
a Smart pointer to the installed application

Definition at line 68 of file v4traceroute-helper.cc.

References ns3::Node::AddApplication(), ns3::ObjectFactory::Create(), and m_factory.

Referenced by Install().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintTraceRouteAt()

void ns3::V4TraceRouteHelper::PrintTraceRouteAt ( Ptr< Node node,
Ptr< OutputStreamWrapper stream 
)
static

Print the resulting trace routes from given node.

Parameters
nodeThe origin node where the traceroute is initiated.
streamThe outputstream used to print the resulting traced routes.

Definition at line 77 of file v4traceroute-helper.cc.

References ns3::Node::GetApplication(), ns3::Node::GetId(), ns3::Node::GetNApplications(), ns3::Object::GetObject(), ns3::OutputStreamWrapper::GetStream(), and NS_ASSERT_MSG.

+ Here is the call graph for this function:

◆ SetAttribute()

void ns3::V4TraceRouteHelper::SetAttribute ( std::string  name,
const AttributeValue value 
)

Configure traceRoute applications attribute.

Parameters
nameattribute's name
valueattribute's value

Definition at line 37 of file v4traceroute-helper.cc.

References m_factory, and ns3::ObjectFactory::Set().

Referenced by TracerouteExample::InstallApplications().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_factory

ObjectFactory ns3::V4TraceRouteHelper::m_factory
private

Object factory.

Definition at line 104 of file v4traceroute-helper.h.

Referenced by InstallPriv(), SetAttribute(), and V4TraceRouteHelper().


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