Commit | Line | Data |
---|---|---|
2e4e6a17 HW |
1 | #ifndef _XT_RATE_H |
2 | #define _XT_RATE_H | |
3 | ||
60c195c7 AB |
4 | #include <linux/types.h> |
5 | ||
2e4e6a17 HW |
6 | /* timings are in milliseconds. */ |
7 | #define XT_LIMIT_SCALE 10000 | |
8 | ||
acc738fe JE |
9 | struct xt_limit_priv; |
10 | ||
2e4e6a17 HW |
11 | /* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 |
12 | seconds, or one every 59 hours. */ | |
13 | struct xt_rateinfo { | |
60c195c7 AB |
14 | __u32 avg; /* Average secs between packets * scale */ |
15 | __u32 burst; /* Period multiplier for upper limit. */ | |
2e4e6a17 HW |
16 | |
17 | /* Used internally by the kernel */ | |
acc738fe | 18 | unsigned long prev; /* moved to xt_limit_priv */ |
ba1eb95c | 19 | __u32 credit; /* moved to xt_limit_priv */ |
60c195c7 | 20 | __u32 credit_cap, cost; |
2e4e6a17 | 21 | |
acc738fe | 22 | struct xt_limit_priv *master; |
2e4e6a17 HW |
23 | }; |
24 | #endif /*_XT_RATE_H*/ |