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);
430 std::vector<GeneralFilter*> m_FilterList;
442 OrFilter(std::vector<GeneralFilter*>& filters);
607 uint8_t m_TcpFlagsBitMask;
640 uint16_t m_WindowSize;
Definition: PcapFilter.h:59
Definition: PcapFilter.h:602
Definition: PcapFilter.h:604
IPFilter(const std::string &ipAddress, Direction dir)
Definition: PcapFilter.h:155
Definition: PcapFilter.h:586
void setOperator(FilterOperator op)
Definition: PcapFilter.h:129
Definition: PcapFilter.h:53
IpV4IDFilter(uint16_t ipID, FilterOperator op)
Definition: PcapFilter.h:219
void setEtherType(uint16_t etherType)
Definition: PcapFilter.h:378
Definition: PcapFilter.h:546
Definition: PcapFilter.h:39
ProtoFilter(ProtocolType proto)
Definition: PcapFilter.h:498
Definition: PcapFilter.h:140
Definition: PcapFilter.h:460
Definition: PcapFilter.h:588
Definition: PcapFilter.h:63
Definition: PcapFilter.h:590
ArpFilter(ArpOpcode opCode)
Definition: PcapFilter.h:527
PortFilter(uint16_t port, Direction dir)
void setTcpFlagsBitMask(uint8_t tcpFlagBitMask, MatchOptions matchOption)
Definition: PcapFilter.h:625
void setMask(const std::string &ipv4Mask)
Definition: PcapFilter.h:192
void setMacAddress(MacAddress address)
Definition: PcapFilter.h:350
void setAddr(const std::string &ipAddress)
Definition: PcapFilter.h:186
OrFilter()
Definition: PcapFilter.h:436
Definition: PcapFilter.h:332
Definition: PcapFilter.h:637
void addFilter(GeneralFilter *filter)
Definition: PcapFilter.h:448
Direction
Definition: PcapFilter.h:36
Definition: PcapFilter.h:518
Definition: PcapFilter.h:55
TcpFlags
Definition: PcapFilter.h:579
Definition: PcapFilter.h:427
The main namespace for the PcapPlusPlus lib.
void addFilter(GeneralFilter *filter)
Definition: PcapFilter.h:412
void parseToString(std::string &result)
Definition: PcapFilter.h:72
virtual void parseToString(std::string &result)=0
void setVlanID(uint16_t vlanId)
Definition: PcapFilter.h:563
void parseToString(std::string &result)
EtherTypeFilter(uint16_t etherType)
Definition: PcapFilter.h:370
ArpOpcode
Definition: ArpLayer.h:47
Definition: PcapFilter.h:573
void parseToString(std::string &result)
Definition: PcapFilter.h:57
Definition: PcapFilter.h:41
void setToPort(uint16_t toPort)
Definition: PcapFilter.h:322
void setPort(uint16_t port)
Definition: PcapFilter.h:285
Definition: PcapFilter.h:238
Definition: PcapFilter.h:116
void parseToString(std::string &result)
VlanFilter(uint16_t vlanId)
Definition: PcapFilter.h:555
Definition: PcapFilter.h:582
void parseToString(std::string &result)
void setIpID(uint16_t ipID)
Definition: PcapFilter.h:227
Definition: PcapFilter.h:391
Definition: PcapFilter.h:296
Definition: PcapFilter.h:209
void setOpCode(ArpOpcode opCode)
Definition: PcapFilter.h:535
Definition: PcapFilter.h:93
void setFilter(GeneralFilter *filterToInverse)
Definition: PcapFilter.h:477
Definition: MacAddress.h:21
MatchOptions
Definition: PcapFilter.h:599
void parseToString(std::string &result)
Definition: PcapFilter.h:361
PortRangeFilter(uint16_t fromPort, uint16_t toPort, Direction dir)
Definition: PcapFilter.h:308
void parseToString(std::string &result)
void parseToString(std::string &result)
TcpWindowSizeFilter(uint16_t windowSize, FilterOperator op)
Definition: PcapFilter.h:648
Definition: PcapFilter.h:266
void parseToString(std::string &result)
ProtocolType
Definition: ProtocolType.h:16
void setFromPort(uint16_t fromPort)
Definition: PcapFilter.h:316
IPFilter(const std::string &ipAddress, Direction dir, const std::string &ipv4Mask)
Definition: PcapFilter.h:166
FilterOperator
Definition: PcapFilter.h:50
void parseToString(std::string &result)
void parseToString(std::string &result)
Definition: PcapFilter.h:592
void parseToString(std::string &result)
Definition: PcapFilter.h:488
void parseToString(std::string &result)
void setTotalLength(uint16_t totalLength)
Definition: PcapFilter.h:256
Definition: PcapFilter.h:61
void parseToString(std::string &result)
void parseToString(std::string &result)
void setDirection(Direction dir)
Definition: PcapFilter.h:106
IpV4TotalLengthFilter(uint16_t totalLength, FilterOperator op)
Definition: PcapFilter.h:248
void setWindowSize(uint16_t windowSize)
Definition: PcapFilter.h:656
Definition: PcapFilter.h:584
IPFilter(const std::string &ipAddress, Direction dir, int len)
Definition: PcapFilter.h:177
void parseToString(std::string &result)
Definition: PcapFilter.h:43
MacAddressFilter(MacAddress address, Direction dir)
Definition: PcapFilter.h:342
TcpFlagsFilter(uint8_t tcpFlagBitMask, MatchOptions matchOption)
Definition: PcapFilter.h:617
Definition: PcapFilter.h:666
void setLength(uint16_t legnth)
Definition: PcapFilter.h:685
UdpLengthFilter(uint16_t legnth, FilterOperator op)
Definition: PcapFilter.h:677
void setLen(int len)
Definition: PcapFilter.h:198
AndFilter()
Definition: PcapFilter.h:400
NotFilter(GeneralFilter *filterToInverse)
Definition: PcapFilter.h:469
void setProto(ProtocolType proto)
Definition: PcapFilter.h:507