suricata
ThreadVars_ Struct Reference

Per thread variable structure. More...

#include <threadvars.h>

Collaboration diagram for ThreadVars_:

Public Member Functions

 SC_ATOMIC_DECLARE (unsigned int, flags)
 

Data Fields

pthread_t t
 
char name [16]
 
char * printable_name
 
char * thread_group_name
 
uint8_t tmm_flags
 
int id
 
Tmqinq
 
Tmqoutq
 
void * outctx
 
const char * outqh_name
 
struct Packet_ *(* tmqh_in )(struct ThreadVars_ *)
 
void(* InShutdownHandler )(struct ThreadVars_ *)
 
void(* tmqh_out )(struct ThreadVars_ *, struct Packet_ *)
 
void *(* tm_func )(void *)
 
struct TmSlot_tm_slots
 
struct PacketQueue_stream_pq
 
uint8_t thread_setup_flags
 
uint8_t type
 
uint16_t cpu_affinity
 
uint16_t rank
 
int thread_priority
 
StatsPublicThreadContext perf_public_ctx
 
StatsPrivateThreadContext perf_private_ctx
 
SCCtrlMutexctrl_mutex
 
SCCtrlCondTctrl_cond
 
uint8_t cap_flags
 
struct ThreadVars_next
 
struct ThreadVars_prev
 

Detailed Description

Per thread variable structure.

Definition at line 57 of file threadvars.h.

Member Function Documentation

ThreadVars_::SC_ATOMIC_DECLARE ( unsigned  int,
flags   
)

Field Documentation

uint8_t ThreadVars_::cap_flags

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

Definition at line 109 of file threadvars.h.

Referenced by StatsSetUI64(), and TmSlotSetFuncAppend().

uint16_t ThreadVars_::cpu_affinity

Definition at line 94 of file threadvars.h.

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

SCCtrlCondT* ThreadVars_::ctrl_cond
SCCtrlMutex* ThreadVars_::ctrl_mutex

Definition at line 106 of file threadvars.h.

Referenced by StatsSetUI64(), and TmThreadInitMC().

void(* ThreadVars_::InShutdownHandler) (struct ThreadVars_ *)

Definition at line 79 of file threadvars.h.

Referenced by TmThreadCreate(), and TmThreadRemove().

void* ThreadVars_::outctx
Tmq* ThreadVars_::outq

Definition at line 73 of file threadvars.h.

Referenced by TmqhOutputSimple(), and TmThreadCreate().

const char* ThreadVars_::outqh_name

Definition at line 75 of file threadvars.h.

Referenced by TmThreadCreate(), and TmThreadRemove().

StatsPrivateThreadContext ThreadVars_::perf_private_ctx

private counter store: counter updates modify this

Definition at line 104 of file threadvars.h.

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

StatsPublicThreadContext ThreadVars_::perf_public_ctx

priority (real time) for this thread. Look at threads.h public counter store: counter syncs update this

Definition at line 101 of file threadvars.h.

Referenced by StatsRegisterAvgCounter(), StatsRegisterCounter(), StatsRegisterMaxCounter(), StatsSetUI64(), StatsThreadCleanup(), and TmThreadCreate().

struct ThreadVars_* ThreadVars_::prev

Definition at line 112 of file threadvars.h.

Referenced by TmThreadAppend(), and TmThreadRemove().

uint16_t ThreadVars_::rank

cpu or core number to set affinity to

Definition at line 95 of file threadvars.h.

Referenced by RunModeTileMpipeRegister().

struct PacketQueue_* ThreadVars_::stream_pq

stream packet queue for flow time out injection

Definition at line 87 of file threadvars.h.

Referenced by TmThreadsInjectPacketsById(), and TmThreadsSlotVarRun().

char* ThreadVars_::thread_group_name
int ThreadVars_::thread_priority

Definition at line 96 of file threadvars.h.

Referenced by TmThreadSetPrio(), TmThreadSetThreadPriority(), and TmThreadSetupOptions().

uint8_t ThreadVars_::thread_setup_flags
void*(* ThreadVars_::tm_func) (void *)

slot functions

Definition at line 83 of file threadvars.h.

Referenced by RunModeFilePcapSingle(), TmThreadSpawn(), and TmThreadsSlotVarRun().

uint8_t ThreadVars_::tmm_flags

TmModule::flags for each module part of this thread

Definition at line 66 of file threadvars.h.

Referenced by TmSlotSetFuncAppend(), and TmThreadCountThreadsByTmmFlags().

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

queue handlers

Definition at line 78 of file threadvars.h.

Referenced by TmThreadCreate(), and TmThreadsSlotVarRun().

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

Definition at line 80 of file threadvars.h.

Referenced by TmThreadCreate(), and TmThreadsSlotVarRun().

uint8_t ThreadVars_::type

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

Definition at line 92 of file threadvars.h.

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


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