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 
32 };
33 
35  Packet *p, enum ExceptionPolicy policy, enum PacketDropReason drop_reason);
36 enum ExceptionPolicy ExceptionPolicyParse(const char *option, const bool support_flow);
37 
38 #ifdef DEBUG
39 extern uint64_t g_eps_applayer_error_offset_ts;
40 extern uint64_t g_eps_applayer_error_offset_tc;
41 extern uint64_t g_eps_pcap_packet_loss;
42 extern uint64_t g_eps_stream_ssn_memcap;
43 extern uint64_t g_eps_stream_reassembly_memcap;
44 extern uint64_t g_eps_flow_memcap;
45 extern uint64_t g_eps_defrag_memcap;
46 extern bool g_eps_is_alert_queue_fail_mode;
47 #endif
48 
49 int ExceptionSimulationCommandlineParser(const char *name, const char *arg);
50 
51 #endif
ExceptionPolicyParse
enum ExceptionPolicy ExceptionPolicyParse(const char *option, const bool support_flow)
Definition: util-exception-policy.c:67
EXCEPTION_POLICY_DROP_PACKET
@ EXCEPTION_POLICY_DROP_PACKET
Definition: util-exception-policy.h:30
PacketDropReason
PacketDropReason
Definition: decode.h:398
EXCEPTION_POLICY_IGNORE
@ EXCEPTION_POLICY_IGNORE
Definition: util-exception-policy.h:26
ExceptionSimulationCommandlineParser
int ExceptionSimulationCommandlineParser(const char *name, const char *arg)
Definition: util-exception-policy.c:111
EXCEPTION_POLICY_PASS_PACKET
@ EXCEPTION_POLICY_PASS_PACKET
Definition: util-exception-policy.h:27
EXCEPTION_POLICY_DROP_FLOW
@ EXCEPTION_POLICY_DROP_FLOW
Definition: util-exception-policy.h:31
ExceptionPolicy
ExceptionPolicy
Definition: util-exception-policy.h:25
Packet_
Definition: decode.h:433
ExceptionPolicyApply
void ExceptionPolicyApply(Packet *p, enum ExceptionPolicy policy, enum PacketDropReason drop_reason)
Definition: util-exception-policy.c:27
EXCEPTION_POLICY_BYPASS_FLOW
@ EXCEPTION_POLICY_BYPASS_FLOW
Definition: util-exception-policy.h:29
EXCEPTION_POLICY_PASS_FLOW
@ EXCEPTION_POLICY_PASS_FLOW
Definition: util-exception-policy.h:28