1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 #ifndef _XT_STATISTIC_H 3 #define _XT_STATISTIC_H 4 5 #include <linux/types.h> 6 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 19 struct xt_statistic_priv; 20 21 struct xt_statistic_info { 22 __u16 mode; 23 __u16 flags; 24 union { 25 struct { 26 __u32 probability; 27 } random; 28 struct { 29 __u32 every; 30 __u32 packet; 31 __u32 count; /* unused */ 32 } nth; 33 } u; 34 struct xt_statistic_priv *master __attribute__((aligned(8))); 35 }; 36 37 #endif /* _XT_STATISTIC_H */ 38