RTC Toolkit 5.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
PacketDumper Class Reference

PacketDumper class to capture packets via libpcap. More...

Public Member Functions

 PacketDumper (const std::string &interface, const std::string &output_directory, std::chrono::seconds capture_time)
 Create PacketDumper from interface name and output_directory.
 
 ~PacketDumper ()
 
void SetFilter (const std::string &filter)
 Set a capture filter on the interface.
 
void Run ()
 Start packet capture.
 

Detailed Description

PacketDumper class to capture packets via libpcap.

Constructor & Destructor Documentation

◆ PacketDumper()

PacketDumper::PacketDumper ( const std::string & interface,
const std::string & output_directory,
std::chrono::seconds capture_time )

Create PacketDumper from interface name and output_directory.

Parameters
[in]interfaceThe interface to listen on.
[in]output_directoryIndicates where the packet captures should be stored.
[in]capture_timeThe number of seconds for which to capture packets.

◆ ~PacketDumper()

PacketDumper::~PacketDumper ( )

Member Function Documentation

◆ Run()

void PacketDumper::Run ( )

Start packet capture.

◆ SetFilter()

void PacketDumper::SetFilter ( const std::string & filter)

Set a capture filter on the interface.

This is the tcpdump/bpf syntax.


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