suricata
ThreadVars_ Struct Reference

Per thread variable structure. More...

#include <threadvars.h>

Collaboration diagram for ThreadVars_:

Public Member Functions

 SC_ATOMIC_DECLARE (uint32_t, flags)
 

Data Fields

pthread_t t
 
void *(* tm_func )(void *)
 
char name [16]
 
char * printable_name
 
char * thread_group_name
 
uint8_t thread_setup_flags
 
uint8_t type
 
uint16_t cpu_affinity
 
int thread_priority
 
uint8_t tmm_flags
 
uint8_t cap_flags
 
uint8_t inq_id
 
uint8_t outq_id
 
int id
 
Tmqinq
 
struct Packet_ *(* tmqh_in )(struct ThreadVars_ *)
 
struct TmSlot_tm_slots
 
struct TmSlot_tm_flowworker
 
Tmqoutq
 
void * outctx
 
void(* tmqh_out )(struct ThreadVars_ *, struct Packet_ *)
 
PacketQueueNoLock decode_pq
 
struct PacketQueue_stream_pq
 
struct PacketQueue_stream_pq_local
 
StatsPrivateThreadContext perf_private_ctx
 
struct ThreadVars_next
 
StatsPublicThreadContext perf_public_ctx
 
SCCtrlMutexctrl_mutex
 
SCCtrlCondTctrl_cond
 

Detailed Description

Per thread variable structure.

Definition at line 57 of file threadvars.h.

Member Function Documentation

◆ SC_ATOMIC_DECLARE()

ThreadVars_::SC_ATOMIC_DECLARE ( uint32_t  ,
flags   
)

Field Documentation

◆ cap_flags

uint8_t ThreadVars_::cap_flags

Flags to indicate the capabilities of all the TmModules resgitered under this thread

Definition at line 80 of file threadvars.h.

Referenced by TmSlotSetFuncAppend().

◆ cpu_affinity

uint16_t ThreadVars_::cpu_affinity

Definition at line 73 of file threadvars.h.

Referenced by TmThreadSetCPU(), TmThreadSetCPUAffinity(), and TmThreadSetupOptions().

◆ ctrl_cond

SCCtrlCondT* ThreadVars_::ctrl_cond

Definition at line 130 of file threadvars.h.

Referenced by TmThreadInitMC(), and TmThreadWakeupDetectLoaderThreads().

◆ ctrl_mutex

SCCtrlMutex* ThreadVars_::ctrl_mutex

Definition at line 129 of file threadvars.h.

Referenced by TmThreadInitMC().

◆ decode_pq

PacketQueueNoLock ThreadVars_::decode_pq

queue for decoders to temporarily store extra packets they generate.

Definition at line 109 of file threadvars.h.

Referenced by DecodeGRE(), and TmThreadDumpThreads().

◆ id

◆ inq

Tmq* ThreadVars_::inq

incoming queue and handler

Definition at line 89 of file threadvars.h.

Referenced by TmqhInputFlow(), TmqhInputSimple(), TmqhInputSimpleShutdownHandler(), TmThreadCreate(), and TmThreadDumpThreads().

◆ inq_id

uint8_t ThreadVars_::inq_id

Definition at line 82 of file threadvars.h.

Referenced by TmThreadCreate().

◆ name

◆ next

◆ outctx

void* ThreadVars_::outctx

Definition at line 104 of file threadvars.h.

Referenced by TmqhOutputFlowHash(), TmqhOutputFlowIPPair(), and TmThreadCreate().

◆ outq

Tmq* ThreadVars_::outq

outgoing queue and handler

Definition at line 103 of file threadvars.h.

Referenced by TmqhOutputSimple(), and TmThreadCreate().

◆ outq_id

uint8_t ThreadVars_::outq_id

Definition at line 83 of file threadvars.h.

Referenced by TmThreadCreate().

◆ perf_private_ctx

StatsPrivateThreadContext ThreadVars_::perf_private_ctx

private counter store: counter updates modify this

Definition at line 119 of file threadvars.h.

Referenced by StatsAddUI64(), StatsGetLocalCounterValue(), StatsIncr(), and StatsSetUI64().

◆ perf_public_ctx

StatsPublicThreadContext ThreadVars_::perf_public_ctx

public counter store: counter syncs update this

Definition at line 125 of file threadvars.h.

Referenced by TmThreadCreate().

◆ printable_name

char* ThreadVars_::printable_name

Definition at line 65 of file threadvars.h.

Referenced by RunModeSetLiveCaptureAutoFp().

◆ stream_pq

struct PacketQueue_* ThreadVars_::stream_pq

Stream packet queue for flow time out injection. Either a pointer to the workers input queue or to stream_pq_local

Definition at line 113 of file threadvars.h.

Referenced by TmThreadDumpThreads().

◆ stream_pq_local

struct PacketQueue_* ThreadVars_::stream_pq_local

Definition at line 114 of file threadvars.h.

Referenced by TmThreadDumpThreads().

◆ t

◆ thread_group_name

char* ThreadVars_::thread_group_name

Definition at line 66 of file threadvars.h.

Referenced by TmThreadSetGroupName().

◆ thread_priority

int ThreadVars_::thread_priority

cpu or core number to set affinity to

Definition at line 74 of file threadvars.h.

Referenced by TmThreadSetPrio(), and TmThreadSetThreadPriority().

◆ thread_setup_flags

uint8_t ThreadVars_::thread_setup_flags

◆ tm_flowworker

struct TmSlot_* ThreadVars_::tm_flowworker

pointer to the flowworker in the pipeline. Used as starting point for injected packets. Can be NULL if the flowworker is not part of this thread.

Definition at line 100 of file threadvars.h.

◆ tm_func

void*(* ThreadVars_::tm_func) (void *)

function pointer to the function that runs the packet pipeline for this thread. It is passed directly to pthread_create(), hence the void pointers in and out.

Definition at line 62 of file threadvars.h.

Referenced by TmThreadSpawn().

◆ tm_slots

struct TmSlot_* ThreadVars_::tm_slots

list of of TmSlot objects together forming the packet pipeline.

Definition at line 95 of file threadvars.h.

Referenced by TmSlotGetSlotForTM(), TmSlotSetFuncAppend(), TmThreadDisableReceiveThreads(), TmThreadGetFirstTmSlotForPartialPattern(), and TmThreadsGetTVContainingSlot().

◆ tmm_flags

uint8_t ThreadVars_::tmm_flags

priority (real time) for this thread. Look at threads.h TmModule::flags for each module part of this thread

Definition at line 78 of file threadvars.h.

Referenced by TmSlotSetFuncAppend(), TmThreadCountThreadsByTmmFlags(), and TmThreadDumpThreads().

◆ tmqh_in

struct Packet_*(* ThreadVars_::tmqh_in) (struct ThreadVars_ *)

Definition at line 90 of file threadvars.h.

Referenced by TmThreadCreate().

◆ tmqh_out

void(* ThreadVars_::tmqh_out) (struct ThreadVars_ *, struct Packet_ *)

Definition at line 105 of file threadvars.h.

Referenced by TmThreadCreate().

◆ type

uint8_t ThreadVars_::type

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