PcapPlusPlus
Next
|
#include <PcapFilter.h>
Public Member Functions | |
CompositeFilter ()=default | |
An empty constructor for this class. Use addFilter() to add filters to the composite filter. | |
CompositeFilter (const std::vector< GeneralFilter * > &filters) | |
void | addFilter (GeneralFilter *filter) |
void | removeFilter (GeneralFilter *filter) |
void | setFilters (const std::vector< GeneralFilter * > &filters) |
void | clearAllFilters () |
Remove all filters from the composite filter. | |
Public Member Functions inherited from pcpp::GeneralFilter | |
virtual void | parseToString (std::string &result)=0 |
bool | matchPacketWithFilter (RawPacket *rawPacket) |
virtual | ~GeneralFilter ()=default |
Virtual destructor, frees the bpf program. | |
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
|
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 |
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 |