suricata
decode.c File Reference
#include "suricata-common.h"
#include "decode.h"
#include "packet.h"
#include "flow.h"
#include "flow-storage.h"
#include "tmqh-packetpool.h"
#include "app-layer.h"
#include "output.h"
#include "decode-vxlan.h"
#include "decode-geneve.h"
#include "decode-erspan.h"
#include "decode-teredo.h"
#include "decode-arp.h"
#include "defrag-hash.h"
#include "util-hash.h"
#include "util-hash-string.h"
#include "util-print.h"
#include "util-profiling.h"
#include "util-validate.h"
#include "util-debug.h"
#include "util-exception-policy.h"
#include "action-globals.h"
Include dependency graph for decode.c:

Go to the source code of this file.

Data Structures

struct  CaptureStats_
 

Typedefs

typedef struct CaptureStats_ CaptureStats
 

Functions

PacketAlertPacketAlertCreate (void)
 Initialize PacketAlerts with dynamic alerts array size. More...
 
void PacketAlertFree (PacketAlert *pa)
 
void PacketFree (Packet *p)
 Return a malloced packet. More...
 
void PacketDecodeFinalize (ThreadVars *tv, DecodeThreadVars *dtv, Packet *p)
 Finalize decoding of a packet. More...
 
void PacketUpdateEngineEventCounters (ThreadVars *tv, DecodeThreadVars *dtv, Packet *p)
 
PacketPacketGetFromAlloc (void)
 Get a malloced packet. More...
 
void PacketFreeOrRelease (Packet *p)
 Return a packet to where it was allocated. More...
 
PacketPacketGetFromQueueOrAlloc (void)
 Get a packet. We try to get a packet from the packetpool first, but if that is empty we alloc a packet that is free'd again after processing. More...
 
int PacketCallocExtPkt (Packet *p, int datalen)
 
int PacketCopyDataOffset (Packet *p, uint32_t offset, const uint8_t *data, uint32_t datalen)
 Copy data to Packet payload at given offset. More...
 
int PacketCopyData (Packet *p, const uint8_t *pktdata, uint32_t pktlen)
 Copy data to Packet payload and set packet length. More...
 
PacketPacketTunnelPktSetup (ThreadVars *tv, DecodeThreadVars *dtv, Packet *parent, const uint8_t *pkt, uint32_t len, enum DecodeTunnelProto proto)
 Setup a pseudo packet (tunnel) More...
 
PacketPacketDefragPktSetup (Packet *parent, const uint8_t *pkt, uint32_t len, uint8_t proto)
 Setup a pseudo packet (reassembled frags) More...
 
void PacketDefragPktSetupParent (Packet *parent)
 inform defrag "parent" that a pseudo packet is now associated to it. More...
 
void PacketBypassCallback (Packet *p)
 
void PacketSwap (Packet *p)
 switch direction of a packet More...
 
void DecodeUnregisterCounters (void)
 
void DecodeRegisterPerfCounters (DecodeThreadVars *dtv, ThreadVars *tv)
 
void DecodeUpdatePacketCounters (ThreadVars *tv, const DecodeThreadVars *dtv, const Packet *p)
 
void AddressDebugPrint (Address *a)
 Debug print function for printing addresses. More...
 
DecodeThreadVarsDecodeThreadVarsAlloc (ThreadVars *tv)
 Alloc and setup DecodeThreadVars. More...
 
void DecodeThreadVarsFree (ThreadVars *tv, DecodeThreadVars *dtv)
 
int PacketSetData (Packet *p, const uint8_t *pktdata, uint32_t pktlen)
 Set data for Packet and set length when zero copy is used. More...
 
const char * PktSrcToString (enum PktSrcEnum pkt_src)
 
const char * PacketDropReasonToString (enum PacketDropReason r)
 
void CaptureStatsUpdate (ThreadVars *tv, const Packet *p)
 
void CaptureStatsSetup (ThreadVars *tv)
 
void DecodeGlobalConfig (void)
 
void PacketAlertGetMaxConfig (void)
 

Variables

uint32_t default_packet_size = 0
 
bool stats_decoder_events
 
const char * stats_decoder_events_prefix
 
bool stats_stream_events
 
uint8_t decoder_max_layers = PKT_DEFAULT_MAX_DECODED_LAYERS
 
uint16_t packet_alert_max = PACKET_ALERT_MAX
 
ExceptionPolicyStatsSetts defrag_memcap_eps_stats
 
ExceptionPolicyStatsSetts flow_memcap_eps_stats
 
thread_local CaptureStats t_capture_stats
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Decode the raw packet

Definition in file decode.c.