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
40
const
char
*
RunModeIpsWinDivertGetDefaultMode
(
void
)
41
{
42
return
"autofp"
;
43
}
44
45
void
RunModeIpsWinDivertRegister
(
void
)
46
{
47
RunModeRegisterNewRunMode
(
48
RUNMODE_WINDIVERT
,
"autofp"
,
49
"Multi-threaded WinDivert IPS mode load-balanced by flow"
,
50
RunModeIpsWinDivertAutoFp
);
51
}
52
53
int
RunModeIpsWinDivertAutoFp
(
void
)
54
{
55
SCEnter
();
56
int
ret = 0;
57
#ifdef WINDIVERT
58
RunModeInitialize
();
59
60
TimeModeSetLive
();
61
62
LiveDeviceHasNoStats
();
63
64
ret =
RunModeSetIPSAutoFp
(WinDivertGetThread,
"ReceiveWinDivert"
,
65
"VerdictWinDivert"
,
"DecodeWinDivert"
);
66
#endif
/* WINDIVERT */
67
return
ret;
68
}
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:400
RunModeIpsWinDivertAutoFp
int RunModeIpsWinDivertAutoFp(void)
Definition:
runmode-windivert.c:53
LiveDeviceHasNoStats
void LiveDeviceHasNoStats()
Definition:
util-device.c:343
RunModeInitialize
void RunModeInitialize(void)
Definition:
runmodes.c:932
runmode-windivert.h
util-runmodes.h
util-device.h
util-debug.h
util-cpu.h
SCEnter
#define SCEnter(...)
Definition:
util-debug.h:300
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:97
suricata-common.h
RunModeRegisterNewRunMode
void RunModeRegisterNewRunMode(enum RunModes runmode, const char *name, const char *description, int(*RunModeFunc)(void))
Registers a new runmode.
Definition:
runmodes.c:446
RUNMODE_WINDIVERT
@ RUNMODE_WINDIVERT
Definition:
runmodes.h:43
RunModeIpsWinDivertGetDefaultMode
const char * RunModeIpsWinDivertGetDefaultMode(void)
Definition:
runmode-windivert.c:40
output.h
src
runmode-windivert.c
Generated on Sat May 28 2022 23:30:39 for suricata by
1.8.18