Linux-libre 5.7.6-gnu
[librecmc/linux-libre.git] / include / uapi / linux / netfilter / xt_limit.h
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _XT_RATE_H
3 #define _XT_RATE_H
4
5 #include <linux/types.h>
6
7 /* timings are in milliseconds. */
8 #define XT_LIMIT_SCALE 10000
9
10 struct xt_limit_priv;
11
12 /* 1/10,000 sec period => max of 10,000/sec.  Min rate is then 429490
13    seconds, or one every 59 hours. */
14 struct xt_rateinfo {
15         __u32 avg;    /* Average secs between packets * scale */
16         __u32 burst;  /* Period multiplier for upper limit. */
17
18         /* Used internally by the kernel */
19         unsigned long prev; /* moved to xt_limit_priv */
20         __u32 credit; /* moved to xt_limit_priv */
21         __u32 credit_cap, cost;
22
23         struct xt_limit_priv *master;
24 };
25 #endif /*_XT_RATE_H*/