blob: 66d80b30ba0e2779b4798ec8d0affc3fa0722815 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __LINUX_BRIDGE_EBT_LIMIT_H
2#define __LINUX_BRIDGE_EBT_LIMIT_H
3
Jan Engelhardt06988b02011-01-20 17:50:17 +01004#include <linux/types.h>
5
Linus Torvalds1da177e2005-04-16 15:20:36 -07006#define EBT_LIMIT_MATCH "limit"
7
8/* timings are in milliseconds. */
9#define EBT_LIMIT_SCALE 10000
10
11/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490
12 seconds, or one every 59 hours. */
13
Eric Dumazetd94d9fe2009-11-04 09:50:58 -080014struct ebt_limit_info {
Jan Engelhardt0260c1d2011-01-18 07:33:09 +010015 __u32 avg; /* Average secs between packets * scale */
16 __u32 burst; /* Period multiplier for upper limit. */
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
18 /* Used internally by the kernel */
19 unsigned long prev;
Jan Engelhardt0260c1d2011-01-18 07:33:09 +010020 __u32 credit;
21 __u32 credit_cap, cost;
Linus Torvalds1da177e2005-04-16 15:20:36 -070022};
23
24#endif