PcapPlusPlus  Next
pcpp::IFilterWithDirection Class Reference

#include <PcapFilter.h>

Inheritance diagram for pcpp::IFilterWithDirection:
pcpp::GeneralFilter pcpp::IPFilter pcpp::MacAddressFilter pcpp::PortFilter pcpp::PortRangeFilter

Public Member Functions

void setDirection (Direction dir)
 
- Public Member Functions inherited from pcpp::GeneralFilter
virtual ~GeneralFilter ()=default
 Virtual destructor, frees the bpf program.
 
virtual void parseToString (std::string &result) const =0
 
bool matchPacketWithFilter (RawPacket *rawPacket) const
 
bool matches (RawPacket const &rawPacket) const
 Match a raw packet against the filter. More...
 

Additional Inherited Members

- Protected Member Functions inherited from pcpp::GeneralFilter
bool cacheFilter () const
 Parse the filter and cache the compiled BPF program. More...
 
void invalidateCache () const
 Invalidate the cached BPF program. This method should be called whenever the filter changes.
 

Detailed Description

An abstract class that is the base class for all filters which contain a direction (source or destination). This class cannot be instantiated

For deeper understanding of the filter concept please refer to PcapFilter.h

Member Function Documentation

◆ setDirection()

void pcpp::IFilterWithDirection::setDirection ( Direction  dir)
inline

Set the direction for the filter (source or destination)

Parameters
[in]dirThe direction