A Discrete-Event Network Simulator
API
ns3::AsciiTraceHelperForIpv4 Class Referenceabstract

Base class providing common user-level ascii trace operations for helpers representing IPv4 protocols . More...

#include "internet-trace-helper.h"

+ Inheritance diagram for ns3::AsciiTraceHelperForIpv4:

Public Member Functions

 AsciiTraceHelperForIpv4 ()
 Construct an AsciiTraceHelperForIpv4. More...
 
virtual ~AsciiTraceHelperForIpv4 ()
 Destroy an AsciiTraceHelperForIpv4. More...
 
void EnableAsciiIpv4 (Ptr< OutputStreamWrapper > stream, Ipv4InterfaceContainer c)
 Enable ascii trace output on each device in the container which is of the appropriate type. More...
 
void EnableAsciiIpv4 (Ptr< OutputStreamWrapper > stream, NodeContainer n)
 Enable ascii trace output on all Ipv4 and interface pairs existing in the nodes provided in the container. More...
 
void EnableAsciiIpv4 (Ptr< OutputStreamWrapper > stream, Ptr< Ipv4 > ipv4, uint32_t interface)
 Enable ascii trace output on the indicated Ipv4 and interface pair. More...
 
void EnableAsciiIpv4 (Ptr< OutputStreamWrapper > stream, std::string ipv4Name, uint32_t interface)
 Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service. More...
 
void EnableAsciiIpv4 (Ptr< OutputStreamWrapper > stream, uint32_t nodeid, uint32_t interface, bool explicitFilename)
 Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface. More...
 
void EnableAsciiIpv4 (std::string prefix, Ipv4InterfaceContainer c)
 Enable ascii trace output on each Ipv4 and interface pair in the container. More...
 
void EnableAsciiIpv4 (std::string prefix, NodeContainer n)
 Enable ascii trace output on all Ipv4 and interface pairs existing in the nodes provided in the container. More...
 
void EnableAsciiIpv4 (std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename=false)
 Enable ascii trace output on the indicated Ipv4 and interface pair. More...
 
void EnableAsciiIpv4 (std::string prefix, std::string ipv4Name, uint32_t interface, bool explicitFilename=false)
 Enable ascii trace output the indicated Ipv4 and interface pair using an Ipv4 previously named using the ns-3 object name service. More...
 
void EnableAsciiIpv4 (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool explicitFilename)
 Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface. More...
 
void EnableAsciiIpv4All (Ptr< OutputStreamWrapper > stream)
 Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation. More...
 
void EnableAsciiIpv4All (std::string prefix)
 Enable ascii trace output on all Ipv4 and interface pairs existing in the set of all nodes created in the simulation. More...
 
virtual void EnableAsciiIpv4Internal (Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename)=0
 Enable ascii trace output on the indicated Ipv4 and interface pair. More...
 

Private Member Functions

void EnableAsciiIpv4Impl (Ptr< OutputStreamWrapper > stream, std::string prefix, Ipv4InterfaceContainer c)
 Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface. More...
 
void EnableAsciiIpv4Impl (Ptr< OutputStreamWrapper > stream, std::string prefix, NodeContainer n)
 Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface. More...
 
void EnableAsciiIpv4Impl (Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename)
 Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface. More...
 
void EnableAsciiIpv4Impl (Ptr< OutputStreamWrapper > stream, std::string prefix, std::string ipv4Name, uint32_t interface, bool explicitFilename)
 Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface. More...
 
void EnableAsciiIpv4Impl (Ptr< OutputStreamWrapper > stream, std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename)
 Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface. More...
 

Detailed Description

Base class providing common user-level ascii trace operations for helpers representing IPv4 protocols .

Definition at line 143 of file internet-trace-helper.h.

Constructor & Destructor Documentation

◆ AsciiTraceHelperForIpv4()

ns3::AsciiTraceHelperForIpv4::AsciiTraceHelperForIpv4 ( )
inline

Construct an AsciiTraceHelperForIpv4.

Definition at line 149 of file internet-trace-helper.h.

◆ ~AsciiTraceHelperForIpv4()

virtual ns3::AsciiTraceHelperForIpv4::~AsciiTraceHelperForIpv4 ( )
inlinevirtual

