Coverage Report

Created: 2026-06-07 07:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/suricata7/src/util-running-modes.c
Line
Count
Source
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 "app-layer-detect-proto.h"
25
#include "app-layer.h"
26
#include "app-layer-parser.h"
27
#include "util-unittest.h"
28
#include "util-debug.h"
29
#include "conf-yaml-loader.h"
30
#include "util-running-modes.h"
31
32
int ListKeywords(const char *keyword_info)
33
0
{
34
0
    EngineModeSetIDS();
35
0
    SCLogLoadConfig(0, 0, 0, 0);
36
0
    MpmTableSetup();
37
0
    SpmTableSetup();
38
0
    AppLayerSetup();
39
0
    SigTableSetup(); /* load the rule keywords */
40
0
    return SigTableList(keyword_info);
41
0
}
42
43
int ListAppLayerProtocols(const char *conf_filename)
44
0
{
45
0
    EngineModeSetIDS();
46
0
    if (ConfYamlLoadFile(conf_filename) != -1)
47
0
        SCLogLoadConfig(0, 0, 0, 0);
48
0
    MpmTableSetup();
49
0
    SpmTableSetup();
50
0
    AppLayerSetup();
51
0
    AppLayerListSupportedProtocols();
52
53
0
    return TM_ECODE_DONE;
54
0
}
55