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

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

#include "internet-trace-helper.h"

+ Inheritance diagram for ns3::PcapHelperForIpv4:

Public Member Functions

 PcapHelperForIpv4 ()
 Construct a PcapHelperForIpv4. More...
 
virtual ~PcapHelperForIpv4 ()
 Destroy a PcapHelperForIpv4. More...
 
void EnablePcapIpv4 (std::string prefix, Ipv4InterfaceContainer c)
 Enable pcap output on each Ipv4 and interface pair in the container. More...
 
void EnablePcapIpv4 (std::string prefix, NodeContainer n)
 Enable pcap output on all Ipv4 and interface pairs existing in the nodes provided in the container. More...
 
void EnablePcapIpv4 (std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename=false)
 Enable pcap output the indicated Ipv4 and interface pair. More...
 
void EnablePcapIpv4 (std::string prefix, std::string ipv4Name, uint32_t interface, bool explicitFilename=false)
 Enable pcap output the indicated Ipv4 and interface pair using a Ptr<Ipv4> previously named using the ns-3 object name service. More...
 
void EnablePcapIpv4 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename)
 Enable pcap output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface. More...
 
void EnablePcapIpv4All (std::string prefix)
 Enable pcap output on all Ipv4 and interface pairs existing in the set of all nodes created in the simulation. More...
 
virtual void EnablePcapIpv4Internal (std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename)=0
 Enable pcap output the indicated Ipv4 and interface pair. More...
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ PcapHelperForIpv4()

ns3::PcapHelperForIpv4::PcapHelperForIpv4 ( )
inline

Construct a PcapHelperForIpv4.

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

◆ ~PcapHelperForIpv4()

virtual ns3::PcapHelperForIpv4::~PcapHelperForIpv4 ( )
inlinevirtual

Destroy a PcapHelperForIpv4.

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

Member Function Documentation

◆ EnablePcapIpv4() [1/5]

void ns3::PcapHelperForIpv4::EnablePcapIpv4 ( std::string  prefix,
Ipv4InterfaceContainer  c 
)

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

Parameters
prefixFilename prefix to use for pcap files.
cIpv4InterfaceContainer of Ipv4 and interface pairs

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

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

+ Here is the call graph for this function:

◆ EnablePcapIpv4() [2/5]

void ns3::PcapHelperForIpv4::EnablePcapIpv4 ( std::string  prefix,
NodeContainer  n 
)

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

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

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

References ns3::NodeContainer::Begin(), EnablePcapIpv4(), ns3::NodeContainer::End(), and ns3::Object::GetObject().

+ Here is the call graph for this function:

◆ EnablePcapIpv4() [3/5]

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

Enable pcap output the indicated Ipv4 and interface pair.

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

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

References EnablePcapIpv4Internal().

Referenced by EnablePcapIpv4(), and EnablePcapIpv4All().

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

◆ EnablePcapIpv4() [4/5]

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

Enable pcap output the indicated Ipv4 and interface pair using a Ptr<Ipv4> previously named using the ns-3 object name service.

Parameters
prefixfilename prefix to use for pcap files.
ipv4NameName of the Ptr<Ipv4> on which you want to enable tracing.
interfaceInterface on ipv4 on which you want to enable tracing.
explicitFilenameTreat the prefix as an explicit filename if true.

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

References EnablePcapIpv4().

+ Here is the call graph for this function:

◆ EnablePcapIpv4() [5/5]

void ns3::PcapHelperForIpv4::EnablePcapIpv4 ( std::string  prefix,
uint32_t  nodeid,
uint32_t  interface,
bool  explicitFilename 
)

Enable pcap 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 for pcap files.
nodeidThe node identifier/number of the node on which to enable tracing.
interfaceInterface on ipv4 on which you want to enable tracing.
explicitFilenameTreat the prefix as an explicit filename if true

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

References ns3::NodeContainer::Begin(), EnablePcapIpv4(), ns3::NodeContainer::End(), ns3::NodeContainer::GetGlobal(), ns3::Node::GetId(), and ns3::Object::GetObject().

+ Here is the call graph for this function:

◆ EnablePcapIpv4All()

void ns3::PcapHelperForIpv4::EnablePcapIpv4All ( std::string  prefix)

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

Parameters
prefixFilename prefix to use for pcap files.

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

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

+ Here is the call graph for this function:

◆ EnablePcapIpv4Internal()

virtual void ns3::PcapHelperForIpv4::EnablePcapIpv4Internal ( std::string  prefix,
Ptr< Ipv4 ipv4,
uint32_t  interface,
bool  explicitFilename 
)
pure virtual

Enable pcap output the indicated Ipv4 and interface pair.

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

Implemented in ns3::InternetStackHelper.

Referenced by EnablePcapIpv4().

+ Here is the caller graph for this function:

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