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
 
uint32_t flags
 
struct Flow_flow
 
uint32_t flow_hash
 
enum PacketTunnelType ttype
 
SCTime_t ts
 
union {
   NFQPacketVars   nfq_v
 
   IPFWPacketVars   ipfw_v
 
   NapatechPacketVars   ntpv
 
   uint8_t   plugin_v [PLUGIN_VAR_SIZE]
 
   PcapPacketVars   pcap_v
 
}; 
 
void(* ReleasePacket )(struct Packet_ *)
 
int(* BypassPacketsFlow )(struct Packet_ *)
 
PktVarpktvar
 
EthernetHdr * ethh
 
int32_t level3_comp_csum
 
int32_t level4_comp_csum
 
IPV4Hdrip4h
 
IPV6Hdrip6h
 
union {
   IPV4Vars   ip4vars
 
   struct {
      IPV6Vars   ip6vars
 
      IPV6ExtHdrs   ip6eh
 
   } 
 
}; 
 
union {
   TCPVars   tcpvars
 
   ICMPV4Vars   icmpv4vars
 
   ICMPV6Vars   icmpv6vars
 
l4vars
 
TCPHdr * tcph
 
UDPHdr * udph
 
SCTPHdr * sctph
 
ESPHdr * esph
 
ICMPV4Hdr * icmpv4h
 
ICMPV6Hdricmpv6h
 
PPPHdr * ppph
 
PPPOESessionHdrpppoesh
 
PPPOEDiscoveryHdr * pppoedh
 
GREHdr * greh
 
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 435 of file decode.h.

Field Documentation

◆ @32

union { ... }

◆ @34

union { ... }

◆ @36

union { ... }

◆ @38

union { ... }

◆ action

uint8_t Packet_::action

Definition at line 590 of file decode.h.

Referenced by PacketCheckAction(), and PacketDrop().

◆ alerts

◆ app_layer_events

AppLayerDecoderEvents* Packet_::app_layer_events

Definition at line 613 of file decode.h.

Referenced by PacketCreateMask(), PacketDestructor(), and PacketReinit().

◆ app_update_direction

uint8_t Packet_::app_update_direction

Definition at line 470 of file decode.h.

Referenced by PacketReinit().

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

Referenced by PacketBypassCallback(), PacketReinit(), and ReceivePfringLoop().

◆ code

uint8_t Packet_::code

Definition at line 447 of file decode.h.

◆ datalink

int Packet_::datalink

data linktype in host order

Definition at line 620 of file decode.h.

Referenced by DecodeErfDag(), EvePacket(), NapatechDecode(), PacketDefragPktSetup(), PacketReinit(), and PacketTunnelPktSetup().

◆ dp

◆ drop_reason

uint8_t Packet_::drop_reason

Definition at line 628 of file decode.h.

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

◆ dst

◆ esph

ESPHdr* Packet_::esph

Definition at line 572 of file decode.h.

Referenced by PacketReinit().

◆ ethh

EthernetHdr* Packet_::ethh

Definition at line 537 of file decode.h.

Referenced by PacketReinit().

◆ events

◆ ext_pkt

uint8_t* Packet_::ext_pkt

Definition at line 596 of file decode.h.

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

◆ flags

◆ flow

◆ flow_hash

uint32_t Packet_::flow_hash

Definition at line 479 of file decode.h.

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

◆ flowflags

◆ greh

GREHdr* Packet_::greh

Definition at line 582 of file decode.h.

Referenced by PacketReinit().

◆ host_dst

struct Host_* Packet_::host_dst

Definition at line 604 of file decode.h.

◆ host_src

struct Host_* Packet_::host_src

Definition at line 603 of file decode.h.

◆ icmp_d

struct { ... } Packet_::icmp_d

Referenced by DecodeICMPV4(), and DecodeICMPV6().

◆ icmp_s

struct { ... } Packet_::icmp_s

◆ icmpv4h

ICMPV4Hdr* Packet_::icmpv4h

Definition at line 574 of file decode.h.

Referenced by DecodeICMPV4(), FlowInit(), and PacketReinit().

◆ icmpv4vars

ICMPV4Vars Packet_::icmpv4vars

Definition at line 559 of file decode.h.

Referenced by DecodeICMPV4().

◆ icmpv6h

ICMPV6Hdr* Packet_::icmpv6h

Definition at line 576 of file decode.h.

Referenced by DecodeICMPV6(), and PacketReinit().

◆ icmpv6vars

ICMPV6Vars Packet_::icmpv6vars

Definition at line 560 of file decode.h.

◆ ip4h

IPV4Hdr* Packet_::ip4h

Definition at line 544 of file decode.h.

Referenced by FlowGetIpPairProtoHash(), and PacketReinit().

◆ ip4vars

IPV4Vars Packet_::ip4vars

Definition at line 550 of file decode.h.

◆ ip6eh

IPV6ExtHdrs Packet_::ip6eh

Definition at line 553 of file decode.h.

Referenced by DecodeIPV6FragHeader().

◆ ip6h

IPV6Hdr* Packet_::ip6h

Definition at line 546 of file decode.h.

Referenced by FlowGetIpPairProtoHash(), PacketReinit(), and UTHBuildPacketIPV6Real().

◆ ip6vars

IPV6Vars Packet_::ip6vars

Definition at line 552 of file decode.h.

◆ ipfw_v

IPFWPacketVars Packet_::ipfw_v

Definition at line 495 of file decode.h.

◆ l4vars

union { ... } Packet_::l4vars

◆ level3_comp_csum

int32_t Packet_::level3_comp_csum

Definition at line 540 of file decode.h.

◆ level4_comp_csum

int32_t Packet_::level4_comp_csum

Definition at line 542 of file decode.h.

◆ livedev

struct LiveDevice_* Packet_::livedev

◆ nb_decoded_layers

uint8_t Packet_::nb_decoded_layers

Definition at line 625 of file decode.h.

Referenced by PacketReinit(), and PacketTunnelPktSetup().

◆ next

struct Packet_* Packet_::next

Definition at line 616 of file decode.h.

Referenced by PacketReinit().

◆ nfq_v

NFQPacketVars Packet_::nfq_v

Definition at line 492 of file decode.h.

◆ ntpv

NapatechPacketVars Packet_::ntpv

Definition at line 515 of file decode.h.

◆ payload

◆ payload_len

◆ pcap_cnt

uint64_t Packet_::pcap_cnt

◆ pcap_v

PcapPacketVars Packet_::pcap_v

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

Definition at line 524 of file decode.h.

◆ persistent

struct { ... } Packet_::persistent

Referenced by PacketDestructor(), and PacketInit().

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

◆ pkt_src

uint8_t Packet_::pkt_src

Definition at line 592 of file decode.h.

Referenced by PacketEnqueueNoLock(), PacketReinit(), and StreamTcp().

◆ pktlen

uint32_t Packet_::pktlen

Definition at line 595 of file decode.h.

◆ pktvar

PktVar* Packet_::pktvar

◆ plugin_v

uint8_t Packet_::plugin_v[PLUGIN_VAR_SIZE]

Definition at line 521 of file decode.h.

◆ pool

struct PktPool_* Packet_::pool

Definition at line 651 of file decode.h.

Referenced by PacketFreeOrRelease(), TmqhOutputPacketpool(), and TmqhOutputSimple().

◆ ppph

PPPHdr* Packet_::ppph

Definition at line 578 of file decode.h.

Referenced by PacketReinit().

◆ pppoedh

PPPOEDiscoveryHdr* Packet_::pppoedh

Definition at line 580 of file decode.h.

Referenced by DecodePPPOEDiscovery(), and PacketReinit().

◆ pppoesh

PPPOESessionHdr* Packet_::pppoesh

Definition at line 579 of file decode.h.

Referenced by DecodePPPOESession(), and PacketReinit().

◆ prev

struct Packet_* Packet_::prev

Definition at line 617 of file decode.h.

Referenced by PacketReinit().

◆ profile

PktProfiling* Packet_::profile

Definition at line 654 of file decode.h.

Referenced by SCProfileRuleStart(), and SCProfilingAddPacket().

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

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

◆ root

◆ sctph

SCTPHdr* Packet_::sctph

Definition at line 570 of file decode.h.

Referenced by PacketReinit().

◆ sp

◆ src

◆ tcph

◆ tcpvars

TCPVars Packet_::tcpvars

Definition at line 558 of file decode.h.

◆ tenant_id

uint32_t Packet_::tenant_id

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

Definition at line 646 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 664 of file decode.h.

Referenced by PacketDestructor(), and PacketInit().

◆ tunnel_rtv_cnt

uint16_t Packet_::tunnel_rtv_cnt

Definition at line 641 of file decode.h.

Referenced by PacketReinit().

◆ tunnel_tpr_cnt

uint16_t Packet_::tunnel_tpr_cnt

Definition at line 643 of file decode.h.

Referenced by PacketReinit().

◆ tunnel_verdicted

bool Packet_::tunnel_verdicted

has verdict on this tunneled packet been issued?

Definition at line 631 of file decode.h.

Referenced by PacketReinit().

◆ type

uint8_t Packet_::type

Definition at line 446 of file decode.h.

◆ udph

UDPHdr* Packet_::udph

Definition at line 568 of file decode.h.

Referenced by FlowInit(), and PacketReinit().

◆ vlan_id

uint16_t Packet_::vlan_id[VLAN_MAX_LAYERS]

Definition at line 463 of file decode.h.

Referenced by FlowGetIpPairProtoHash(), FlowInit(), PacketDefragPktSetup(), and PacketReinit().

◆ vlan_idx

uint8_t Packet_::vlan_idx

Definition at line 464 of file decode.h.

Referenced by DecodePfring(), DecodeVLAN(), FlowInit(), PacketDefragPktSetup(), and PacketReinit().


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