suricata
util-running-modes.c
Go to the documentation of this file.
1 /* Copyright (C) 2013 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 /** \file
19  *
20  * \author Eric Leblond <eric@regit.org>
21  */
22 
23 #include "suricata-common.h"
24 #include "config.h"
25 #include "app-layer-detect-proto.h"
26 #include "app-layer.h"
27 #include "app-layer-parser.h"
28 #include "util-unittest.h"
29 #include "util-debug.h"
30 #include "conf-yaml-loader.h"
31 #include "util-running-modes.h"
32 
33 int ListKeywords(const char *keyword_info)
34 {
36  SCLogLoadConfig(0, 0);
37  MpmTableSetup();
38  SpmTableSetup();
39  AppLayerSetup();
40  SigTableSetup(); /* load the rule keywords */
41  SigTableList(keyword_info);
42  exit(EXIT_SUCCESS);
43 }
44 
46 {
48  SCLogLoadConfig(0, 0);
49  MpmTableSetup();
50  SpmTableSetup();
51  AppLayerSetup();
53 
54  exit(EXIT_SUCCESS);
55 }
56 
void SpmTableSetup(void)
Definition: util-spm.c:115
void SigTableSetup(void)
void MpmTableSetup(void)
Definition: util-mpm.c:284
int ConfYamlLoadFile(const char *filename)
Load configuration from a YAML file.
int AppLayerSetup(void)
Setup the app layer.
Definition: app-layer.c:756
void AppLayerListSupportedProtocols(void)
Definition: app-layer.c:736
void SCLogLoadConfig(int daemon, int verbose)
Definition: util-debug.c:1296
int ListKeywords(const char *keyword_info)
int ListAppLayerProtocols()
#define DEFAULT_CONF_FILE
Definition: suricata.h:80
void SigTableList(const char *keyword)