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_


typedef DetectEngineThreadCtxDetectEngineThreadCtxPtr
typedef struct FlowWorkerThreadData_ FlowWorkerThreadData


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

Victor Julien

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.

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

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 ,

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

void TmModuleFlowWorkerRegister ( void  )