Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef __LINUX_BRIDGE_EBT_LIMIT_H |
| 2 | #define __LINUX_BRIDGE_EBT_LIMIT_H |
| 3 | |
| 4 | #define EBT_LIMIT_MATCH "limit" |
| 5 | |
| 6 | /* timings are in milliseconds. */ |
| 7 | #define EBT_LIMIT_SCALE 10000 |
| 8 | |
| 9 | /* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 |
| 10 | seconds, or one every 59 hours. */ |
| 11 | |
Eric Dumazet | d94d9fe | 2009-11-04 09:50:58 -0800 | [diff] [blame] | 12 | struct ebt_limit_info { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | u_int32_t avg; /* Average secs between packets * scale */ |
| 14 | u_int32_t burst; /* Period multiplier for upper limit. */ |
| 15 | |
| 16 | /* Used internally by the kernel */ |
| 17 | unsigned long prev; |
| 18 | u_int32_t credit; |
| 19 | u_int32_t credit_cap, cost; |
| 20 | }; |
| 21 | |
| 22 | #endif |