Destroy an AsciiTraceHelperForIpv4.

Definition at line 156 of file internet-trace-helper.h.

Member Function Documentation

◆ EnableAsciiIpv4() [1/10]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4 ( Ptr< OutputStreamWrapper stream,
Ipv4InterfaceContainer  c 
)

Enable ascii trace output on each device in the container which is of the appropriate type.

Parameters
streamAn OutputStreamWrapper representing an existing file to use when writing trace data.
cIpv4InterfaceContainer of Ipv4 and interface pairs on which to enable tracing.

Definition at line 187 of file internet-trace-helper.cc.

References EnableAsciiIpv4Impl().

+ Here is the call graph for this function:

◆ EnableAsciiIpv4() [2/10]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4 ( Ptr< OutputStreamWrapper stream,
NodeContainer  n 
)

Enable ascii trace output on all Ipv4 and interface pairs existing in the nodes provided in the container.

Parameters
streamAn OutputStreamWrapper representing an existing file to use when writing trace data.
ncontainer of nodes.

Definition at line 219 of file internet-trace-helper.cc.

References EnableAsciiIpv4Impl().

+ Here is the call graph for this function:

◆ EnableAsciiIpv4() [3/10]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4 ( Ptr< OutputStreamWrapper stream,
Ptr< Ipv4 ipv4,
uint32_t  interface 
)

Enable ascii trace output on the indicated Ipv4 and interface pair.

Parameters
streamAn OutputStreamWrapper representing an existing file to use when writing trace data.
ipv4Ptr<Ipv4> on which you want to enable tracing.
interfaceThe interface on which you want to enable tracing.

Definition at line 130 of file internet-trace-helper.cc.

References EnableAsciiIpv4Internal(), and nsclick-simple-lan::ipv4.

+ Here is the call graph for this function:

◆ EnableAsciiIpv4() [4/10]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4 ( Ptr< OutputStreamWrapper stream,
std::string  ipv4Name,
uint32_t  interface 
)

Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service.

Parameters
streamAn OutputStreamWrapper representing an existing file to use when writing trace data.
ipv4NameThe name of the Ipv4 on which you want to enable tracing.
interfaceThe interface on which you want to enable tracing.

Definition at line 153 of file internet-trace-helper.cc.

References EnableAsciiIpv4Impl().

+ Here is the call graph for this function:

◆ EnableAsciiIpv4() [5/10]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4 ( Ptr< OutputStreamWrapper stream,
uint32_t  nodeid,
uint32_t  interface,
bool  explicitFilename 
)

Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface.

Since there can be only one Ipv4 aggregated to a node, the node-id unambiguously determines the Ipv4.

Parameters
streamAn OutputStreamWrapper representing an existing file to use when writing trace data.
nodeidThe node identifier/number of the node on which to enable ascii tracing
interfaceThe interface on which you want to enable tracing.
explicitFilenameTreat the prefix as an explicit filename if true

Definition at line 268 of file internet-trace-helper.cc.

References EnableAsciiIpv4Impl().

+ Here is the call graph for this function:

◆ EnableAsciiIpv4() [6/10]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4 ( std::string  prefix,
Ipv4InterfaceContainer  c 
)

Enable ascii trace output on each Ipv4 and interface pair in the container.

Parameters
prefixFilename prefix to use for ascii files.
cIpv4InterfaceContainer of Ipv4 and interface pairs on which to enable tracing.

Definition at line 178 of file internet-trace-helper.cc.

References EnableAsciiIpv4Impl().

+ Here is the call graph for this function:

◆ EnableAsciiIpv4() [7/10]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4 ( std::string  prefix,
NodeContainer  n 
)

Enable ascii trace output on all Ipv4 and interface pairs existing in the nodes provided in the container.

Parameters
prefixFilename prefix to use for ascii files.
ncontainer of nodes.

Definition at line 210 of file internet-trace-helper.cc.

References EnableAsciiIpv4Impl().

+ Here is the call graph for this function:

◆ EnableAsciiIpv4() [8/10]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4 ( std::string  prefix,
Ptr< Ipv4 ipv4,
uint32_t  interface,
bool  explicitFilename = false 
)

