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  "Multi-threaded WinDivert IPS mode load-balanced by flow", RunModeIpsWinDivertAutoFp,
49  NULL);
50 }
51 
53 {
54  SCEnter();
55  int ret = 0;
56 #ifdef WINDIVERT
58 
60 
61  ret = RunModeSetIPSAutoFp(WinDivertGetThread, "ReceiveWinDivert",
62  "VerdictWinDivert", "DecodeWinDivert");
63 #endif /* WINDIVERT */
64  return ret;
65 }
tm-threads.h
RunModeSetIPSAutoFp
int RunModeSetIPSAutoFp(ConfigIPSParserFunc ConfigParser, const char *recv_mod_name, const char *verdict_mod_name, const char *decode_mod_name)
Definition: util-runmodes.c:385
RunModeIpsWinDivertAutoFp
int RunModeIpsWinDivertAutoFp(void)
Definition: runmode-windivert.c:52
runmode-windivert.h
util-runmodes.h
RunModeRegisterNewRunMode
void RunModeRegisterNewRunMode(enum RunModes runmode, const char *name, const char *description, int(*RunModeFunc)(void), void(*RunModeIsIPSEnabled)(void))
Registers a new runmode.
Definition: runmodes.c:491
LiveDeviceHasNoStats
void LiveDeviceHasNoStats(void)
Definition: util-device.c:309
util-device.h
util-debug.h
util-cpu.h
SCEnter
#define SCEnter(...)
Definition: util-debug.h:271
util-affinity.h
util-time.h
conf.h
runmodes.h
RunModeIpsWinDivertRegister
void RunModeIpsWinDivertRegister(void)
Definition: runmode-windivert.c:45
TimeModeSetLive
void TimeModeSetLive(void)
Definition: util-time.c:99
suricata-common.h
RUNMODE_WINDIVERT
@ RUNMODE_WINDIVERT
Definition: runmodes.h:44
RunModeIpsWinDivertGetDefaultMode
const char * RunModeIpsWinDivertGetDefaultMode(void)
Definition: runmode-windivert.c:40
output.h