suricata
Packet_ Struct Reference

#include <decode.h>

Collaboration diagram for Packet_:

Data Fields

Address src
 
Address dst
 
union {
   Port   sp
 
   struct {
      uint8_t   type
 
      uint8_t   code
 
   }   icmp_s
 
}; 
 
union {
   Port   dp
 
   struct {
      uint8_t   type
 
      uint8_t   code
 
   }   icmp_d
 
}; 
 
uint8_t proto
 
uint8_t recursion_level
 
uint16_t vlan_id [2]
 
uint8_t vlan_idx
 
uint8_t flowflags
 
uint32_t flags
 
struct Flow_flow
 
uint32_t flow_hash
 
struct timeval ts
 
union {
   NFQPacketVars   nfq_v
 
   IPFWPacketVars   ipfw_v
 
   PcapPacketVars   pcap_v
 
}; 
 
void(* ReleasePacket )(struct Packet_ *)
 
int(* BypassPacketsFlow )(struct Packet_ *)
 
PktVarpktvar
 
EthernetHdr * ethh
 
int32_t level3_comp_csum
 
int32_t level4_comp_csum
 
IPV4Hdr * ip4h
 
IPV6Hdr * ip6h
 
union {
   IPV4Vars   ip4vars
 
   struct {
      IPV6Vars   ip6vars
 
      IPV6ExtHdrs   ip6eh
 
   } 
 
}; 
 
union {
   TCPVars   tcpvars
 
   ICMPV4Vars   icmpv4vars
 
