1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef __LINUX_BRIDGE_EBT_LIMIT_H
3 #define __LINUX_BRIDGE_EBT_LIMIT_H
4 
5 #include <linux/types.h>
6 
7 #define EBT_LIMIT_MATCH "limit"
8 
9 /* timings are in milliseconds. */
10 #define EBT_LIMIT_SCALE 10000
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 
15 struct ebt_limit_info {
16 	__u32 avg;    /* Average secs between packets * scale */
17 	__u32 burst;  /* Period multiplier for upper limit. */
18 
19 	/* Used internally by the kernel */
20 	unsigned long prev;
21 	__u32 credit;
22 	__u32 credit_cap, cost;
23 };
24 
25 #endif
26