return "live";
}
-/** \brief create a "fake" worker thread in charge of processing the packets.
- *
- * This method just creates a context representing the worker, which is handled from the library
- * client. No actual thread (pthread_t) is created.
- *
- * \return Pointer to ThreadVars structure representing the worker thread */
-void *RunModeCreateWorker(void)
+ThreadVars *SCRunModeLibCreateThreadVars(void)
{
char tname[TM_THREAD_NAME_MAX];
TmModule *tm_module = NULL;
#ifndef SURICATA_RUNMODE_LIB_H
#define SURICATA_RUNMODE_LIB_H
+#include "threadvars.h"
+
/** \brief register runmodes for suricata as a library */
void RunModeIdsLibRegister(void);
/** \brief runmode default mode (live) */
const char *RunModeLibGetDefaultMode(void);
-/** \brief create a "fake" worker thread in charge of processing the packets.
+/**
+ * \brief Create ThreadVars for use by a user provided thread.
*
- * This method just creates a context representing the worker, which is handled from the library
- * client. No actual thread (pthread_t) is created.
+ * Unlike other runmodes, this does not spawn a thread, as the threads
+ * are controlled by the application using Suricata as a library.
*
- * \return Pointer to ThreadVars structure representing the worker thread */
-void *RunModeCreateWorker(void);
+ * \return Pointer to allocated ThreadVars or NULL on failure
+ */
+ThreadVars *SCRunModeLibCreateThreadVars(void);
/** \brief start the "fake" worker.
*