Public Types | Public Member Functions

ns3::PcapHelper Class Reference

Manage pcap files for device models. More...

#include <trace-helper.h>

List of all members.

Public Types

enum  {
  DLT_NULL = 0, DLT_EN10MB = 1, DLT_PPP = 9, DLT_RAW = 101,
  DLT_IEEE802_11 = 105, DLT_PRISM_HEADER = 119, DLT_IEEE802_11_RADIO = 127
}

Public Member Functions

 PcapHelper ()
 Create a pcap helper.
 ~PcapHelper ()
 Destroy a pcap helper.
std::string GetFilenameFromDevice (std::string prefix, Ptr< NetDevice > device, bool useObjectNames=true)
 Let the pcap helper figure out a reasonable filename to use for a pcap file associated with a device.
std::string GetFilenameFromInterfacePair (std::string prefix, Ptr< Object > object, uint32_t interface, bool useObjectNames=true)
 Let the pcap helper figure out a reasonable filename to use for the pcap file associated with a node.
Ptr< PcapFileWrapperCreateFile (std::string filename, std::ios::openmode filemode, uint32_t dataLinkType, uint32_t snapLen=65535, int32_t tzCorrection=0)
 Create and initialize a pcap file.
template<typename T >
void HookDefaultSink (Ptr< T > object, std::string traceName, Ptr< PcapFileWrapper > file)
 Hook a trace source to the default trace sink.

Detailed Description

Manage pcap files for device models.

Handling pcap files is a common operation for ns-3 devices. It is useful to provide a common base class for dealing with these ops.


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