]>
Commit | Line | Data |
---|---|---|
6f52b16c | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
f3389805 PM |
2 | #ifndef _XT_STATISTIC_H |
3 | #define _XT_STATISTIC_H | |
4 | ||
60c195c7 AB |
5 | #include <linux/types.h> |
6 | ||
f3389805 PM |
7 | enum xt_statistic_mode { |
8 | XT_STATISTIC_MODE_RANDOM, | |
9 | XT_STATISTIC_MODE_NTH, | |
10 | __XT_STATISTIC_MODE_MAX | |
11 | }; | |
12 | #define XT_STATISTIC_MODE_MAX (__XT_STATISTIC_MODE_MAX - 1) | |
13 | ||
14 | enum xt_statistic_flags { | |
15 | XT_STATISTIC_INVERT = 0x1, | |
16 | }; | |
17 | #define XT_STATISTIC_MASK 0x1 | |
18 | ||
acc738fe JE |
19 | struct xt_statistic_priv; |
20 | ||
f3389805 | 21 | struct xt_statistic_info { |
60c195c7 AB |
22 | __u16 mode; |
23 | __u16 flags; | |
f3389805 PM |
24 | union { |
25 | struct { | |
60c195c7 | 26 | __u32 probability; |
f3389805 PM |
27 | } random; |
28 | struct { | |
60c195c7 AB |
29 | __u32 every; |
30 | __u32 packet; | |
ba1eb95c | 31 | __u32 count; /* unused */ |
f3389805 PM |
32 | } nth; |
33 | } u; | |
acc738fe | 34 | struct xt_statistic_priv *master __attribute__((aligned(8))); |
f3389805 PM |
35 | }; |
36 | ||
37 | #endif /* _XT_STATISTIC_H */ |