|
PcapPlusPlus
Next
|
#include <PcapDevice.h>
Static Public Member Functions | |
| static std::string | getPcapLibVersionInfo () |
| static bool | matchPacketWithFilter (GeneralFilter &filter, RawPacket *rawPacket) |
Protected Member Functions | |
| bool | doUpdateFilter (std::string const *filterAsString) override |
| Updates the filter on the device with a BPF string. More... | |
Additional Inherited Members | |
Public Member Functions inherited from pcpp::IFilterableDevice | |
| bool | setFilter (GeneralFilter &filter) |
| bool | setFilter (std::string const &filterAsString) |
| bool | clearFilter () |
Public Member Functions inherited from pcpp::IDevice | |
| virtual bool | open ()=0 |
| virtual void | close ()=0 |
| Close the device. | |
| virtual bool | isOpened () const =0 |
Public Member Functions inherited from pcpp::IPcapStatisticsProvider | |
| PcapStats | getStatistics () const |
| Get statistics from the device. More... | |
| virtual void | getStatistics (PcapStats &stats) const =0 |
An abstract class representing all libpcap-based packet capturing devices: files, libPcap, WinPcap/Npcap and RemoteCapture. This class is abstract and cannot be instantiated
|
overrideprotectedvirtual |
Updates the filter on the device with a BPF string.
Only packets that match the filter should be processed by the device after this method is called. A nullptr should disable any existing filter on the device.
| filterAsString | A pointer to a string representing the filter in BPF syntax (http://biot.com/capstats/bpf.html). |
Implements pcpp::IFilterableDevice.
Reimplemented in pcpp::PcapNgFileWriterDevice, and pcpp::PcapNgFileReaderDevice.
|
static |
A static method for retrieving pcap lib (libpcap/WinPcap/etc.) version information. This method is actually a wrapper for pcap_lib_version()
|
static |
Match a raw packet with a given BPF filter. Notice this method is static which means you don't need any device instance in order to perform this match
| [in] | filter | A filter class to test against |
| [in] | rawPacket | A pointer to the raw packet to match the filter with |