1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _XT_STRING_H
3#define _XT_STRING_H
4
5#include <linux/types.h>
6
7#define XT_STRING_MAX_PATTERN_SIZE 128
8#define XT_STRING_MAX_ALGO_NAME_SIZE 16
9
10enum {
11	XT_STRING_FLAG_INVERT		= 0x01,
12	XT_STRING_FLAG_IGNORECASE	= 0x02
13};
14
15struct xt_string_info {
16	__u16 from_offset;
17	__u16 to_offset;
18	char	  algo[XT_STRING_MAX_ALGO_NAME_SIZE];
19	char 	  pattern[XT_STRING_MAX_PATTERN_SIZE];
20	__u8  patlen;
21	union {
22		struct {
23			__u8  invert;
24		} v0;
25
26		struct {
27			__u8  flags;
28		} v1;
29	} u;
30
31	/* Used internally by the kernel */
32	struct ts_config __attribute__((aligned(8))) *config;
33};
34
35#endif /*_XT_STRING_H*/
36