suricata
util-exception-policy.h
Go to the documentation of this file.
1 /* Copyright (C) 2022-2023 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 
36 };
37 
38 void SetMasterExceptionPolicy(void);
40  Packet *p, enum ExceptionPolicy policy, enum PacketDropReason drop_reason);
41 enum ExceptionPolicy ExceptionPolicyParse(const char *option, const bool support_flow);
42 enum ExceptionPolicy ExceptionPolicyMidstreamParse(bool midstream_enabled);
43 
45 #ifdef DEBUG
46 extern uint64_t g_eps_applayer_error_offset_ts;
47 extern uint64_t g_eps_applayer_error_offset_tc;
48 extern uint64_t g_eps_pcap_packet_loss;
49 extern uint64_t g_eps_stream_ssn_memcap;
50 extern uint64_t g_eps_stream_reassembly_memcap;
51 extern uint64_t g_eps_flow_memcap;
52 extern uint64_t g_eps_defrag_memcap;
53 extern bool g_eps_is_alert_queue_fail_mode;
54 #endif
55 
56 int ExceptionSimulationCommandLineParser(const char *name, const char *arg);
57 
58 #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
EXCEPTION_POLICY_DROP_PACKET
@ EXCEPTION_POLICY_DROP_PACKET
Definition: util-exception-policy.h:33
PacketDropReason
PacketDropReason
Definition: decode.h:390
EXCEPTION_POLICY_AUTO
@ EXCEPTION_POLICY_AUTO
Definition: util-exception-policy.h:29
decode.h
ExceptionSimulationCommandLineParser
int ExceptionSimulationCommandLineParser(const char *name, const char *arg)
Definition: util-exception-policy.c:300
EXCEPTION_POLICY_REJECT
@ EXCEPTION_POLICY_REJECT
Definition: util-exception-policy.h:35
EXCEPTION_POLICY_PASS_PACKET
@ EXCEPTION_POLICY_PASS_PACKET
Definition: util-exception-policy.h:30
EXCEPTION_POLICY_DROP_FLOW
@ EXCEPTION_POLICY_DROP_FLOW
Definition: util-exception-policy.h:34
ExceptionPolicy
ExceptionPolicy
Definition: util-exception-policy.h:27
Packet_
Definition: decode.h:436
ExceptionPolicyApply
void ExceptionPolicyApply(Packet *p, enum ExceptionPolicy policy, enum PacketDropReason drop_reason)
Definition: util-exception-policy.c:69
EXCEPTION_POLICY_BYPASS_FLOW
@ EXCEPTION_POLICY_BYPASS_FLOW
Definition: util-exception-policy.h:32
ExceptionPolicyMidstreamParse
enum ExceptionPolicy ExceptionPolicyMidstreamParse(bool midstream_enabled)
Definition: util-exception-policy.c:257
EXCEPTION_POLICY_PASS_FLOW
@ EXCEPTION_POLICY_PASS_FLOW
Definition: util-exception-policy.h:31
g_eps_master_switch
enum ExceptionPolicy g_eps_master_switch
Definition: util-exception-policy.c:31
EXCEPTION_POLICY_NOT_SET
@ EXCEPTION_POLICY_NOT_SET
Definition: util-exception-policy.h:28