   ICMPV6Vars   icmpv6vars
 
l4vars
 
TCPHdr * tcph
 
UDPHdr * udph
 
SCTPHdr * sctph
 
ICMPV4Hdr * icmpv4h
 
ICMPV6Hdricmpv6h
 
PPPHdr * ppph
 
PPPOESessionHdrpppoesh
 
PPPOEDiscoveryHdr * pppoedh
 
GREHdr * greh
 
VLANHdr * vlanh [2]
 
uint8_t * payload
 
uint16_t payload_len
 
uint8_t action
 
uint8_t pkt_src
 
uint32_t pktlen
 
uint8_t * ext_pkt
 
struct LiveDevice_livedev
 
PacketAlerts alerts
 
struct Host_host_src
 
struct Host_host_dst
 
uint64_t pcap_cnt
 
PacketEngineEvents events
 
AppLayerDecoderEventsapp_layer_events
 
struct Packet_next
 
struct Packet_prev
 
int datalink
 
struct Packet_root
 
SCMutex tunnel_mutex
 
uint16_t tunnel_rtv_cnt
 
uint16_t tunnel_tpr_cnt
 
uint32_t tenant_id
 
struct PktPool_pool
 
PktProfilingprofile
 
NapatechPacketVars ntpv
 

Detailed Description

Definition at line 406 of file decode.h.

Field Documentation

union { ... }
union { ... }
union { ... }
union { ... }
int(* Packet_::BypassPacketsFlow) (struct Packet_ *)

The function triggering bypass the flow in the capture method. Return 1 for success and 0 on error

Definition at line 490 of file decode.h.

Referenced by DetectBypassRegister(), PacketBypassCallback(), ReceivePfringLoop(), and TmModuleDecodeAFPRegister().

uint8_t Packet_::code

Definition at line 418 of file decode.h.

EthernetHdr* Packet_::ethh

Definition at line 496 of file decode.h.

Referenced by DecodeEthernet(), and TmModuleDecodeAFPRegister().

PacketEngineEvents Packet_::events
uint8_t* Packet_::ext_pkt
uint32_t Packet_::flags

Definition at line 442 of file decode.h.

Referenced by AppLayerIncTxCounter(), CaptureStatsUpdate(), CleanupPcapFileFileVars(), DecodeAFP(), DecodeErfDag(), DecodeErfFile(), DecodeIPFW(), DecodeIPV4(), DecodeIPV6FragHeader(), DecodePcap(), DecodePfring(), DefragTrackerFreeFrags(), DetectBypassRegister(), DetectCsumRegister(), DetectDceGetState(), DetectDceOpnumRegister(), DetectDceStubDataRegister(), DetectDNP3Register(), DetectDnsQueryRegister(), DetectEngineInspectBufferGeneric(), DetectEngineInspectENIP(), DetectEngineInspectModbus(), DetectEngineInspectStream(), DetectEngineStateResetTxs(), DetectFlowbitsAnalyze(), DetectFlowFree(), DetectFlowMatch(), DetectFtpbounceRegister(), DetectHostbitFree(), DetectHttpRequestLineRegister(), DetectHttpResponseLineRegister(), DetectIPRepRegister(), DetectLuaRegister(), DetectMarkDataFree(), DetectPcrePayloadMatch(), DetectProtoContainsProto(), DetectReplaceExecuteInternal(), DetectSignatureApplyActions(), DetectSshSoftwareVersionRegister(), DetectSshVersionRegister(), DetectSslStateRegister(), DetectSslVersionRegister(), DetectTemplateRustBufferRegister(), DetectTlsFingerprintRegister(), DetectTlsIssuerRegister(), DetectTlsJa3HashRegister(), DetectTlsJa3StringRegister(), DetectTlsSerialRegister(), DetectTlsSniRegister(), DetectTlsSubjectRegister(), DetectTlsValidityRegister(), DetectTlsVersionRegister(), DetectUricontentRegister(), DetectUrilenValidateContent(), FlowHandlePacket(), FlowHandlePacketUpdate(), FlowSetupPacket(), IPOnlyAddSignature(), IPOnlyMatchPacket(), NapatechDecode(), NFQInitConfig(), NFQSetVerdict(), OutputRegisterFiledataLogger(), OutputRegisterFileLogger(), PacketAlertFinalize(), PacketCreateMask(), PacketDecodeFinalize(), PacketFreeOrRelease(), PacketGetFromAlloc(), PacketPoolWaitForN(), PacketSetData(), PacketTunnelPktSetup(), PcapFileGlobalInit(), Prefilter(), RegisterModbusParsers(), SCProfileRuleStart(), SCSigSignatureOrderingModuleCleanup(), SigMatchSignaturesGetSgh(), SMTPParserCleanup(), StreamNeedsReassembly(), StreamReassembleRaw(), StreamReassembleRawHasDataReady(), StreamReassembleRawUpdateProgress(), StreamTcp(), StreamTcpInlineSegmentReplacePacket(), StreamTcpPacket(), StreamTcpPseudoPacketCreateStreamEndPacket(), StreamTcpReassembleAppLayer(), StreamTcpReassembleHandleSegment(), StreamTcpReassembleHandleSegmentHandleData(), TagHashAddTag(), TmModuleDecodeAFPRegister(), TmModuleDecodeNetmapRegister(), TmModuleDecodePcapRegister(), TmModuleDecodePfringRegister(), TmqhOutputFlowHash(), TmqhOutputPacketpool(), TmqhOutputSimple(), Unified2Condition(), UTHAssignFlow(), and VerdictIPFW().

struct Flow_* Packet_::flow

Definition at line 444 of file decode.h.

Referenced by AFPSetBPFFilter(), Detect(), DetectBypassRegister(), DetectDceGetState(), DetectDceOpnumRegister(), DetectDceStubDataRegister(), DetectDNP3Register(), DetectDnsQueryRegister(), DetectEngineInspectENIP(), DetectEngineInspectModbus(), DetectEngineStateResetTxs(), DetectFilestorePostMatch(), DetectFlowbitsAnalyze(), DetectFlowbitsRegister(), DetectFlowintMatch(), DetectFlowvarMatch(), DetectFlowvarPostMatchSetup(), DetectFtpbounceRegister(), DetectHostbitFree(), DetectHttpRequestLineRegister(), DetectHttpResponseLineRegister(), DetectLuaRegister(), DetectPcrePayloadMatch(), DetectProtoContainsProto(), DetectRunPrefilterTx(), DetectSignatureApplyActions(), DetectSshSoftwareVersionRegister(), DetectSshVersionRegister(), DetectSslStateRegister(), DetectSslVersionRegister(), DetectStreamSizeFree(), DetectStreamSizeRegister(), DetectTagRegister(), DetectTemplateRustBufferRegister(), DetectTlsFingerprintRegister(), DetectTlsIssuerRegister(), DetectTlsJa3HashRegister(), DetectTlsJa3StringRegister(), DetectTlsRegister(), DetectTlsSerialRegister(), DetectTlsSniRegister(), DetectTlsSubjectRegister(), DetectTlsValidityRegister(), DetectTlsVersionRegister(), DetectUricontentRegister(), DetectUrilenValidateContent(), FlowForceReassemblyForFlow(), FlowHandlePacket(), IPOnlyAddSignature(), OutputJsonRegister(), OutputRegisterFiledataLogger(), OutputRegisterFileLogger(), OutputRegisterTxLogger(), PacketAlertFinalize(), PacketBypassCallback(), RegisterModbusParsers(), SCSigSignatureOrderingModuleCleanup(), SMTPParserCleanup(), StreamNeedsReassembly(), StreamTcp(), StreamTcpFreeConfig(), StreamTcpPacket(), StreamTcpPseudoPacketCreateStreamEndPacket(), StreamTcpPseudoSetup(), StreamTcpReassembleAppLayer(), StreamTcpReassembleDepthReached(), StreamTcpSegmentForEach(), StreamTcpSessionPktFree(), TagFlowAdd(), TagHandlePacket(), TagHashAddTag(), TagTimeoutCheck(), UTHAssignFlow(), and UTHBuildPacketOfFlows().

uint32_t Packet_::flow_hash

Definition at line 448 of file decode.h.

Referenced by DecodeIPV4(), FlowGetFlowFromHash(), FlowSetupPacket(), and TmqhOutputFlowHash().

uint8_t Packet_::flowflags

Definition at line 438 of file decode.h.

Referenced by AppLayerHandleUdp(), AppLayerIncTxCounter(), DetectBypassRegister(), DetectDceGetState(), DetectDceOpnumRegister(), DetectDceStubDataRegister(), DetectDistanceRegister(), DetectDNP3Register(), DetectDnsQueryRegister(), DetectEngineInspectENIP(), DetectEngineInspectModbus(), DetectEngineStateResetTxs(), DetectFilestorePostMatch(), DetectFilestoreRegister(), DetectFlowbitsAnalyze(), DetectFlowFree(), DetectFlowMatch(), DetectFtpbounceRegister(), DetectHostbitFree(), DetectHttpRequestLineRegister(), DetectHttpResponseLineRegister(), DetectLuaRegister(), DetectPcrePayloadMatch(), DetectProtoContainsProto(), DetectSignatureApplyActions(), DetectSshSoftwareVersionRegister(), DetectSshVersionRegister(), DetectSslStateRegister(), DetectSslVersionRegister(), DetectTemplateRustBufferRegister(), DetectTlsFingerprintRegister(), DetectTlsIssuerRegister(), DetectTlsJa3HashRegister(), DetectTlsJa3StringRegister(), DetectTlsSerialRegister(), DetectTlsSniRegister(), DetectTlsSubjectRegister(), DetectTlsValidityRegister(), DetectTlsVersionRegister(), DetectUricontentRegister(), DetectUrilenValidateContent(), FlowHandlePacketUpdate(), IPOnlyAddSignature(), OutputRegisterFiledataLogger(), OutputRegisterFileLogger(), PacketAlertFinalize(), RegisterModbusParsers(), SCSigSignatureOrderingModuleCleanup(), SigMatchSignaturesGetSgh(), SMTPParserCleanup(), StreamTcpPseudoPacketCreateStreamEndPacket(), StreamTcpReassembleDepthReached(), and StreamTcpReassembleHandleSegmentHandleData().

GREHdr* Packet_::greh

Definition at line 539 of file decode.h.

Referenced by DecodeGRE().

struct Host_* Packet_::host_dst

Definition at line 563 of file decode.h.

Referenced by DetectHostbitsRegister(), and DetectIPRepRegister().

struct Host_* Packet_::host_src

Definition at line 562 of file decode.h.

Referenced by DetectHostbitFree(), DetectHostbitsRegister(), and DetectIPRepRegister().

struct { ... } Packet_::icmp_d

Referenced by DecodeICMPV4(), and DecodeICMPV6().

struct { ... } Packet_::icmp_s
ICMPV4Vars Packet_::icmpv4vars

Definition at line 518 of file decode.h.

Referenced by DecodeICMPV4(), DetectIcmpIdFree(), DetectIcmpSeqFree(), and ICMPv4GetCounterpart().

ICMPV6Hdr* Packet_::icmpv6h

Definition at line 533 of file decode.h.

Referenced by DecodeICMPV6(), DetectCsumRegister(), FlowInit(), and OutputJsonRegister().

ICMPV6Vars Packet_::icmpv6vars

Definition at line 519 of file decode.h.

Referenced by DecodeICMPV6().

IPV4Vars Packet_::ip4vars

Definition at line 509 of file decode.h.

Referenced by DetectIpOptsFree().

IPV6ExtHdrs Packet_::ip6eh

Definition at line 512 of file decode.h.

Referenced by DecodeIPV6(), DecodeIPV6FragHeader(), and DefragRbFragCompare().

IPV6Vars Packet_::ip6vars

Definition at line 511 of file decode.h.

IPFWPacketVars Packet_::ipfw_v

Definition at line 461 of file decode.h.

Referenced by IPFWSetVerdict().

union { ... } Packet_::l4vars
int32_t Packet_::level3_comp_csum

Definition at line 499 of file decode.h.

Referenced by DetectCsumRegister().

int32_t Packet_::level4_comp_csum

Definition at line 501 of file decode.h.

Referenced by DetectCsumRegister(), and StreamTcpPacket().

NFQPacketVars Packet_::nfq_v

Definition at line 458 of file decode.h.

Referenced by DetectMarkDataFree(), NFQInitConfig(), and NFQSetVerdict().

NapatechPacketVars Packet_::ntpv

Definition at line 610 of file decode.h.

Referenced by NapatechPacketLoopZC(), and NapatechStreamThreadInit().

PcapPacketVars Packet_::pcap_v

libpcap vars: shared by Pcap Live mode and Pcap File mode

Definition at line 483 of file decode.h.

Referenced by CleanupPcapFileFileVars(), and DetectEngineTentantUnregisterPcapFile().

uint8_t Packet_::pkt_src

Definition at line 551 of file decode.h.

Referenced by PcapFileGlobalInit(), and StreamTcpPacket().

uint32_t Packet_::pktlen

Definition at line 554 of file decode.h.

PktVar* Packet_::pktvar

Definition at line 493 of file decode.h.

Referenced by OutputJsonRegister(), PktVarAdd(), PktVarAddKeyValue(), and PktVarGet().

struct PktPool_* Packet_::pool

Definition at line 604 of file decode.h.

Referenced by PacketPoolGetPacket(), PacketPoolReturnPacket(), and PacketPoolWaitForN().

PPPHdr* Packet_::ppph

Definition at line 535 of file decode.h.

Referenced by DecodeIPV4(), DecodePPP(), and DecodePPPOESession().

PPPOEDiscoveryHdr* Packet_::pppoedh

Definition at line 537 of file decode.h.

Referenced by DecodePPPOEDiscovery(), and DecodePPPOESession().

PPPOESessionHdr* Packet_::pppoesh

Definition at line 536 of file decode.h.

Referenced by DecodePPPOESession().

struct Packet_* Packet_::prev

Definition at line 576 of file decode.h.

Referenced by PacketDequeue(), and PacketEnqueue().

PktProfiling* Packet_::profile
uint8_t Packet_::recursion_level
void(* Packet_::ReleasePacket) (struct Packet_ *)

The release function for packet structure and data

Definition at line 487 of file decode.h.

Referenced by NapatechPacketLoopZC(), PacketGetFromAlloc(), PacketPoolWaitForN(), TmModuleDecodeAFPRegister(), TmModuleDecodeNetmapRegister(), and TmqhOutputPacketpool().

SCTPHdr* Packet_::sctph

Definition at line 529 of file decode.h.

Referenced by DecodeSCTP(), and FlowInit().

TCPVars Packet_::tcpvars

Definition at line 517 of file decode.h.

uint32_t Packet_::tenant_id

tenant id for this packet, if any. If 0 then no tenant was assigned.

Definition at line 599 of file decode.h.

Referenced by Detect(), PacketDefragPktSetup(), PacketTunnelPktSetup(), SigMatchSignaturesGetSgh(), and StreamTcpPseudoPacketCreateStreamEndPacket().

SCMutex Packet_::tunnel_mutex

mutex to protect access to:

  • tunnel_rtv_cnt
  • tunnel_tpr_cnt

Definition at line 592 of file decode.h.

Referenced by DetectMarkDataFree(), and TmqhOutputPacketpool().

uint16_t Packet_::tunnel_rtv_cnt

Definition at line 594 of file decode.h.

uint16_t Packet_::tunnel_tpr_cnt

Definition at line 596 of file decode.h.

uint8_t Packet_::type

Definition at line 417 of file decode.h.

Referenced by ReceiveErfDagLoop().

UDPHdr* Packet_::udph
VLANHdr* Packet_::vlanh[2]

The documentation for this struct was generated from the following file: