suricata
runmode-lib.h File Reference
#include "threadvars.h"
Include dependency graph for runmode-lib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ThreadVarsSCRunModeLibCreateThreadVars (int worker_id)
 Create ThreadVars for use by a user provided thread. More...
 
int SCRunModeLibSpawnWorker (void *)
 start the "fake" worker. More...
 

Detailed Description

Author
Angelo Mirabella angel.nosp@m.o.mi.nosp@m.rabel.nosp@m.la@b.nosp@m.roadc.nosp@m.om.c.nosp@m.om

Library runmode.

Definition in file runmode-lib.h.

Function Documentation

◆ SCRunModeLibCreateThreadVars()

ThreadVars* SCRunModeLibCreateThreadVars ( int  worker_id)

Create ThreadVars for use by a user provided thread.

Unlike other runmodes, this does not spawn a thread, as the threads are controlled by the application using Suricata as a library.

Parameters
worker_idan ID to give this ThreadVars instance
Returns
Pointer to allocated ThreadVars or NULL on failure

Definition at line 29 of file runmode-lib.c.

◆ SCRunModeLibSpawnWorker()

int SCRunModeLibSpawnWorker ( void *  td)

start the "fake" worker.

This method performs all the initialization tasks.

Definition at line 65 of file runmode-lib.c.

References SCLogError, THV_RUNNING, TM_ECODE_OK, TmThreadLibSpawn(), TmThreadsSetFlag(), and tv.

Here is the call graph for this function: