PcapPlusPlus
Next
|
#include <PcapFilter.h>
Public Member Functions | |
CompositeFilter ()=default | |
CompositeFilter (const std::vector< GeneralFilter * > &filters) | |
void | addFilter (GeneralFilter *filter) |
void | removeFilter (GeneralFilter *filter) |
void | setFilters (const std::vector< GeneralFilter * > &filters) |
void | clearAllFilters () |
Public Member Functions inherited from pcpp::GeneralFilter | |
virtual void | parseToString (std::string &result)=0 |
bool | matchPacketWithFilter (RawPacket *rawPacket) |
virtual | ~GeneralFilter () |
The base class for all filter classes composed of several other filters. This class is virtual and abstract, hence cannot be instantiated.
For deeper understanding of the filter concept please refer to PcapFilter.h
|
default |
An empty constructor for this class. Use addFilter() to add filters to the composite filter.
|
explicit |
A constructor that gets a list of pointers to filters and creates one filter from all filters
[in] | filters | The list of pointers to filters |
|
inline |
Add filter to the composite filter
[in] | filter | The filter to add |
|
inline |
Remove all filters from the composite filter.
void pcpp::CompositeFilter::removeFilter | ( | GeneralFilter * | filter | ) |
Removes the first matching filter from the composite filter
[in] | filter | The filter to remove |
void pcpp::CompositeFilter::setFilters | ( | const std::vector< GeneralFilter * > & | filters | ) |
Remove the current filters and set new ones
[in] | filters | The new filters to set. The previous ones will be removed |