Enable ascii trace output on the indicated Ipv4 and interface pair.

Parameters
prefixFilename prefix to use for ascii files.
ipv4Ptr<Ipv4> on which you want to enable tracing.
interfaceThe interface on which you want to enable tracing.
explicitFilenameTreat the prefix as an explicit filename if true.

Definition at line 118 of file internet-trace-helper.cc.

References EnableAsciiIpv4Internal(), and nsclick-simple-lan::ipv4.

+ Here is the call graph for this function:

◆ EnableAsciiIpv4() [9/10]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4 ( std::string  prefix,
std::string  ipv4Name,
uint32_t  interface,
bool  explicitFilename = false 
)

Enable ascii trace output the indicated Ipv4 and interface pair using an Ipv4 previously named using the ns-3 object name service.

Parameters
prefixfilename prefix to use for ascii files.
ipv4NameThe name of the Ipv4 on which you want to enable tracing.
interfaceThe interface on which you want to enable tracing.
explicitFilenameTreat the prefix as an explicit filename if true.

Definition at line 141 of file internet-trace-helper.cc.

References EnableAsciiIpv4Impl().

+ Here is the call graph for this function:

◆ EnableAsciiIpv4() [10/10]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4 ( std::string  prefix,
uint32_t  nodeid,
uint32_t  deviceid,
bool  explicitFilename 
)

Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface.

Since there can be only one Ipv4 aggregated to a node, the node-id unambiguously determines the Ipv4.

Parameters
prefixFilename prefix to use when creating ascii trace files
nodeidThe node identifier/number of the node on which to enable ascii tracing
deviceidThe device identifier/index of the device on which to enable ascii tracing
explicitFilenameTreat the prefix as an explicit filename if true

Definition at line 280 of file internet-trace-helper.cc.

References EnableAsciiIpv4Impl().

+ Here is the call graph for this function:

◆ EnableAsciiIpv4All() [1/2]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4All ( Ptr< OutputStreamWrapper stream)

Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation.

Parameters
streamAn OutputStreamWrapper representing an existing file to use when writing trace data.

Definition at line 259 of file internet-trace-helper.cc.

References EnableAsciiIpv4Impl(), and ns3::NodeContainer::GetGlobal().

+ Here is the call graph for this function:

◆ EnableAsciiIpv4All() [2/2]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4All ( std::string  prefix)

Enable ascii trace output on all Ipv4 and interface pairs existing in the set of all nodes created in the simulation.

Parameters
prefixFilename prefix to use for ascii files.

Definition at line 250 of file internet-trace-helper.cc.

References EnableAsciiIpv4Impl(), and ns3::NodeContainer::GetGlobal().

+ Here is the call graph for this function:

◆ EnableAsciiIpv4Impl() [1/5]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl ( Ptr< OutputStreamWrapper stream,
std::string  prefix,
Ipv4InterfaceContainer  c 
)
private

Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface.

Since there can be only one Ipv4 aggregated to a node, the node-id unambiguously determines the Ipv4.

Parameters
streamAn OutputStreamWrapper representing an existing file to use when writing trace data.
prefixFilename prefix to use when creating ascii trace files
cIpv4InterfaceContainer of Ipv4 and interface pairs

Definition at line 196 of file internet-trace-helper.cc.

References ns3::Ipv4InterfaceContainer::Begin(), EnableAsciiIpv4Internal(), and ns3::Ipv4InterfaceContainer::End().

+ Here is the call graph for this function:

◆ EnableAsciiIpv4Impl() [2/5]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl ( Ptr< OutputStreamWrapper stream,
std::string  prefix,
NodeContainer  n 
)
private

Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface.

Since there can be only one Ipv4 aggregated to a node, the node-id unambiguously determines the Ipv4.

Parameters
streamAn OutputStreamWrapper representing an existing file to use when writing trace data.
prefixFilename prefix to use when creating ascii trace files
ncontainer of nodes.

Definition at line 228 of file internet-trace-helper.cc.

References ns3::NodeContainer::Begin(), EnableAsciiIpv4Internal(), ns3::NodeContainer::End(), ns3::Object::GetObject(), and nsclick-simple-lan::ipv4.

