1 #ifndef _IPT_DSTLIMIT_H
2 #define _IPT_DSTLIMIT_H
4 /* timings are in milliseconds. */
5 #define IPT_DSTLIMIT_SCALE 10000
6 /* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490
7 seconds, or one every 59 hours. */
9 /* details of this structure hidden by the implementation */
10 struct ipt_dstlimit_htable;
12 #define IPT_DSTLIMIT_HASH_DIP 0x0001
13 #define IPT_DSTLIMIT_HASH_DPT 0x0002
14 #define IPT_DSTLIMIT_HASH_SIP 0x0004
17 u_int32_t mode; /* bitmask of IPT_DSTLIMIT_HASH_* */
18 u_int32_t avg; /* Average secs between packets * scale */
19 u_int32_t burst; /* Period multiplier for upper limit. */
22 u_int32_t size; /* how many buckets */
23 u_int32_t max; /* max number of entries */
24 u_int32_t gc_interval; /* gc interval */
25 u_int32_t expire; /* when do entries expire? */
28 struct ipt_dstlimit_info {
29 char name [IFNAMSIZ]; /* name */
30 struct dstlimit_cfg cfg;
31 struct ipt_dstlimit_htable *hinfo;
33 /* Used internally by the kernel */
36 struct ipt_dstlimit_info *master;
39 #endif /*_IPT_DSTLIMIT_H*/