suricata
tm-modules.c File Reference
#include "suricata-common.h"
#include "packet-queue.h"
#include "tm-threads.h"
#include "util-debug.h"
#include "threads.h"
#include "util-logopenfile.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...
 
int TmModuleGetIdByName (const char *name)
 get the id of a module from it's 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...
 

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

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

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

Referenced by TmModuleTmmIdToString().

Function Documentation

void TmModuleDebugList ( void  )

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

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

Referenced by RegisterAllModules().

Here is the caller graph for this function:

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 88 of file tm-modules.c.

References ThreadVars_::id, SC_ERR_TM_MODULES_ERROR, SCLogError, tmm_modules, and TMM_SIZE.

Referenced by DetectEngineInspectBufferGeneric(), TmThreadDisableReceiveThreads(), and TmThreadGetFirstTmSlotForPartialPattern().

Here is the caller graph for this function:

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 51 of file tm-modules.c.

References TmModule_::name, ThreadVars_::t, tmm_modules, and TMM_SIZE.

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

Here is the caller graph for this function:

int TmModuleGetIdByName ( const char *  name)

get the id of a module from it's name

Parameters
nameregistered name of the module
Return values
idthe id or -1 in case of error

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

References TmModuleGetByName(), and TmModuleGetIDForTM().

Here is the call graph for this function:

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 107 of file tm-modules.c.

References TmModule_::name, ThreadVars_::t, tmm_modules, and TMM_SIZE.

Referenced by TmModuleGetIdByName(), and TmSlotSetFuncAppend().

Here is the caller graph for this function:

void TmModuleRegisterTests ( void  )

register all unittests for the tm modules

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

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

void TmModuleRunDeInit ( void  )

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

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

Referenced by GlobalsInitPreConfig().

Here is the caller graph for this function:

void TmModuleRunInit ( void  )

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

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

Referenced by PostRunDeinit().

Here is the caller graph for this function: