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-private.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}
int RunModeIpsWinDivertAutoFp(void)
const char * RunModeIpsWinDivertGetDefaultMode(void)
void RunModeIpsWinDivertRegister(void)
void RunModeRegisterNewRunMode(enum SCRunModes runmode, const char *name, const char *description, int(*RunModeFunc)(void), int(*RunModeIsIPSEnabled)(void))
Registers a new runmode.
Definition runmodes.c:486
@ RUNMODE_WINDIVERT
Definition runmodes.h:43
#define SCEnter(...)
Definition util-debug.h:277
void LiveDeviceHasNoStats(void)
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:99