2005-04-16 16:20:36 -06:00
|
|
|
#ifndef __LINUX_BRIDGE_EBT_LIMIT_H
|
|
|
|
#define __LINUX_BRIDGE_EBT_LIMIT_H
|
|
|
|
|
2011-01-20 09:50:17 -07:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
#define EBT_LIMIT_MATCH "limit"
|
|
|
|
|
|
|
|
/* timings are in milliseconds. */
|
|
|
|
#define EBT_LIMIT_SCALE 10000
|
|
|
|
|
|
|
|
/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490
|
|
|
|
seconds, or one every 59 hours. */
|
|
|
|
|
2009-11-04 10:50:58 -07:00
|
|
|
struct ebt_limit_info {
|
2011-01-17 23:33:09 -07:00
|
|
|
__u32 avg; /* Average secs between packets * scale */
|
|
|
|
__u32 burst; /* Period multiplier for upper limit. */
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* Used internally by the kernel */
|
|
|
|
unsigned long prev;
|
2011-01-17 23:33:09 -07:00
|
|
|
__u32 credit;
|
|
|
|
__u32 credit_cap, cost;
|
2005-04-16 16:20:36 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|