|
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 |
| 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 |
| StatsThreadContext | stats |
| struct ThreadVars_ * | next |
| SCCtrlMutex * | ctrl_mutex |
| SCCtrlCondT * | ctrl_cond |
| struct FlowQueue_ * | flow_queue |
| bool | break_loop |
| char * | iface_name |
| Storage | storage [] |
Per thread variable structure.
Definition at line 57 of file threadvars.h.
| ThreadVars_::SC_ATOMIC_DECLARE | ( | uint32_t | , |
| flags | |||
| ) |
| bool ThreadVars_::break_loop |
Definition at line 131 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 79 of file threadvars.h.
Referenced by TmSlotSetFuncAppend().
| uint16_t ThreadVars_::cpu_affinity |
Definition at line 72 of file threadvars.h.
Referenced by TmThreadSetCPU(), TmThreadSetCPUAffinity(), and TmThreadSetupOptions().
| SCCtrlCondT* ThreadVars_::ctrl_cond |
Definition at line 128 of file threadvars.h.
Referenced by TmThreadInitMC().
| SCCtrlMutex* ThreadVars_::ctrl_mutex |
Definition at line 127 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 110 of file threadvars.h.
| struct FlowQueue_* ThreadVars_::flow_queue |
Definition at line 130 of file threadvars.h.
| int ThreadVars_::id |
local id
Definition at line 85 of file threadvars.h.
Referenced by CreateEveThreadCtx(), DetectPreFlow(), DetectPreStream(), FlowInit(), JsonLogThreadInit(), TmThreadCreateCmdThreadByName(), TmThreadCreateMgmtThread(), TmThreadCreateMgmtThreadByName(), and TmThreadCreatePacketHandler().
| char* ThreadVars_::iface_name |
Interface-specific thread affinity
Definition at line 134 of file threadvars.h.
Referenced by RunModeSetLiveCaptureAutoFp().
| Tmq* ThreadVars_::inq |
incoming queue and handler
Definition at line 88 of file threadvars.h.
Referenced by TmqhInputFlow(), TmqhInputSimple(), TmqhInputSimpleShutdownHandler(), and TmThreadCreate().
| uint8_t ThreadVars_::inq_id |
Definition at line 81 of file threadvars.h.
Referenced by TmThreadCreate().
| char ThreadVars_::name[16] |
Definition at line 64 of file threadvars.h.
Referenced by FlowDisableFlowManagerThread(), NoAFXDPSupportExit(), NoDPDKSupportExit(), NoNFLOGSupportExit(), NoWinDivertSupportExit(), TmThreadCheckThreadState(), TmThreadContinueDetectLoaderThreads(), TmThreadCreate(), TmThreadDisableReceiveThreads(), TmThreadSetPrio(), TmThreadSetupOptions(), TmThreadSpawn(), and TmThreadWaitOnThreadInit().
| struct ThreadVars_* ThreadVars_::next |
pointer to the next thread
Definition at line 123 of file threadvars.h.
Referenced by FlowDisableFlowManagerThread(), TmThreadAppend(), TmThreadCheckThreadState(), TmThreadClearThreadsFamily(), TmThreadContinueDetectLoaderThreads(), TmThreadContinueThreads(), TmThreadCountThreadsByTmmFlags(), and TmThreadWaitOnThreadInit().
| void* ThreadVars_::outctx |
Definition at line 103 of file threadvars.h.
Referenced by TmqhOutputFlowHash(), TmqhOutputFlowIPPair(), and TmThreadCreate().
| Tmq* ThreadVars_::outq |
outgoing queue and handler
Definition at line 102 of file threadvars.h.
Referenced by TmqhOutputSimple(), and TmThreadCreate().
| uint8_t ThreadVars_::outq_id |
Definition at line 82 of file threadvars.h.
Referenced by TmThreadCreate().
| char* ThreadVars_::printable_name |
Definition at line 65 of file threadvars.h.
Referenced by RunModeSetLiveCaptureAutoFp().
| StatsThreadContext ThreadVars_::stats |
private counter store: counter updates modify this
Definition at line 120 of file threadvars.h.
Referenced by AppLayerIncAllocErrorCounter(), AppLayerIncGapErrorCounter(), AppLayerIncInternalErrorCounter(), AppLayerIncParserErrorCounter(), AppLayerIncTxCounter(), CaptureStatsSetup(), DecodeARP(), DecodeCHDLC(), DecodeERSPAN(), DecodeERSPANTypeI(), DecodeESP(), DecodeETag(), DecodeEthernet(), DecodeGRE(), DecodeICMPV4(), DecodeIGMP(), DecodeIPV4(), DecodeIPV6(), DecodeMPLS(), DecodeNSH(), DecodeNull(), DecodePPP(), DecodePPPOEDiscovery(), DecodePPPOESession(), DecodeRaw(), DecodeRegisterPerfCounters(), DecodeSCTP(), DecodeSll(), DecodeSll2(), DecodeTCP(), DecodeUDP(), DecodeUpdatePacketCounters(), DecodeVLAN(), DecodeVNTag(), ExceptionPolicySetStatsCounters(), FlowEndCountersRegister(), PacketDecodeFinalize(), PacketUpdateEngineEventCounters(), ReceiveErfDagThreadExitStats(), ReceiveErfDagThreadInit(), SCTmThreadsSlotPacketLoopFinish(), StreamTcpGetSegment(), StreamTcpThreadInit(), TmqhInputFlow(), TmqhInputSimple(), TmThreadCreate(), UTHMatchPackets(), UTHMatchPacketsWithResults(), UTHPacketMatchSig(), and UTHPacketMatchSigMpm().
| Storage ThreadVars_::storage[] |
Definition at line 136 of file threadvars.h.
Referenced by SCThreadFreeStorage(), SCThreadFreeStorageById(), SCThreadGetStorageById(), and SCThreadSetStorageById().
| 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 114 of file threadvars.h.
Referenced by SCTmThreadsSlotPacketLoopFinish(), and TmThreadTimeoutLoop().
| struct PacketQueue_* ThreadVars_::stream_pq_local |
Definition at line 115 of file threadvars.h.
| pthread_t ThreadVars_::t |
Definition at line 58 of file threadvars.h.
Referenced by TmThreadSpawn().
| int ThreadVars_::thread_priority |
cpu or core number to set affinity to
Definition at line 73 of file threadvars.h.
Referenced by TmThreadSetPrio(), and TmThreadSetThreadPriority().
| uint8_t ThreadVars_::thread_setup_flags |
Definition at line 67 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 99 of file threadvars.h.
Referenced by TmThreadTimeoutLoop().
| 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 TmThreadLibSpawn(), and TmThreadSpawn().
| struct TmSlot_* ThreadVars_::tm_slots |
list of TmSlot objects together forming the packet pipeline.
Definition at line 94 of file threadvars.h.
Referenced by SCTmThreadsSlotPacketLoopFinish(), 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 77 of file threadvars.h.
Referenced by TmSlotSetFuncAppend(), and TmThreadCountThreadsByTmmFlags().
| struct Packet_*(* ThreadVars_::tmqh_in) (struct ThreadVars_ *) |
Definition at line 88 of file threadvars.h.
Referenced by TmThreadCreate().
| void(* ThreadVars_::tmqh_out) (struct ThreadVars_ *, struct Packet_ *) |
Definition at line 104 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 70 of file threadvars.h.
Referenced by TmThreadCreateCmdThreadByName(), TmThreadCreateMgmtThread(), TmThreadCreateMgmtThreadByName(), TmThreadCreatePacketHandler(), TmThreadSpawn(), and TmThreadsWaitForUnpause().