A Discrete-Event Network Simulator
API
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. More...
 
virtual ~PcapHelperForDevice ()
 Destroy a PcapHelperForDevice. More...
 
void EnablePcap (std::string prefix, Ptr< NetDevice > nd, bool promiscuous=false, bool explicitFilename=false)
 Enable pcap output the indicated net device. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual void EnablePcapInternal (std::string prefix, Ptr< NetDevice > nd, bool promiscuous, bool explicitFilename)=0
 Enable pcap output the indicated net device. More...
 

Detailed Description

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

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

Constructor & Destructor Documentation

ns3::PcapHelperForDevice::PcapHelperForDevice ( )
inline

Construct a PcapHelperForDevice.

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

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

Destroy a PcapHelperForDevice.

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

References sample-rng-plot::n.

Member Function Documentation

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 401 of file trace-helper.cc.

Referenced by CalculateThroughput(), CourseChangeCallback(), WaveNetDeviceExample::CreateWaveNodes(), WifiMsduAggregatorThroughputTest::DoRun(), GenerateTraffic(), MonitorSniffRx(), PingRtt(), ReceivePacket(), RxEvent(), static_SpectrumModelWifi5180MHz_initializer::static_SpectrumModelWifi5180MHz_initializer(), TraceCwnd(), and TxCallback().

+ Here is the caller graph for this function:

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 407 of file trace-helper.cc.

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 414 of file trace-helper.cc.

References ns3::NetDeviceContainer::Begin(), and ns3::NetDeviceContainer::End().

+ Here is the call graph for this function:

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 424 of file trace-helper.cc.

References ns3::NetDeviceContainer::Add(), ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), ns3::Node::GetDevice(), and ns3::Node::GetNDevices().

+ Here is the call graph for this function:

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 445 of file trace-helper.cc.

References ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), ns3::Node::GetDevice(), ns3::NodeContainer::GetGlobal(), ns3::Node::GetId(), ns3::Node::GetNDevices(), sample-rng-plot::n, and NS_ABORT_MSG_IF.

+ Here is the call graph for this function:

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 439 of file trace-helper.cc.

References ns3::NodeContainer::GetGlobal().

Referenced by ns3::PointToPointEpcHelper::AddEnb(), ns3::PointToPointEpcHelper::AddX2Interface(), AodvqRegressionTestSuite::AodvqRegressionTestSuite(), BuildAppsTest(), CourseChangeCallback(), PeerManagementProtocolRegressionTest::CreateDevices(), HwmpProactiveRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), AodvExample::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), AodvqExample::CreateDevices(), DsdvqManetExample::CreateDevices(), DsdvManetExample::CreateDevices(), ChainRegressionTest::CreateDevices(), MeshTest::CreateNodes(), CreateOnOffFlow(), CwndTracer(), Ns3TcpLossTestCase::DoRun(), Ns3TcpStateTestCase::DoRun(), Ns3TcpInteroperabilityTestCase::DoRun(), Ns3TcpSocketTestCase2::DoRun(), Ns3TcpCwndTestCase1::DoRun(), Ns3TcpCwndTestCase2::DoRun(), PingRtt(), IpAddressHelper::PrintIpAddresses(), StackHelper::PrintRoutingTable(), Ratio(), Experiment::Run(), RxEvent(), SendPacket(), SetTimeout(), VanetRoutingExperiment::SetupAdhocDevices(), SinkRx(), StateChangeNotification(), TearDownLink(), TraceNextRx(), and Tunnel::Tunnel().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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::WimaxHelper, ns3::QKDHelper, ns3::CsmaHelper, ns3::WifiPhyHelper, ns3::LrWpanHelper, ns3::PointToPointHelper, ns3::FdNetDeviceHelper, and ns3::YansWavePhyHelper.


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