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 
38  Packet *p, enum ExceptionPolicy policy, enum PacketDropReason drop_reason);
39 enum ExceptionPolicy ExceptionPolicyParse(const char *option, const bool support_flow);
40 
41 #ifdef DEBUG
42 extern uint64_t g_eps_applayer_error_offset_ts;
43 extern uint64_t g_eps_applayer_error_offset_tc;
44 extern uint64_t g_eps_pcap_packet_loss;
45 extern uint64_t g_eps_stream_ssn_memcap;
46 extern uint64_t g_eps_stream_reassembly_memcap;
47 extern uint64_t g_eps_flow_memcap;
48 extern uint64_t g_eps_defrag_memcap;
49 extern bool g_eps_is_alert_queue_fail_mode;
50 #endif
51 
52 int ExceptionSimulationCommandlineParser(const char *name, const char *arg);
53 
54 #endif
ExceptionPolicyParse
enum ExceptionPolicy ExceptionPolicyParse(const char *option, const bool support_flow)
Definition: util-exception-policy.c:76
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
EXCEPTION_POLICY_IGNORE
@ EXCEPTION_POLICY_IGNORE
Definition: util-exception-policy.h:28
ExceptionSimulationCommandlineParser
int ExceptionSimulationCommandlineParser(const char *name, const char *arg)
Definition: util-exception-policy.c:126
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:30
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