suricata
runmode-ipfw.c
Go to the documentation of this file.
1 /* Copyright (C) 2007-2011 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 Anoop Saldanha <anoopsaldanha@gmail.com>
22  * \author Eric Leblond <eric@regit.org>
23  *
24  * Handling of ipfw runmodes.
25  */
26 
27 
28 
29 #include "suricata-common.h"
30 #include "tm-threads.h"
31 #include "conf.h"
32 #include "runmodes.h"
33 #include "runmode-ipfw.h"
34 #include "output.h"
35 
36 #include "util-debug.h"
37 #include "util-cpu.h"
38 #include "util-affinity.h"
39 #include "util-runmodes.h"
40 #include "source-ipfw.h"
41 #include "util-device-private.h"
42 
44 {
45  return "autofp";
46 }
47 
49 {
51  "Multi threaded IPFW IPS mode with respect to flow", RunModeIpsIPFWAutoFp, NULL);
52 
54  "Multi queue IPFW IPS mode with one thread per queue", RunModeIpsIPFWWorker, NULL);
55 }
56 
58 {
59  SCEnter();
60  int ret = 0;
61 #ifdef IPFW
62 
64 
66 
68  "ReceiveIPFW",
69  "VerdictIPFW",
70  "DecodeIPFW");
71 #endif /* IPFW */
72  return ret;
73 }
74 
76 {
77  SCEnter();
78  int ret = 0;
79 #ifdef IPFW
80 
82 
84 
86  "ReceiveIPFW",
87  "VerdictIPFW",
88  "DecodeIPFW");
89 #endif /* IPFW */
90  return ret;
91 }
RunModeIpsIPFWGetDefaultMode
const char * RunModeIpsIPFWGetDefaultMode(void)
Definition: runmode-ipfw.c:43
util-device-private.h
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:382
RunModeSetIPSWorker
int RunModeSetIPSWorker(ConfigIPSParserFunc ConfigParser, const char *recv_mod_name, const char *verdict_mod_name, const char *decode_mod_name)
Definition: util-runmodes.c:501
util-runmodes.h
LiveDeviceHasNoStats
void LiveDeviceHasNoStats(void)
Definition: util-device.c:330
RunModeIpsIPFWWorker
int RunModeIpsIPFWWorker(void)
Definition: runmode-ipfw.c:75
util-debug.h
util-cpu.h
SCEnter
#define SCEnter(...)
Definition: util-debug.h:284
util-affinity.h
RunModeIpsIPFWRegister
void RunModeIpsIPFWRegister(void)
Definition: runmode-ipfw.c:48
conf.h
RunModeRegisterNewRunMode
void RunModeRegisterNewRunMode(enum SCRunModes runmode, const char *name, const char *description, int(*RunModeFunc)(void), int(*RunModeIsIPSEnabled)(void))
Registers a new runmode.
Definition: runmodes.c:481
source-ipfw.h
runmodes.h
TimeModeSetLive
void TimeModeSetLive(void)
Definition: util-time.c:99
suricata-common.h
IPFWGetThread
void * IPFWGetThread(int number)
Get a pointer to the IPFW thread at index.
Definition: source-ipfw.c:764
RunModeIpsIPFWAutoFp
int RunModeIpsIPFWAutoFp(void)
Definition: runmode-ipfw.c:57
runmode-ipfw.h
output.h
RUNMODE_IPFW
@ RUNMODE_IPFW
Definition: runmodes.h:33