blob: c2ac02e1fab64b16288ba3a706c750a228193219 [file] [log] [blame]
Christopher Ferris25981132017-11-14 16:53:49 -08001/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
Ben Cheng30692c62013-10-15 18:26:18 -07002#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
15struct 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