suricata
tm-modules.c File Reference
#include "tm-modules.h"
#include "util-debug.h"
Include dependency graph for tm-modules.c:

Go to the source code of this file.

Macros

#define CASE_CODE(E)   case E: return #E
 

Functions

void TmModuleDebugList (void)
 
TmModuleTmModuleGetByName (const char *name)
 get a tm module ptr by name More...
 
TmModuleTmModuleGetById (int id)
 Returns a TM Module by its id. More...
 
int TmModuleGetIDForTM (TmModule *tm)
 Given a TM Module, returns its id. More...
 
void TmModuleRunInit (void)
 
void TmModuleRunDeInit (void)
 
void TmModuleRegisterTests (void)
 register all unittests for the tm modules More...
 
const char * TmModuleTmmIdToString (TmmId id)
 Maps the TmmId, to its string equivalent. More...
 

Variables

TmModule tmm_modules [TMM_SIZE]
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Thread Module functions

Definition in file tm-modules.c.

Macro Definition Documentation

◆ CASE_CODE

#define CASE_CODE (   E)    case E: return #E

Definition at line 162 of file tm-modules.c.

Function Documentation

◆ TmModuleDebugList()

void TmModuleDebugList ( void  )

Definition at line 31 of file tm-modules.c.

References TmModule_::Func, TmModule_::name, SCLogDebug, tmm_modules, and TMM_SIZE.

Referenced by RegisterAllModules().

Here is the caller graph for this function:

◆ TmModuleGetById()

TmModule* TmModuleGetById ( int  id)

Returns a TM Module by its id.

Parameters
idId of the TM Module to return.
Return values
Pointerof the module to be returned if available; NULL if unavailable.

Definition at line 69 of file tm-modules.c.

References SCLogError, tmm_modules, and TMM_SIZE.

Referenced by TmThreadDisableReceiveThreads().

Here is the caller graph for this function:

◆ TmModuleGetByName()

TmModule* TmModuleGetByName ( const char *  name)

get a tm module ptr by name

Parameters
namename string
Return values
ptrto the module or NULL

Definition at line 46 of file tm-modules.c.

References TmModule_::name, tmm_modules, and TMM_SIZE.

Referenced by RunModeErfFileAutoFp(), RunModeErfFileSingle(), RunModeFilePcapAutoFp(), RunModeFilePcapSingle(), RunModeSetIPSAutoFp(), RunModeSetIPSWorker(), RunModeSetLiveCaptureAutoFp(), TmThreadCreateCmdThreadByName(), and TmThreadCreateMgmtThreadByName().

Here is the caller graph for this function:

◆ TmModuleGetIDForTM()

int TmModuleGetIDForTM ( TmModule tm)

Given a TM Module, returns its id.

Parameters
tmPointer to the TM Module.
Return values
idof the TM Module if available; -1 if unavailable.

Definition at line 88 of file tm-modules.c.

References TmModule_::name, tmm_modules, and TMM_SIZE.

Referenced by TmSlotSetFuncAppend().

Here is the caller graph for this function:

◆ TmModuleRegisterTests()

void TmModuleRegisterTests ( void  )

register all unittests for the tm modules

Definition at line 135 of file tm-modules.c.

References coverage_unittests, g_ut_covered, g_ut_modules, TmModule_::name, TmModule_::RegisterTests, SCLogWarning, tmm_modules, and TMM_SIZE.

◆ TmModuleRunDeInit()

void TmModuleRunDeInit ( void  )

Definition at line 119 of file tm-modules.c.

References TmModule_::DeInit, TmModule_::name, tmm_modules, and TMM_SIZE.

Referenced by GlobalsDestroy().

Here is the caller graph for this function:

◆ TmModuleRunInit()

void TmModuleRunInit ( void  )

Definition at line 104 of file tm-modules.c.

References TmModule_::Init, TmModule_::name, tmm_modules, and TMM_SIZE.

◆ TmModuleTmmIdToString()

Variable Documentation

◆ tmm_modules