A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::PcapHelperForDevice Class Referenceabstract

Base class providing common user-level pcap operations for helpers representing net devices. More...

#include "trace-helper.h"

+ Inheritance diagram for ns3::PcapHelperForDevice:

Public Member Functions

 PcapHelperForDevice ()
 Construct a PcapHelperForDevice.
 
virtual ~PcapHelperForDevice ()
 Destroy a PcapHelperForDevice.
 
void EnablePcap (std::string prefix, NetDeviceContainer d, bool promiscuous=false)
 Enable pcap output on each device in the container which is of the appropriate type.
 
void EnablePcap (std::string prefix, NodeContainer n, bool promiscuous=false)
 Enable pcap output on each device (which is of the appropriate type) in the nodes provided in the container.
 
void EnablePcap (std::string prefix, Ptr< NetDevice > nd, bool promiscuous=false, bool explicitFilename=false)
 Enable pcap output the indicated net device.
 
void EnablePcap (std::string prefix, std::string ndName, bool promiscuous=false, bool explicitFilename=false)
 Enable pcap output the indicated net device using a device previously named using the ns-3 object name service.
 
void EnablePcap (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool promiscuous=false)
 Enable pcap output on the device specified by a global node-id (of a previously created node) and associated device-id.
 
void EnablePcapAll (std::string prefix, bool promiscuous=false)
 Enable pcap output on each device (which is of the appropriate type) in the set of all nodes created in the simulation.
 
virtual void EnablePcapInternal (std::string prefix, Ptr< NetDevice > nd, bool promiscuous, bool explicitFilename)=0
 Enable pcap output the indicated net device.
 

Detailed Description

Base class providing common user-level pcap operations for helpers representing net devices.

Definition at line 612 of file trace-helper.h.

Constructor & Destructor Documentation

◆ PcapHelperForDevice()

ns3::PcapHelperForDevice::PcapHelperForDevice ( )
inline

Construct a PcapHelperForDevice.

Definition at line 618 of file trace-helper.h.

◆ ~PcapHelperForDevice()

virtual ns3::PcapHelperForDevice::~PcapHelperForDevice ( )
inlinevirtual

Destroy a PcapHelperForDevice.

Definition at line 625 of file trace-helper.h.

Member Function Documentation

◆ EnablePcap() [1/5]

void ns3::PcapHelperForDevice::EnablePcap ( std::string prefix,
NetDeviceContainer d,
bool promiscuous = false )

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

Parameters
prefixFilename prefix to use for pcap files.
dcontainer of devices of type ns3::CsmaNetDevice
promiscuousIf true capture all possible packets available at the device.

Definition at line 428 of file trace-helper.cc.

◆ EnablePcap() [2/5]

void ns3::PcapHelperForDevice::EnablePcap ( std::string prefix,
NodeContainer n,
bool promiscuous = false )

Enable pcap output on each device (which is of the appropriate type) in the nodes provided in the container.

Parameters
prefixFilename prefix to use for pcap files.
ncontainer of nodes.
promiscuousIf true capture all possible packets available at the device.

Definition at line 438 of file trace-helper.cc.

◆ EnablePcap() [3/5]

void ns3::PcapHelperForDevice::EnablePcap ( std::string prefix,
Ptr< NetDevice > nd,
bool promiscuous = false,
bool explicitFilename = false )

Enable pcap output the indicated net device.

Parameters
prefixFilename prefix to use for pcap files.
ndNet device for which you want to enable tracing.
promiscuousIf true capture all possible packets available at the device.
explicitFilenameTreat the prefix as an explicit filename if true

Definition at line 409 of file trace-helper.cc.

Referenced by Ns3TcpCubicTestCase::DoRun(), and WifiMsduAggregatorThroughputTest::DoRun().

+ Here is the caller graph for this function:

◆ EnablePcap() [4/5]

void ns3::PcapHelperForDevice::EnablePcap ( std::string prefix,
std::string ndName,
bool promiscuous = false,
bool explicitFilename = false )

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

Parameters
prefixfilename prefix to use for pcap files.
ndNameThe name of the net device in which you want to enable tracing.
promiscuousIf true capture all possible packets available at the device.
explicitFilenameTreat the prefix as an explicit filename if true

Definition at line 418 of file trace-helper.cc.

◆ EnablePcap() [5/5]

void ns3::PcapHelperForDevice::EnablePcap ( std::string prefix,
uint32_t nodeid,
uint32_t deviceid,
bool promiscuous = false )

Enable pcap output on the device specified by a global node-id (of a previously created node) and associated device-id.

Parameters
prefixFilename prefix to use for pcap files.
nodeidthe node id
deviceidthe device id
promiscuousIf true capture all possible packets available at the device.

Definition at line 459 of file trace-helper.cc.

◆ EnablePcapAll()

void ns3::PcapHelperForDevice::EnablePcapAll ( std::string prefix,
bool promiscuous = false )

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

Parameters
prefixFilename prefix to use for pcap files.
promiscuousIf true capture all possible packets available at the device.

Definition at line 453 of file trace-helper.cc.

Referenced by ns3::PointToPointEpcHelper::AddEnb(), ns3::NoBackhaulEpcHelper::AddX2Interface(), AodvExample::CreateDevices(), ChainRegressionTest::CreateDevices(), DsdvManetExample::CreateDevices(), FlameRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), HwmpProactiveRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), PeerManagementProtocolRegressionTest::CreateDevices(), TracerouteExample::CreateDevices(), MeshTest::CreateNodes(), and NeighborCacheExample::Run().

+ Here is the caller graph for this function:

◆ EnablePcapInternal()

virtual void ns3::PcapHelperForDevice::EnablePcapInternal ( std::string prefix,
Ptr< NetDevice > nd,
bool promiscuous,
bool explicitFilename )
pure virtual

Enable pcap output the indicated net device.

Parameters
prefixFilename prefix to use for pcap files.
ndNet device for which you want to enable tracing.
promiscuousIf true capture all possible packets available at the device.
explicitFilenameTreat the prefix as an explicit filename if true

Implemented in ns3::CsmaHelper, ns3::FdNetDeviceHelper, ns3::LrWpanHelper, ns3::PointToPointHelper, ns3::WifiPhyHelper, and ns3::WimaxHelper.


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