suricata
|
Per thread variable structure. More...
#include <threadvars.h>
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 |
Tmq * | inq |
struct Packet_ *(* | tmqh_in )(struct ThreadVars_ *) |
struct TmSlot_ * | tm_slots |
struct TmSlot_ * | tm_flowworker |
Tmq * | outq |
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 |
SCCtrlMutex * | ctrl_mutex |
SCCtrlCondT * | ctrl_cond |
struct FlowQueue_ * | flow_queue |
bool | break_loop |
Storage | storage [] |
Per thread variable structure.
Definition at line 58 of file threadvars.h.
ThreadVars_::SC_ATOMIC_DECLARE | ( | uint32_t | , |
flags | |||
) |
bool ThreadVars_::break_loop |
Definition at line 136 of file threadvars.h.
Referenced by TmSlotSetFuncAppend().
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().
uint16_t ThreadVars_::cpu_affinity |
Definition at line 74 of file threadvars.h.
Referenced by TmThreadSetCPU(), TmThreadSetCPUAffinity(), and TmThreadSetupOptions().
SCCtrlCondT* ThreadVars_::ctrl_cond |
Definition at line 133 of file threadvars.h.
Referenced by TmThreadInitMC().
SCCtrlMutex* ThreadVars_::ctrl_mutex |
Definition at line 132 of file threadvars.h.
Referenced by TmThreadInitMC().
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.
struct FlowQueue_* ThreadVars_::flow_queue |
Definition at line 135 of file threadvars.h.
int ThreadVars_::id |
local id
Definition at line 87 of file threadvars.h.
Referenced by CreateEveThreadCtx(), JsonLogThreadInit(), TmThreadCreateCmdThreadByName(), TmThreadCreateMgmtThread(), TmThreadCreateMgmtThreadByName(), and TmThreadCreatePacketHandler().
Tmq* ThreadVars_::inq |
incoming queue and handler
Definition at line 90 of file threadvars.h.
Referenced by TmqhInputFlow(), TmqhInputSimple(), TmqhInputSimpleShutdownHandler(), and TmThreadCreate().
uint8_t ThreadVars_::inq_id |
Definition at line 83 of file threadvars.h.
Referenced by TmThreadCreate().
char ThreadVars_::name[16] |
Definition at line 65 of file threadvars.h.
Referenced by FlowDisableFlowManagerThread(), NoAFXDPSupportExit(), NoDPDKSupportExit(), NoNFLOGSupportExit(), NoWinDivertSupportExit(), TmThreadCheckThreadState(), TmThreadContinueDetectLoaderThreads(), TmThreadCreate(), TmThreadDisableReceiveThreads(), TmThreadSetPrio(), TmThreadSetupOptions(), and TmThreadWaitOnThreadInit().
struct ThreadVars_* ThreadVars_::next |
pointer to the next thread
Definition at line 125 of file threadvars.h.
Referenced by FlowDisableFlowManagerThread(), TmThreadAppend(), TmThreadCheckThreadState(), TmThreadClearThreadsFamily(), TmThreadContinueDetectLoaderThreads(), TmThreadContinueThreads(), TmThreadCountThreadsByTmmFlags(), and TmThreadWaitOnThreadInit().
void* ThreadVars_::outctx |
Definition at line 105 of file threadvars.h.
Referenced by TmqhOutputFlowHash(), TmqhOutputFlowIPPair(), and TmThreadCreate().
Tmq* ThreadVars_::outq |
outgoing queue and handler
Definition at line 104 of file threadvars.h.
Referenced by TmqhOutputSimple(), and TmThreadCreate().
uint8_t ThreadVars_::outq_id |
Definition at line 84 of file threadvars.h.
Referenced by TmThreadCreate().
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().
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().
char* ThreadVars_::printable_name |
Definition at line 66 of file threadvars.h.
Referenced by RunModeSetLiveCaptureAutoFp().
Storage ThreadVars_::storage[] |
Definition at line 138 of file threadvars.h.
Referenced by ThreadAllocStorageById(), ThreadFreeStorage(), ThreadFreeStorageById(), ThreadGetStorageById(), and ThreadSetStorageById().
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.
struct PacketQueue_* ThreadVars_::stream_pq_local |
Definition at line 117 of file threadvars.h.
pthread_t ThreadVars_::t |
Definition at line 59 of file threadvars.h.
Referenced by TmThreadSpawn().
char* ThreadVars_::thread_group_name |
Definition at line 67 of file threadvars.h.
Referenced by TmThreadSetGroupName().
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().
uint8_t ThreadVars_::thread_setup_flags |
Definition at line 69 of file threadvars.h.
Referenced by TmThreadSetCPU(), TmThreadSetCPUAffinity(), TmThreadSetThreadPriority(), and TmThreadSetupOptions().
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.
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().
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().
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().
struct Packet_*(* ThreadVars_::tmqh_in) (struct ThreadVars_ *) |
Definition at line 90 of file threadvars.h.
Referenced by TmThreadCreate().
void(* ThreadVars_::tmqh_out) (struct ThreadVars_ *, struct Packet_ *) |
Definition at line 106 of file threadvars.h.
Referenced by TmThreadCreate().
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().