suricata
runmode-lib.h
Go to the documentation of this file.
1
/* Copyright (C) 2023-2024 Open Information Security Foundation
2
*
3
* You can copy, redistribute or modify this Program under the terms of
4
* the GNU General Public License version 2 as published by the Free
5
* Software Foundation.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* version 2 along with this program; if not, write to the Free Software
14
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15
* 02110-1301, USA.
16
*/
17
18
/** \file
19
*
20
* \author Angelo Mirabella <angelo.mirabella@broadcom.com>
21
*
22
* Library runmode.
23
*/
24
25
#ifndef SURICATA_RUNMODE_LIB_H
26
#define SURICATA_RUNMODE_LIB_H
27
28
#include "
threadvars.h
"
29
30
/**
31
* \brief Create ThreadVars for use by a user provided thread.
32
*
33
* Unlike other runmodes, this does not spawn a thread, as the threads
34
* are controlled by the application using Suricata as a library.
35
*
36
* \param worker_id an ID to give this ThreadVars instance
37
*
38
* \return Pointer to allocated ThreadVars or NULL on failure
39
*/
40
ThreadVars
*
SCRunModeLibCreateThreadVars
(
int
worker_id);
41
42
/** \brief start the "fake" worker.
43
*
44
* This method performs all the initialization tasks.
45
*/
46
int
SCRunModeLibSpawnWorker
(
void
*);
47
48
#endif
/* SURICATA_RUNMODE_LIB_H */
ThreadVars_
Per thread variable structure.
Definition:
threadvars.h:58
threadvars.h
SCRunModeLibCreateThreadVars
ThreadVars * SCRunModeLibCreateThreadVars(int worker_id)
Create ThreadVars for use by a user provided thread.
Definition:
runmode-lib.c:29
SCRunModeLibSpawnWorker
int SCRunModeLibSpawnWorker(void *)
start the "fake" worker.
Definition:
runmode-lib.c:65
src
runmode-lib.h
Generated on Tue Mar 17 2026 23:30:31 for suricata by
1.8.18