+ Here is the call graph for this function:

◆ EnableAsciiIpv4Impl() [3/5]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl ( Ptr< OutputStreamWrapper stream,
std::string  prefix,
Ptr< Ipv4 ipv4,
uint32_t  interface,
bool  explicitFilename 
)
private

Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface.

Since there can be only one Ipv4 aggregated to a node, the node-id unambiguously determines the Ipv4.

Parameters
streamAn OutputStreamWrapper representing an existing file to use when writing trace data.
prefixFilename prefix to use when creating ascii trace files
ipv4Ptr<Ipv4> on which you want to enable tracing.
interfaceThe device identifier/index of the device on which to enable ascii tracing
explicitFilenameTreat the prefix as an explicit filename if true.

◆ EnableAsciiIpv4Impl() [4/5]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl ( Ptr< OutputStreamWrapper stream,
std::string  prefix,
std::string  ipv4Name,
uint32_t  interface,
bool  explicitFilename 
)
private

Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface.

Since there can be only one Ipv4 aggregated to a node, the node-id unambiguously determines the Ipv4.

Parameters
streamAn OutputStreamWrapper representing an existing file to use when writing trace data.
prefixFilename prefix to use when creating ascii trace files
ipv4NameName of the Ptr<Ipv4> on which you want to enable tracing.
interfaceThe device identifier/index of the device on which to enable ascii tracing
explicitFilenameTreat the prefix as an explicit filename if true.

Definition at line 164 of file internet-trace-helper.cc.

References EnableAsciiIpv4Internal(), and nsclick-simple-lan::ipv4.

+ Here is the call graph for this function:

◆ EnableAsciiIpv4Impl() [5/5]

void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl ( Ptr< OutputStreamWrapper stream,
std::string  prefix,
uint32_t  nodeid,
uint32_t  interface,
bool  explicitFilename 
)
private

Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface.

Since there can be only one Ipv4 aggregated to a node, the node-id unambiguously determines the Ipv4.

Parameters
streamAn OutputStreamWrapper representing an existing file to use when writing trace data.
prefixFilename prefix to use when creating ascii trace files
nodeidThe node identifier/number of the node on which to enable ascii tracing
interfaceThe device identifier/index of the device on which to enable ascii tracing
explicitFilenameTreat the prefix as an explicit filename if true.

Definition at line 292 of file internet-trace-helper.cc.

References ns3::NodeContainer::Begin(), EnableAsciiIpv4Internal(), ns3::NodeContainer::End(), ns3::NodeContainer::GetGlobal(), ns3::Node::GetId(), ns3::Object::GetObject(), and nsclick-simple-lan::ipv4.

Referenced by EnableAsciiIpv4(), and EnableAsciiIpv4All().

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

◆ EnableAsciiIpv4Internal()

virtual void ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4Internal ( Ptr< OutputStreamWrapper stream,
std::string  prefix,
Ptr< Ipv4 ipv4,
uint32_t  interface,
bool  explicitFilename 
)
pure virtual

Enable ascii trace output on the indicated Ipv4 and interface pair.

The implementation is expected to use a provided Ptr<OutputStreamWrapper> if it is non-null. If the OutputStreamWrapper is null, the implementation is expected to use a provided prefix to construct a new file name for each net device using the rules described in the class overview.

If the prefix is provided, there will be one file per Ipv4 and interface pair created. In this case, adding a trace context to the file would be pointless, so the helper implementation is expected to TraceConnectWithoutContext.

If the output stream object is provided, there may be many different Ipv4 and interface pairs writing to a single file. In this case, the trace context could be important, so the helper implementation is expected to TraceConnect.

Parameters
streamAn OutputStreamWrapper representing an existing file to use when writing trace data.
prefixFilename prefix to use for ascii trace files.
ipv4Ptr<Ipv4> on which you want to enable tracing.
interfaceThe interface on which you want to enable tracing.
explicitFilenameTreat the prefix as an explicit filename if true.

Implemented in ns3::InternetStackHelper, and ns3::ClickInternetStackHelper.

Referenced by EnableAsciiIpv4(), and EnableAsciiIpv4Impl().

+ Here is the caller graph for this function:

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