Harald Welte | 2e4e6a1 | 2006-01-12 13:30:04 -0800 | [diff] [blame] | 1 | #ifndef _XT_STRING_H |
2 | #define _XT_STRING_H | ||||
3 | |||||
Arnd Bergmann | 60c195c | 2009-02-26 00:51:43 +0100 | [diff] [blame] | 4 | #include <linux/types.h> |
5 | |||||
Harald Welte | 2e4e6a1 | 2006-01-12 13:30:04 -0800 | [diff] [blame] | 6 | #define XT_STRING_MAX_PATTERN_SIZE 128 |
7 | #define XT_STRING_MAX_ALGO_NAME_SIZE 16 | ||||
8 | |||||
Joonwoo Park | 4ad3f26 | 2008-07-08 02:38:56 -0700 | [diff] [blame] | 9 | enum { |
10 | XT_STRING_FLAG_INVERT = 0x01, | ||||
11 | XT_STRING_FLAG_IGNORECASE = 0x02 | ||||
12 | }; | ||||
13 | |||||
Harald Welte | 2e4e6a1 | 2006-01-12 13:30:04 -0800 | [diff] [blame] | 14 | struct xt_string_info |
15 | { | ||||
Arnd Bergmann | 60c195c | 2009-02-26 00:51:43 +0100 | [diff] [blame] | 16 | __u16 from_offset; |
17 | __u16 to_offset; | ||||
Harald Welte | 2e4e6a1 | 2006-01-12 13:30:04 -0800 | [diff] [blame] | 18 | char algo[XT_STRING_MAX_ALGO_NAME_SIZE]; |
19 | char pattern[XT_STRING_MAX_PATTERN_SIZE]; | ||||
Arnd Bergmann | 60c195c | 2009-02-26 00:51:43 +0100 | [diff] [blame] | 20 | __u8 patlen; |
Joonwoo Park | 4ad3f26 | 2008-07-08 02:38:56 -0700 | [diff] [blame] | 21 | union { |
22 | struct { | ||||
Arnd Bergmann | 60c195c | 2009-02-26 00:51:43 +0100 | [diff] [blame] | 23 | __u8 invert; |
Joonwoo Park | 4ad3f26 | 2008-07-08 02:38:56 -0700 | [diff] [blame] | 24 | } v0; |
25 | |||||
26 | struct { | ||||
Arnd Bergmann | 60c195c | 2009-02-26 00:51:43 +0100 | [diff] [blame] | 27 | __u8 flags; |
Joonwoo Park | 4ad3f26 | 2008-07-08 02:38:56 -0700 | [diff] [blame] | 28 | } v1; |
29 | } u; | ||||
Jan Engelhardt | 8b6f3f6 | 2008-01-14 23:33:14 -0800 | [diff] [blame] | 30 | |
31 | /* Used internally by the kernel */ | ||||
Harald Welte | 2e4e6a1 | 2006-01-12 13:30:04 -0800 | [diff] [blame] | 32 | struct ts_config __attribute__((aligned(8))) *config; |
33 | }; | ||||
34 | |||||
35 | #endif /*_XT_STRING_H*/ |