suricata
|
Go to the source code of this file.
Functions | |
void | SCRunModeLibIdsRegister (void) |
register runmodes for suricata as a library More... | |
int | SCRunModeLibIdsOffline (void) |
runmode for offline packet processing (pcap files) More... | |
int | SCRunModeLibIdsLive (void) |
runmode for live packet processing More... | |
const char * | SCRunModeLibGetDefaultMode (void) |
runmode default mode (live) More... | |
ThreadVars * | SCRunModeLibCreateThreadVars (int worker_id) |
Create ThreadVars for use by a user provided thread. More... | |
int | SCRunModeLibSpawnWorker (void *td) |
start the "fake" worker. More... | |
Library runmode.
Definition in file runmode-lib.c.
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.
worker_id | an ID to give this ThreadVars instance |
Definition at line 59 of file runmode-lib.c.
Referenced by main().
const char* SCRunModeLibGetDefaultMode | ( | void | ) |
runmode default mode (live)
Definition at line 54 of file runmode-lib.c.
int SCRunModeLibIdsLive | ( | void | ) |
runmode for live packet processing
Definition at line 47 of file runmode-lib.c.
References TimeModeSetLive().
Referenced by SCRunModeLibIdsRegister().
int SCRunModeLibIdsOffline | ( | void | ) |
runmode for offline packet processing (pcap files)
Definition at line 39 of file runmode-lib.c.
References TimeModeSetOffline().
Referenced by SCRunModeLibIdsRegister().
void SCRunModeLibIdsRegister | ( | void | ) |
register runmodes for suricata as a library
Definition at line 30 of file runmode-lib.c.
References RUNMODE_LIB, RunModeRegisterNewRunMode(), SCRunModeLibIdsLive(), and SCRunModeLibIdsOffline().
int SCRunModeLibSpawnWorker | ( | void * | td | ) |
start the "fake" worker.
This method performs all the initialization tasks.
Definition at line 95 of file runmode-lib.c.
References SCLogError, THV_RUNNING, TM_ECODE_OK, TmThreadLibSpawn(), TmThreadsSetFlag(), and tv.