PcapPlusPlus
24.09
|
#include <PcapFilter.h>
Public Member Functions | |
ProtoFilter (ProtocolType proto) | |
ProtoFilter (ProtocolTypeFamily protoFamily) | |
void | parseToString (std::string &result) override |
void | setProto (ProtocolType proto) |
void | setProto (ProtocolTypeFamily protoFamily) |
Public Member Functions inherited from pcpp::GeneralFilter | |
bool | matchPacketWithFilter (RawPacket *rawPacket) |
virtual | ~GeneralFilter () |
A class for filtering traffic by protocol. Notice not all protocols are supported, only the following protocol are supported: TCP, UDP, ICMP, VLAN, IPv4, IPv6, ARP, Ethernet. In addition, the following protocol families are supported: GRE (distinguish between GREv0 and GREv1 is not supported), IGMP (distinguish between IGMPv1, IGMPv2 and IGMPv3 is not supported).
For deeper understanding of the filter concept please refer to PcapFilter.h
|
inlineexplicit |
A constructor that gets a protocol and creates the filter
[in] | proto | The protocol to filter, only packets matching this protocol will be received. Please note not all protocols are supported. List of supported protocols is found in the class description |
|
inlineexplicit |
A constructor that gets a protocol family and creates the filter
[in] | protoFamily | The protocol family to filter, only packets matching this protocol will be received. Please note not all protocols are supported. List of supported protocols is found in the class description |
|
overridevirtual |
A method that parses the class instance into BPF string format
[out] | result | An empty string that the parsing will be written into. If the string isn't empty, its content will be overridden |
Implements pcpp::GeneralFilter.
|
inline |
Set the protocol to filter with
[in] | proto | The protocol to filter, only packets matching this protocol will be received. Please note not all protocol families are supported. List of supported protocols is found in the class description |
|
inline |
Set the protocol family to filter with
[in] | protoFamily | The protocol family to filter, only packets matching this protocol will be received. Please note not all protocol families are supported. List of supported protocols is found in the class description |