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

Field Documentation

◆ @34

union { ... }

◆ @36

union { ... }

◆ @38

union { ... }

◆ action

uint8_t Packet_::action

Definition at line 601 of file decode.h.

Referenced by PacketCheckAction(), and PacketDrop().

◆ alerts

PacketAlerts Packet_::alerts

◆ app_layer_events

AppLayerDecoderEvents* Packet_::app_layer_events

Definition at line 624 of file decode.h.

Referenced by PacketCreateMask(), and PacketDestructor().

◆ app_update_direction

uint8_t Packet_::app_update_direction

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

Referenced by PacketBypassCallback(), and ReceivePfringLoop().

◆ code

uint8_t Packet_::code

Definition at line 502 of file decode.h.

◆ datalink

int Packet_::datalink

data linktype in host order

Definition at line 631 of file decode.h.

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

◆ dp

Port Packet_::dp

◆ drop_reason

uint8_t Packet_::drop_reason

Definition at line 639 of file decode.h.

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

◆ dst

◆ events

PacketEngineEvents Packet_::events

◆ ext_pkt

uint8_t* Packet_::ext_pkt

Definition at line 607 of file decode.h.

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

◆ flags

◆ flow

◆ flow_hash

uint32_t Packet_::flow_hash

Definition at line 534 of file decode.h.

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

◆ flowflags

uint8_t Packet_::flowflags

◆ host_dst

struct Host_* Packet_::host_dst

Definition at line 615 of file decode.h.

◆ host_src

struct Host_* Packet_::host_src

Definition at line 614 of file decode.h.

◆ icmp_d

struct { ... } Packet_::icmp_d

◆ icmp_s

struct { ... } Packet_::icmp_s

◆ ipfw_v

IPFWPacketVars Packet_::ipfw_v

Definition at line 550 of file decode.h.

◆ l2

struct PacketL2 Packet_::l2

Definition at line 589 of file decode.h.

◆ l3

struct PacketL3 Packet_::l3

Definition at line 589 of file decode.h.

Referenced by DecodeIPV6FragHeader().

◆ l4

struct PacketL4 Packet_::l4

◆ livedev

struct LiveDevice_* Packet_::livedev

Definition at line 610 of file decode.h.

Referenced by FlowInit(), PacketDefragPktSetup(), PacketInit(), and PacketTunnelPktSetup().

◆ nb_decoded_layers

uint8_t Packet_::nb_decoded_layers

Definition at line 636 of file decode.h.

Referenced by PacketTunnelPktSetup().

◆ next

struct Packet_* Packet_::next

Definition at line 627 of file decode.h.

◆ nfq_v

NFQPacketVars Packet_::nfq_v

Definition at line 547 of file decode.h.

◆ ntpv

NapatechPacketVars Packet_::ntpv

Definition at line 570 of file decode.h.

◆ payload

◆ payload_len

◆ pcap_cnt

uint64_t Packet_::pcap_cnt

packet number in the pcap file, matches wireshark

Definition at line 618 of file decode.h.

Referenced by DetectRunPrefilterFrame(), DetectRunPrefilterTx(), ExceptionPolicyParse(), FlowHandlePacketUpdate(), StreamTcp(), and StreamTcpPacket().

◆ pcap_v

PcapPacketVars Packet_::pcap_v

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

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

◆ pkt_src

uint8_t Packet_::pkt_src

Definition at line 603 of file decode.h.

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

◆ pktlen

uint32_t Packet_::pktlen

Definition at line 606 of file decode.h.

◆ pktvar

PktVar* Packet_::pktvar

◆ plugin_v

uint8_t Packet_::plugin_v[PLUGIN_VAR_SIZE]

Definition at line 576 of file decode.h.

◆ pool

struct PktPool_* Packet_::pool

Definition at line 662 of file decode.h.

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

◆ prev

struct Packet_* Packet_::prev

Definition at line 628 of file decode.h.

◆ profile

PktProfiling* Packet_::profile

Definition at line 665 of file decode.h.

Referenced by SCProfileRuleStart(), and SCProfilingAddPacket().

◆ proto

◆ recursion_level

uint8_t Packet_::recursion_level

Definition at line 516 of file decode.h.

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

◆ ReleasePacket

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

The release function for packet structure and data

Definition at line 583 of file decode.h.

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

◆ root

◆ sp

Port Packet_::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 657 of file decode.h.

Referenced by AlertJsonHeader(), Detect(), PacketDefragPktSetup(), 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 675 of file decode.h.

Referenced by PacketDestructor(), and PacketInit().

◆ tunnel_rtv_cnt

uint16_t Packet_::tunnel_rtv_cnt

Definition at line 652 of file decode.h.

◆ tunnel_tpr_cnt

uint16_t Packet_::tunnel_tpr_cnt

Definition at line 654 of file decode.h.

◆ tunnel_verdicted

bool Packet_::tunnel_verdicted

has verdict on this tunneled packet been issued?

Definition at line 642 of file decode.h.

◆ type

uint8_t Packet_::type

Definition at line 501 of file decode.h.

◆ vlan_id

uint16_t Packet_::vlan_id[VLAN_MAX_LAYERS]

Definition at line 518 of file decode.h.

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

◆ vlan_idx

uint8_t Packet_::vlan_idx

Definition at line 519 of file decode.h.

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


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