pypeafowl.DissectionInfo.hasProtocolL7¶
-
DissectionInfo.
hasProtocolL7
(self: pypeafowl.DissectionInfo, protocol: peafowl::ProtocolL7) → bool¶ Checks if a specific L7 protocol has been identified in a given dissection info. ATTENTION: Please note that protocols are associated to flows and not to packets. For example, if for a given flow, the first packet carries IMAP data and the second packet carries SSL encrypted data, we will have:
For the first packet:
pfwl_has_protocol_L7(info, PFWL_PROTO_L7_IMAP): True
pfwl_has_protocol_L7(info, PFWL_PROTO_L7_SSL): False
For the second packet:
pfwl_has_protocol_L7(info, PFWL_PROTO_L7_IMAP): True
pfwl_has_protocol_L7(info, PFWL_PROTO_L7_SSL): True
For all the subsequent packets:
pfwl_has_protocol_L7(info, PFWL_PROTO_L7_IMAP): True
pfwl_has_protocol_L7(info, PFWL_PROTO_L7_SSL): True
- Args:
- protocol
The L7 protocol.
- Returns:
True if the protocol was present, false otherwise.