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 [VLAN_MAX_LAYERS]
 
uint8_t vlan_idx
 
uint8_t flowflags
 
uint8_t app_update_direction
 
SignatureMask sig_mask
 
uint16_t pkt_hooks
 
uint32_t flags
 
struct Flow_flow
 
uint32_t flow_hash
 
enum PacketTunnelType ttype
 
SCTime_t ts
 
union { 
 
   NFQPacketVars   nfq_v 
 
   IPFWPacketVars   ipfw_v 
 
   uint8_t   plugin_v [PLUGIN_VAR_SIZE
 
   PcapPacketVars   pcap_v 
 
};  
 
void(* ReleasePacket )(struct Packet_ *)
 
int(* BypassPacketsFlow )(struct Packet_ *)
 
PktVarpktvar
 
struct PacketL2 l2
 
struct PacketL3 l3
 
struct PacketL4 l4
 
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
 
uint8_t nb_decoded_layers
 
uint8_t drop_reason
 
bool tunnel_verdicted
 
struct Packet_root
 
uint16_t tunnel_rtv_cnt
 
uint16_t tunnel_tpr_cnt
 
uint32_t tenant_id
 
struct PktPool_pool
 
PktProfilingprofile
 
struct { 
 
   SCSpinlock   tunnel_lock 
 
persistent 
 
uint8_t pkt_data []
 

Detailed Description

Definition at line 500 of file decode.h.

Field Documentation

◆ [union]

union { ... } Packet_

◆ [union]

union { ... } Packet_

◆ [union]

union { ... } Packet_

◆ action

uint8_t Packet_::action

◆ alerts

◆ app_layer_events

◆ app_update_direction

uint8_t Packet_::app_update_direction

◆ BypassPacketsFlow

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 594 of file decode.h.

Referenced by PacketBypassCallback(), and PacketReinit().

◆ code

uint8_t Packet_::code

Definition at line 512 of file decode.h.

Referenced by AlertFastLogger(), CreateEveHeader(), DecodeICMPV4(), DecodeICMPV6(), and FlowInit().

◆ datalink

int Packet_::datalink

data linktype in host order

Definition at line 639 of file decode.h.

Referenced by DecodeErfDag(), EvePacket(), LLVMFuzzerTestOneInput(), PacketReinit(), PacketTunnelPktSetup(), and SCPacketSetDatalink().

◆ dp

◆ drop_reason

uint8_t Packet_::drop_reason

Definition at line 647 of file decode.h.

Referenced by CaptureStatsUpdate(), PacketDrop(), and PacketReinit().

◆ dst

◆ events

◆ ext_pkt

uint8_t* Packet_::ext_pkt

Definition at line 615 of file decode.h.

Referenced by PacketCallocExtPkt(), PacketCopyDataOffset(), and PacketSetData().

◆ flags

◆ flow

◆ flow_hash

uint32_t Packet_::flow_hash

Definition at line 550 of file decode.h.

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

◆ flowflags

◆ host_dst

struct Host_* Packet_::host_dst

Definition at line 623 of file decode.h.

Referenced by PacketReleaseRefs().

◆ host_src

struct Host_* Packet_::host_src

Definition at line 622 of file decode.h.

Referenced by PacketReleaseRefs().

◆ [struct]

struct { ... } Packet_::icmp_d

Referenced by DecodeICMPV4(), and DecodeICMPV6().

◆ [struct]

struct { ... } Packet_::icmp_s

◆ ipfw_v

IPFWPacketVars Packet_::ipfw_v

Definition at line 566 of file decode.h.

◆ l2

struct PacketL2 Packet_::l2

Definition at line 599 of file decode.h.

◆ l3

struct PacketL3 Packet_::l3

Definition at line 600 of file decode.h.

Referenced by DecodeIPV6FragHeader(), and ReCalculateChecksum().

◆ l4

◆ livedev

◆ nb_decoded_layers

uint8_t Packet_::nb_decoded_layers

Definition at line 644 of file decode.h.

Referenced by PacketReinit(), and PacketTunnelPktSetup().

◆ next

struct Packet_* Packet_::next

◆ nfq_v

NFQPacketVars Packet_::nfq_v

Definition at line 563 of file decode.h.

◆ payload

◆ payload_len

◆ pcap_cnt

◆ pcap_v

PcapPacketVars Packet_::pcap_v

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

Definition at line 587 of file decode.h.

◆ [struct]

struct { ... } Packet_::persistent

◆ pkt_data

uint8_t Packet_::pkt_data[]

flex array accessor to allocated packet data. Size of the additional data is default_packet_size. If this is insufficient, Packet::ext_pkt will be used instead.

Definition at line 689 of file decode.h.

◆ pkt_hooks

uint16_t Packet_::pkt_hooks

bit flags of SignatureHookPkt values this packet should trigger

Definition at line 541 of file decode.h.

Referenced by FlowHandlePacketUpdate(), PacketReinit(), and Prefilter().

◆ pkt_src

◆ pktlen

uint32_t Packet_::pktlen

Definition at line 614 of file decode.h.

◆ pktvar

PktVar* Packet_::pktvar

◆ plugin_v

uint8_t Packet_::plugin_v[PLUGIN_VAR_SIZE]

Definition at line 584 of file decode.h.

◆ pool

◆ prev

struct Packet_* Packet_::prev

Definition at line 636 of file decode.h.

Referenced by PacketReinit().

◆ profile

PktProfiling* Packet_::profile

◆ proto

◆ recursion_level

uint8_t Packet_::recursion_level

◆ ReleasePacket

void(* Packet_::ReleasePacket) (struct Packet_ *)

The release function for packet structure and data

Definition at line 591 of file decode.h.

Referenced by PacketFreeOrRelease(), PacketGetFromAlloc(), PacketGetFromQueueOrAlloc(), SCPacketSetReleasePacket(), and TmqhOutputPacketpool().

◆ root

◆ sig_mask

SignatureMask Packet_::sig_mask

sig mask flags this packet has, used in signature matching

Definition at line 538 of file decode.h.

Referenced by PacketReinit().

◆ sp

◆ src

◆ tenant_id

uint32_t Packet_::tenant_id

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

Definition at line 665 of file decode.h.

Referenced by AlertJsonHeader(), Detect(), PacketDefragPktSetup(), PacketReinit(), and PacketTunnelPktSetup().

◆ ts

◆ ttype

enum PacketTunnelType Packet_::ttype

◆ tunnel_lock

SCSpinlock Packet_::tunnel_lock

lock to protect access to:

  • tunnel_rtv_cnt
  • tunnel_tpr_cnt
  • tunnel_verdicted
  • nfq_v.mark (if p->ttype != PacketTunnelNone)

Definition at line 683 of file decode.h.

Referenced by PacketDestructor(), PacketInit(), and TmqhOutputPacketpool().

◆ tunnel_rtv_cnt

uint16_t Packet_::tunnel_rtv_cnt

Definition at line 660 of file decode.h.

Referenced by PacketReinit().

◆ tunnel_tpr_cnt

uint16_t Packet_::tunnel_tpr_cnt

Definition at line 662 of file decode.h.

Referenced by PacketReinit().

◆ tunnel_verdicted

bool Packet_::tunnel_verdicted

has verdict on this tunneled packet been issued?

Definition at line 650 of file decode.h.

Referenced by PacketReinit().

◆ type

uint8_t Packet_::type

Definition at line 511 of file decode.h.

Referenced by AlertFastLogger(), CreateEveHeader(), DecodeICMPV4(), DecodeICMPV6(), and FlowInit().

◆ vlan_id

◆ vlan_idx

uint8_t Packet_::vlan_idx

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