Base class providing common user-level pcap operations for helpers representing net devices. More...
#include "trace-helper.h"
Public Member Functions | |
PcapHelperForDevice () | |
Construct a PcapHelperForDevice. More... | |
virtual | ~PcapHelperForDevice () |
Destroy a PcapHelperForDevice. 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, 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, 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... | |
Base class providing common user-level pcap operations for helpers representing net devices.
Definition at line 623 of file trace-helper.h.
|
inline |
Construct a PcapHelperForDevice.
Definition at line 629 of file trace-helper.h.
|
inlinevirtual |
Destroy a PcapHelperForDevice.
Definition at line 636 of file trace-helper.h.
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.
prefix | Filename prefix to use for pcap files. |
d | container of devices of type ns3::CsmaNetDevice |
promiscuous | If true capture all possible packets available at the device. |
Definition at line 439 of file trace-helper.cc.
References ns3::NetDeviceContainer::Begin(), EnablePcap(), and ns3::NetDeviceContainer::End().
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.
prefix | Filename prefix to use for pcap files. |
n | container of nodes. |
promiscuous | If true capture all possible packets available at the device. |
Definition at line 449 of file trace-helper.cc.
References ns3::NetDeviceContainer::Add(), ns3::NodeContainer::Begin(), EnablePcap(), ns3::NodeContainer::End(), ns3::Node::GetDevice(), and ns3::Node::GetNDevices().
void ns3::PcapHelperForDevice::EnablePcap | ( | std::string | prefix, |
Ptr< NetDevice > | nd, | ||
bool | promiscuous = false , |
||
bool | explicitFilename = false |
||
) |
Enable pcap output the indicated net device.
prefix | Filename prefix to use for pcap files. |
nd | Net device for which you want to enable tracing. |
promiscuous | If true capture all possible packets available at the device. |
explicitFilename | Treat the prefix as an explicit filename if true |
Definition at line 420 of file trace-helper.cc.
References EnablePcapInternal().
Referenced by Ns3TcpCubicTestCase::DoRun(), WifiMsduAggregatorThroughputTest::DoRun(), EnablePcap(), and EnablePcapAll().
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.
prefix | filename prefix to use for pcap files. |
ndName | The name of the net device in which you want to enable tracing. |
promiscuous | If true capture all possible packets available at the device. |
explicitFilename | Treat the prefix as an explicit filename if true |
Definition at line 429 of file trace-helper.cc.
References EnablePcap().
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.
prefix | Filename prefix to use for pcap files. |
nodeid | the node id |
deviceid | the device id |
promiscuous | If true capture all possible packets available at the device. |
Definition at line 470 of file trace-helper.cc.
References ns3::NodeContainer::Begin(), EnablePcap(), ns3::NodeContainer::End(), ns3::Node::GetDevice(), ns3::NodeContainer::GetGlobal(), ns3::Node::GetId(), ns3::Node::GetNDevices(), and NS_ABORT_MSG_IF.
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.
prefix | Filename prefix to use for pcap files. |
promiscuous | If true capture all possible packets available at the device. |
Definition at line 464 of file trace-helper.cc.
References EnablePcap(), and ns3::NodeContainer::GetGlobal().
Referenced by ns3::PointToPointEpcHelper::AddEnb(), ns3::NoBackhaulEpcHelper::AddX2Interface(), AodvExample::CreateDevices(), ChainRegressionTest::CreateDevices(), TracerouteExample::CreateDevices(), HwmpProactiveRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), PeerManagementProtocolRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), DsdvManetExample::CreateDevices(), MeshTest::CreateNodes(), and NeighborCacheExample::Run().
|
pure virtual |
Enable pcap output the indicated net device.
prefix | Filename prefix to use for pcap files. |
nd | Net device for which you want to enable tracing. |
promiscuous | If true capture all possible packets available at the device. |
explicitFilename | Treat the prefix as an explicit filename if true |
Implemented in ns3::WifiPhyHelper, ns3::PointToPointHelper, ns3::LrWpanHelper, ns3::FdNetDeviceHelper, ns3::CsmaHelper, and ns3::WimaxHelper.
Referenced by EnablePcap().