suricata
util-exception-policy.h
Go to the documentation of this file.
1 /* Copyright (C) 2022 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 __UTIL_EXCEPTION_POLICY_H__
23 #define __UTIL_EXCEPTION_POLICY_H__
24 
25 #include "decode.h"
26 
35 };
36 
37 void SetMasterExceptionPolicy(void);
39  Packet *p, enum ExceptionPolicy policy, enum PacketDropReason drop_reason);
40 enum ExceptionPolicy ExceptionPolicyParse(const char *option, const bool support_flow);
41 
43 #ifdef DEBUG
44 extern uint64_t g_eps_applayer_error_offset_ts;
45 extern uint64_t g_eps_applayer_error_offset_tc;
46 extern uint64_t g_eps_pcap_packet_loss;
47 extern uint64_t g_eps_stream_ssn_memcap;
48 extern uint64_t g_eps_stream_reassembly_memcap;
49 extern uint64_t g_eps_flow_memcap;
50 extern uint64_t g_eps_defrag_memcap;
51 extern bool g_eps_is_alert_queue_fail_mode;
52 #endif
53 
54 int ExceptionSimulationCommandlineParser(const char *name, const char *arg);
55 
56 #endif
ExceptionPolicyParse
enum ExceptionPolicy ExceptionPolicyParse(const char *option, const bool support_flow)
Definition: util-exception-policy.c:120
SetMasterExceptionPolicy
void SetMasterExceptionPolicy(void)
Definition: util-exception-policy.c:56
EXCEPTION_POLICY_DROP_PACKET
@ EXCEPTION_POLICY_DROP_PACKET
Definition: util-exception-policy.h:32
PacketDropReason
PacketDropReason
Definition: decode.h:390
decode.h
EXCEPTION_POLICY_REJECT
@ EXCEPTION_POLICY_REJECT
Definition: util-exception-policy.h:34
ExceptionSimulationCommandlineParser
int ExceptionSimulationCommandlineParser(const char *name, const char *arg)
Definition: util-exception-policy.c:201
EXCEPTION_POLICY_PASS_PACKET
@ EXCEPTION_POLICY_PASS_PACKET
Definition: util-exception-policy.h:29
EXCEPTION_POLICY_DROP_FLOW
@ EXCEPTION_POLICY_DROP_FLOW
Definition: util-exception-policy.h:33
ExceptionPolicy
ExceptionPolicy
Definition: util-exception-policy.h:27
Packet_
Definition: decode.h:428
ExceptionPolicyApply
void ExceptionPolicyApply(Packet *p, enum ExceptionPolicy policy, enum PacketDropReason drop_reason)
Definition: util-exception-policy.c:66
EXCEPTION_POLICY_BYPASS_FLOW
@ EXCEPTION_POLICY_BYPASS_FLOW
Definition: util-exception-policy.h:31
EXCEPTION_POLICY_PASS_FLOW
@ EXCEPTION_POLICY_PASS_FLOW
Definition: util-exception-policy.h:30
g_eps_master_switch
enum ExceptionPolicy g_eps_master_switch
Definition: util-exception-policy.c:30
EXCEPTION_POLICY_NOT_SET
@ EXCEPTION_POLICY_NOT_SET
Definition: util-exception-policy.h:28