suricata
util-exception-policy.h
Go to the documentation of this file.
1
/* Copyright (C) 2022-2024 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
22
#ifndef SURICATA_UTIL_EXCEPTION_POLICY_H
23
#define SURICATA_UTIL_EXCEPTION_POLICY_H
24
25
#include "
decode.h
"
26
#include "
util-exception-policy-types.h
"
27
28
const
char
*
ExceptionPolicyEnumToString
(
enum
ExceptionPolicy
policy,
bool
is_json);
29
void
SetMasterExceptionPolicy
(
void
);
30
void
ExceptionPolicyApply
(
31
Packet
*p,
enum
ExceptionPolicy
policy,
enum
PacketDropReason
drop_reason);
32
enum
ExceptionPolicy
ExceptionPolicyParse
(
const
char
*option,
const
bool
support_flow);
33
enum
ExceptionPolicy
ExceptionPolicyMidstreamParse
(
bool
midstream_enabled);
34
void
ExceptionPolicySetStatsCounters
(
ThreadVars
*
tv
,
ExceptionPolicyCounters
*counter,
35
ExceptionPolicyStatsSetts
*setting,
enum
ExceptionPolicy
conf_policy,
36
const
char
*default_str,
bool
(*isExceptionPolicyValid)(
enum
ExceptionPolicy
));
37
38
extern
enum
ExceptionPolicy
g_eps_master_switch
;
39
#ifdef DEBUG
40
extern
uint64_t g_eps_applayer_error_offset_ts;
41
extern
uint64_t g_eps_applayer_error_offset_tc;
42
extern
uint64_t g_eps_pcap_packet_loss;
43
extern
uint64_t g_eps_stream_ssn_memcap;
44
extern
uint64_t g_eps_stream_reassembly_memcap;
45
extern
uint64_t g_eps_flow_memcap;
46
extern
uint64_t g_eps_defrag_memcap;
47
extern
bool
g_eps_is_alert_queue_fail_mode;
48
#endif
49
50
int
ExceptionSimulationCommandLineParser
(
const
char
*name,
const
char
*arg);
51
52
#endif
ExceptionPolicyParse
enum ExceptionPolicy ExceptionPolicyParse(const char *option, const bool support_flow)
Definition:
util-exception-policy.c:232
SetMasterExceptionPolicy
void SetMasterExceptionPolicy(void)
Definition:
util-exception-policy.c:59
ExceptionPolicyStatsSetts_
Definition:
util-exception-policy-types.h:48
util-exception-policy-types.h
ExceptionPolicySetStatsCounters
void ExceptionPolicySetStatsCounters(ThreadVars *tv, ExceptionPolicyCounters *counter, ExceptionPolicyStatsSetts *setting, enum ExceptionPolicy conf_policy, const char *default_str, bool(*isExceptionPolicyValid)(enum ExceptionPolicy))
Definition:
util-exception-policy.c:298
PacketDropReason
PacketDropReason
Definition:
decode.h:359
decode.h
ExceptionPolicyCounters_
Definition:
util-exception-policy-types.h:43
ExceptionSimulationCommandLineParser
int ExceptionSimulationCommandLineParser(const char *name, const char *arg)
Definition:
util-exception-policy.c:316
ThreadVars_
Per thread variable structure.
Definition:
threadvars.h:58
Packet_
Definition:
decode.h:476
ExceptionPolicyEnumToString
const char * ExceptionPolicyEnumToString(enum ExceptionPolicy policy, bool is_json)
Definition:
util-exception-policy.c:35
ExceptionPolicyApply
void ExceptionPolicyApply(Packet *p, enum ExceptionPolicy policy, enum PacketDropReason drop_reason)
Definition:
util-exception-policy.c:69
tv
ThreadVars * tv
Definition:
fuzz_decodepcapfile.c:32
ExceptionPolicyMidstreamParse
enum ExceptionPolicy ExceptionPolicyMidstreamParse(bool midstream_enabled)
Definition:
util-exception-policy.c:257
g_eps_master_switch
enum ExceptionPolicy g_eps_master_switch
Definition:
util-exception-policy.c:31
ExceptionPolicy
ExceptionPolicy
Definition:
util-exception-policy-types.h:25
src
util-exception-policy.h
Generated on Tue Dec 24 2024 23:30:39 for suricata by
1.8.18