suricata
runmode-windivert.c
Go to the documentation of this file.
1 /* Copyright (C) 2018 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 /**
19  * \file
20  *
21  * \author Jacob Masen-Smith <jacob@evengx.com>
22  *
23  * Handling of WinDivert runmodes.
24  */
25 
26 #include "suricata-common.h"
27 #include "tm-threads.h"
28 #include "conf.h"
29 #include "runmodes.h"
30 #include "runmode-windivert.h"
31 #include "output.h"
32 
33 #include "util-affinity.h"
34 #include "util-cpu.h"
35 #include "util-debug.h"
36 #include "util-device.h"
37 #include "util-runmodes.h"
38 #include "util-time.h"
39 
41 {
42  return "autofp";
43 }
44 
46 {
48  RUNMODE_WINDIVERT, "autofp",
49  "Multi-threaded WinDivert IPS mode load-balanced by flow",
51 }
52 
54 {
55  SCEnter();
56  int ret = 0;
57 #ifdef WINDIVERT
59 
61 
63 
64  ret = RunModeSetIPSAutoFp(WinDivertGetThread, "ReceiveWinDivert",
65  "VerdictWinDivert", "DecodeWinDivert");
66 #endif /* WINDIVERT */
67  return ret;
68 }
void RunModeInitialize(void)
Definition: runmodes.c:908
int RunModeSetIPSAutoFp(ConfigIPSParserFunc ConfigParser, const char *recv_mod_name, const char *verdict_mod_name, const char *decode_mod_name)
void TimeModeSetLive(void)
Definition: util-time.c:90
const char * RunModeIpsWinDivertGetDefaultMode(void)
void RunModeIpsWinDivertRegister(void)
#define SCEnter(...)
Definition: util-debug.h:337
int RunModeIpsWinDivertAutoFp(void)
void RunModeRegisterNewRunMode(enum RunModes runmode, const char *name, const char *description, int(*RunModeFunc)(void))
Registers a new runmode.
Definition: runmodes.c:419
void LiveDeviceHasNoStats()
Definition: util-device.c:300