suricata
util-exception-policy-types.h
Go to the documentation of this file.
1/* Copyright (C) 2024-2025 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_TYPES_H
23#define UTIL_EXCEPTION_POLICY_TYPES_H
24
35
36#define EXCEPTION_POLICY_MAX (EXCEPTION_POLICY_REJECT + 1)
37
38/* Max length = possible exception policy scenarios + counter names
39 * + exception policy type. E.g.:
40 * "tcp.reassembly_exception_policy.drop_packet" + 1 */
41#define EXCEPTION_POLICY_COUNTER_MAX_LEN 45
42
43/** Flags for possible scenario/ config settings for exception policies */
44#define EXCEPTION_TARGET_FLAG_DEFRAG_MEMCAP BIT_U8(0)
45#define EXCEPTION_TARGET_FLAG_SESSION_MEMCAP BIT_U8(1)
46#define EXCEPTION_TARGET_FLAG_REASSEMBLY_MEMCAP BIT_U8(2)
47#define EXCEPTION_TARGET_FLAG_FLOW_MEMCAP BIT_U8(3)
48#define EXCEPTION_TARGET_FLAG_MIDSTREAM BIT_U8(4)
49#define EXCEPTION_TARGET_FLAG_APPLAYER_ERROR BIT_U8(5)
50
52 /* Follows enum order */
55
61
62#endif
uint16_t eps_id[EXCEPTION_POLICY_MAX]
bool valid_settings_ips[EXCEPTION_POLICY_MAX]
bool valid_settings_ids[EXCEPTION_POLICY_MAX]
char eps_name[EXCEPTION_POLICY_MAX][EXCEPTION_POLICY_COUNTER_MAX_LEN]
struct ExceptionPolicyCounters_ ExceptionPolicyCounters
#define EXCEPTION_POLICY_MAX
#define EXCEPTION_POLICY_COUNTER_MAX_LEN
@ EXCEPTION_POLICY_BYPASS_FLOW
@ EXCEPTION_POLICY_PASS_FLOW
@ EXCEPTION_POLICY_PASS_PACKET
@ EXCEPTION_POLICY_DROP_FLOW
@ EXCEPTION_POLICY_DROP_PACKET
struct ExceptionPolicyStatsSetts_ ExceptionPolicyStatsSetts