make netfilter use strict integer types
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / netfilter / xt_statistic.h
1 #ifndef _XT_STATISTIC_H
2 #define _XT_STATISTIC_H
3
4 #include <linux/types.h>
5
6 enum xt_statistic_mode {
7 XT_STATISTIC_MODE_RANDOM,
8 XT_STATISTIC_MODE_NTH,
9 __XT_STATISTIC_MODE_MAX
10 };
11 #define XT_STATISTIC_MODE_MAX (__XT_STATISTIC_MODE_MAX - 1)
12
13 enum xt_statistic_flags {
14 XT_STATISTIC_INVERT = 0x1,
15 };
16 #define XT_STATISTIC_MASK 0x1
17
18 struct xt_statistic_info {
19 __u16 mode;
20 __u16 flags;
21 union {
22 struct {
23 __u32 probability;
24 } random;
25 struct {
26 __u32 every;
27 __u32 packet;
28 /* Used internally by the kernel */
29 __u32 count;
30 } nth;
31 } u;
32 struct xt_statistic_info *master __attribute__((aligned(8)));
33 };
34
35 #endif /* _XT_STATISTIC_H */