98 void parseDirection(std::string& directionAsString);
99 inline Direction getDir() {
return m_Dir; }
121 std::string parseOperator();
143 std::string m_Address;
144 std::string m_IPv4Mask;
146 void convertToIPAddressWithMask(std::string& ipAddrmodified, std::string& mask);
147 void convertToIPAddressWithLen(std::string& ipAddrmodified,
int& len);
186 void setAddr(
const std::string& ipAddress) { m_Address = ipAddress; }
192 void setMask(
const std::string& ipv4Mask) { m_IPv4Mask = ipv4Mask; m_Len = 0; }
198 void setLen(
int len) { m_IPv4Mask =
""; m_Len = len; }
227 void setIpID(uint16_t ipID) { m_IpID = ipID; }
241 uint16_t m_TotalLength;
270 void portToString(uint16_t portAsInt);
285 void setPort(uint16_t port) { portToString(port); }
364 uint16_t m_EtherType;
394 std::vector<GeneralFilter*> m_FilterList;
406 AndFilter(std::vector<GeneralFilter*>& filters);
418 void setFilters(std::vector<GeneralFilter*>& filters);
436 std::vector<GeneralFilter*> m_FilterList;
448 OrFilter(std::vector<GeneralFilter*>& filters);
614 uint8_t m_TcpFlagsBitMask;
647 uint16_t m_WindowSize;
void parseToString(std::string &result)
void setOperator(FilterOperator op)
Definition: PcapFilter.h:129
IPFilter(const std::string &ipAddress, Direction dir, const std::string &ipv4Mask)
Definition: PcapFilter.h:166
Definition: PcapFilter.h:609
Definition: PcapFilter.h:593
void parseToString(std::string &result)
OrFilter()
Definition: PcapFilter.h:442
Definition: PcapFilter.h:595
void setMacAddress(MacAddress address)
Definition: PcapFilter.h:350
void setProto(ProtocolType proto)
Definition: PcapFilter.h:514
void parseToString(std::string &result)
void setVlanID(uint16_t vlanId)
Definition: PcapFilter.h:570
Definition: PcapFilter.h:611
void setFromPort(uint16_t fromPort)
Definition: PcapFilter.h:316
IPv4TotalLengthFilter(uint16_t totalLength, FilterOperator op)
Definition: PcapFilter.h:248
void parseToString(std::string &result)
void setTotalLength(uint16_t totalLength)
Definition: PcapFilter.h:256
Definition: PcapFilter.h:209
NotFilter(GeneralFilter *filterToInverse)
Definition: PcapFilter.h:475
Definition: PcapFilter.h:93
void setIpID(uint16_t ipID)
Definition: PcapFilter.h:227
Definition: PcapFilter.h:63
void setOpCode(ArpOpcode opCode)
Definition: PcapFilter.h:542
void parseToString(std::string &result)
Definition: PcapFilter.h:361
Definition: MacAddress.h:21
Definition: PcapFilter.h:57
Definition: PcapFilter.h:266
void setEtherType(uint16_t etherType)
Definition: PcapFilter.h:378
void parseToString(std::string &result)
Definition: PcapFilter.h:55
void setAddr(const std::string &ipAddress)
Definition: PcapFilter.h:186
void parseToString(std::string &result)
Definition: PcapFilter.h:597
EtherTypeFilter(uint16_t etherType)
Definition: PcapFilter.h:370
IPFilter(const std::string &ipAddress, Direction dir, int len)
Definition: PcapFilter.h:177
AndFilter()
Definition: PcapFilter.h:400
IPv4IDFilter(uint16_t ipID, FilterOperator op)
Definition: PcapFilter.h:219
Definition: PcapFilter.h:525
PortRangeFilter(uint16_t fromPort, uint16_t toPort, Direction dir)
Definition: PcapFilter.h:308
Definition: PcapFilter.h:433
void addFilter(GeneralFilter *filter)
Definition: PcapFilter.h:454
Definition: PcapFilter.h:39
Direction
Definition: PcapFilter.h:36
VlanFilter(uint16_t vlanId)
Definition: PcapFilter.h:562
Definition: PcapFilter.h:59
void parseToString(std::string &result)
Definition: PcapFilter.h:61
void parseToString(std::string &result)
TcpWindowSizeFilter(uint16_t windowSize, FilterOperator op)
Definition: PcapFilter.h:655
void parseToString(std::string &result)
Definition: PcapFilter.h:140
Definition: PcapFilter.h:580
Definition: PcapFilter.h:72
void parseToString(std::string &result)
void parseToString(std::string &result)
void setDirection(Direction dir)
Definition: PcapFilter.h:106
MatchOptions
Definition: PcapFilter.h:606
void parseToString(std::string &result)
Definition: PcapFilter.h:589
TcpFlagsFilter(uint8_t tcpFlagBitMask, MatchOptions matchOption)
Definition: PcapFilter.h:624
Definition: PcapFilter.h:332
ArpOpcode
Definition: ArpLayer.h:47
void setTcpFlagsBitMask(uint8_t tcpFlagBitMask, MatchOptions matchOption)
Definition: PcapFilter.h:632
Definition: PcapFilter.h:238
Definition: PcapFilter.h:53
Definition: PcapFilter.h:116
void setFilter(GeneralFilter *filterToInverse)
Definition: PcapFilter.h:483
void setLength(uint16_t legnth)
Definition: PcapFilter.h:692
ProtocolType
Definition: ProtocolType.h:16
UdpLengthFilter(uint16_t legnth, FilterOperator op)
Definition: PcapFilter.h:684
Definition: PcapFilter.h:495
void addFilter(GeneralFilter *filter)
Definition: PcapFilter.h:412
void setLen(int len)
Definition: PcapFilter.h:198
void parseToString(std::string &result)
Definition: PcapFilter.h:391
Definition: PcapFilter.h:41
void setFilters(std::vector< GeneralFilter *> &filters)
Definition: PcapFilter.h:296
Definition: PcapFilter.h:43
TcpFlags
Definition: PcapFilter.h:586
void parseToString(std::string &result)
FilterOperator
Definition: PcapFilter.h:50
Definition: PcapFilter.h:673
void setToPort(uint16_t toPort)
Definition: PcapFilter.h:322
ProtoFilter(ProtocolType proto)
Definition: PcapFilter.h:505
void parseToString(std::string &result)
Definition: PcapFilter.h:553
Definition: PcapFilter.h:466
IPFilter(const std::string &ipAddress, Direction dir)
Definition: PcapFilter.h:155
virtual void parseToString(std::string &result)=0
void setPort(uint16_t port)
Definition: PcapFilter.h:285
Definition: PcapFilter.h:599
The main namespace for the PcapPlusPlus lib.
PortFilter(uint16_t port, Direction dir)
Definition: PcapFilter.h:591
Definition: PcapFilter.h:644
ArpFilter(ArpOpcode opCode)
Definition: PcapFilter.h:534
MacAddressFilter(MacAddress address, Direction dir)
Definition: PcapFilter.h:342
void setWindowSize(uint16_t windowSize)
Definition: PcapFilter.h:663
void setMask(const std::string &ipv4Mask)
Definition: PcapFilter.h:192