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-time.h"
38 #include "util-cpu.h"
39 #include "util-affinity.h"
40 #include "util-runmodes.h"
41 #include "source-ipfw.h"
42 #include "util-device.h"
43 
44 static const char *default_mode;
45 
47 {
48  return default_mode;
49 }
50 
52 {
53  default_mode = "autofp";
54 
56  "Multi threaded IPFW IPS mode with respect to flow",
58 
60  "Multi queue IPFW IPS mode with one thread per queue",
62 
63  return;
64 }
65 
67 {
68  SCEnter();
69  int ret = 0;
70 #ifdef IPFW
71 
73 
75 
77 
79  "ReceiveIPFW",
80  "VerdictIPFW",
81  "DecodeIPFW");
82 #endif /* IPFW */
83  return ret;
84 }
85 
87 {
88  SCEnter();
89  int ret = 0;
90 #ifdef IPFW
91 
93 
95 
97 
99  "ReceiveIPFW",
100  "VerdictIPFW",
101  "DecodeIPFW");
102 #endif /* IPFW */
103  return ret;
104 }
void RunModeIpsIPFWRegister(void)
Definition: runmode-ipfw.c:51
void RunModeInitialize(void)
Definition: runmodes.c:925
void RunModeRegisterNewRunMode(int runmode, const char *name, const char *description, int(*RunModeFunc)(void))
Registers a new runmode.
Definition: runmodes.c:421
int RunModeSetIPSAutoFp(ConfigIPSParserFunc ConfigParser, const char *recv_mod_name, const char *verdict_mod_name, const char *decode_mod_name)
void * IPFWGetThread(int number)
Get a pointer to the IPFW thread at index.
Definition: source-ipfw.c:778
void TimeModeSetLive(void)
Definition: util-time.c:82
int RunModeSetIPSWorker(ConfigIPSParserFunc ConfigParser, const char *recv_mod_name, const char *verdict_mod_name, const char *decode_mod_name)
int RunModeIpsIPFWAutoFp(void)
Definition: runmode-ipfw.c:66
#define SCEnter(...)
Definition: util-debug.h:337
const char * RunModeIpsIPFWGetDefaultMode(void)
Definition: runmode-ipfw.c:46
int RunModeIpsIPFWWorker(void)
Definition: runmode-ipfw.c:86
void LiveDeviceHasNoStats()
Definition: util-device.c:312