suricata
flow-worker.c File Reference
#include "suricata-common.h"
#include "suricata.h"
#include "decode.h"
#include "stream-tcp.h"
#include "app-layer.h"
#include "detect-engine.h"
#include "output.h"
#include "app-layer-parser.h"
#include "util-validate.h"
#include "flow-util.h"
Include dependency graph for flow-worker.c:

Go to the source code of this file.

Data Structures

struct  FlowWorkerThreadData_
 

Typedefs

typedef DetectEngineThreadCtxDetectEngineThreadCtxPtr
 
typedef struct FlowWorkerThreadData_ FlowWorkerThreadData
 

Functions

TmEcode Detect (ThreadVars *tv, Packet *p, void *data, PacketQueue *pq, PacketQueue *postpq)
 Detection engine thread wrapper. More...
 
TmEcode StreamTcp (ThreadVars *, Packet *, void *, PacketQueue *, PacketQueue *)
 
void FlowWorkerReplaceDetectCtx (void *flow_worker, void *detect_ctx)
 
void * FlowWorkerGetDetectCtxPtr (void *flow_worker)
 
const char * ProfileFlowWorkerIdToString (enum ProfileFlowWorkerId fwi)
 
void TmModuleFlowWorkerRegister (void)
 

Detailed Description

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

Flow Workers are single thread modules taking care of (almost) everything related to packets with flows:

  • Lookup/creation
  • Stream tracking, reassembly
  • Applayer update
  • Detection

This all while holding the flow lock.

Definition in file flow-worker.c.

Typedef Documentation

Definition at line 48 of file flow-worker.c.

Function Documentation

TmEcode Detect ( ThreadVars tv,
Packet p,
void *  data,
PacketQueue pq,
PacketQueue postpq 
)

Detection engine thread wrapper.

Parameters
tvthread vars
ppacket to inspect
datathread specific data
pqpacket queue
Return values
TM_ECODE_FAILEDerror
TM_ECODE_OKok

Definition at line 1602 of file detect.c.

References DetectEngineThreadCtx_::de_ctx, DEBUG_VALIDATE_PACKET, Packet_::flow, DetectEngineThreadCtx_::mt_det_ctxs_cnt, DetectEngineThreadCtx_::mt_det_ctxs_hash, SC_ATOMIC_GET, SC_ATOMIC_SET, SCLogDebug, Packet_::tenant_id, DetectEngineThreadCtx_::TenantGetId, TM_ECODE_FAILED, TM_ECODE_OK, and unlikely.

void* FlowWorkerGetDetectCtxPtr ( void *  flow_worker)

Definition at line 325 of file flow-worker.c.

References SC_ATOMIC_GET.

Referenced by DetectEngineInspectPktBufferGeneric().

Here is the caller graph for this function:

void FlowWorkerReplaceDetectCtx ( void *  flow_worker,
void *  detect_ctx 
)

Definition at line 318 of file flow-worker.c.

References SC_ATOMIC_SET.

Referenced by DetectEngineInspectPktBufferGeneric().

Here is the caller graph for this function:

const char* ProfileFlowWorkerIdToString ( enum ProfileFlowWorkerId  fwi)
TmEcode StreamTcp ( ThreadVars ,
Packet ,
void *  ,
PacketQueue ,
PacketQueue  
)

Definition at line 5142 of file stream-tcp.c.

void TmModuleFlowWorkerRegister ( void  )