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
 
struct FlowQueue_flow_queue
 
bool break_loop
 
Storage storage []
 

Detailed Description

Per thread variable structure.

Definition at line 58 of file threadvars.h.

Member Function Documentation

◆ SC_ATOMIC_DECLARE()

ThreadVars_::SC_ATOMIC_DECLARE ( uint32_t  ,
flags   
)

Field Documentation

◆ break_loop

bool ThreadVars_::break_loop

Definition at line 136 of file threadvars.h.

Referenced by TmSlotSetFuncAppend().

◆ cap_flags

uint8_t ThreadVars_::cap_flags

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

Definition at line 81 of file threadvars.h.

Referenced by TmSlotSetFuncAppend().

◆ cpu_affinity

uint16_t ThreadVars_::cpu_affinity

Definition at line 74 of file threadvars.h.

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

◆ ctrl_cond

SCCtrlCondT* ThreadVars_::ctrl_cond

Definition at line 133 of file threadvars.h.

Referenced by TmThreadInitMC().

◆ ctrl_mutex

SCCtrlMutex* ThreadVars_::ctrl_mutex

Definition at line 132 of file threadvars.h.

Referenced by TmThreadInitMC().

◆ decode_pq

PacketQueueNoLock ThreadVars_::decode_pq

Queue for decoders to temporarily store extra packets they generate. These packets are generated as part of the tunnel handling, and are processed directly after the "real" packet from the current position in the pipeline.

Definition at line 112 of file threadvars.h.

◆ flow_queue

struct FlowQueue_* ThreadVars_::flow_queue

Definition at line 135 of file threadvars.h.

◆ id

◆ inq

Tmq* ThreadVars_::inq

incoming queue and handler

Definition at line 90 of file threadvars.h.

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

◆ inq_id

uint8_t ThreadVars_::inq_id

Definition at line 83 of file threadvars.h.

Referenced by TmThreadCreate().

◆ name

◆ next

◆ outctx

void* ThreadVars_::outctx

Definition at line 105 of file threadvars.h.

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

◆ outq

Tmq* ThreadVars_::outq

outgoing queue and handler

Definition at line 104 of file threadvars.h.

Referenced by TmqhOutputSimple(), and TmThreadCreate().

◆ outq_id

uint8_t ThreadVars_::outq_id

Definition at line 84 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 122 of file threadvars.h.

Referenced by StatsAddUI64(), StatsDecr(), StatsGetLocalCounterValue(), StatsIncr(), StatsSetUI64(), StatsSyncCounters(), and StatsSyncCountersIfSignalled().

◆ perf_public_ctx

StatsPublicThreadContext ThreadVars_::perf_public_ctx

public counter store: counter syncs update this

Definition at line 128 of file threadvars.h.

Referenced by StatsSyncCounters(), StatsSyncCountersIfSignalled(), and TmThreadCreate().

◆ printable_name

char* ThreadVars_::printable_name

Definition at line 66 of file threadvars.h.

Referenced by RunModeSetLiveCaptureAutoFp().

◆ storage

◆ 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 116 of file threadvars.h.

◆ stream_pq_local

struct PacketQueue_* ThreadVars_::stream_pq_local

Definition at line 117 of file threadvars.h.

◆ t

pthread_t ThreadVars_::t

Definition at line 59 of file threadvars.h.

Referenced by TmThreadSpawn().

◆ thread_group_name

char* ThreadVars_::thread_group_name

Definition at line 67 of file threadvars.h.

Referenced by TmThreadSetGroupName().

◆ thread_priority

int ThreadVars_::thread_priority

cpu or core number to set affinity to

Definition at line 75 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 101 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 63 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 96 of file threadvars.h.

Referenced by TmSlotSetFuncAppend(), and TmThreadDisableReceiveThreads().

◆ 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 79 of file threadvars.h.

Referenced by TmSlotSetFuncAppend(), and TmThreadCountThreadsByTmmFlags().

◆ 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 106 of file threadvars.h.

Referenced by TmThreadCreate().

◆ type

uint8_t ThreadVars_::type

the type of thread as defined in tm-threads.h (TVT_PPT, TVT_MGMT)

Definition at line 72 of file threadvars.h.

Referenced by TmThreadCreateCmdThreadByName(), TmThreadCreateMgmtThread(), TmThreadCreateMgmtThreadByName(), TmThreadCreatePacketHandler(), and TmThreadSpawn().


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