1 #ifndef _XT_HASHLIMIT_H
2 #define _XT_HASHLIMIT_H
4 /* timings are in milliseconds. */
5 #define XT_HASHLIMIT_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 xt_hashlimit_htable;
12 #define XT_HASHLIMIT_HASH_DIP 0x0001
13 #define XT_HASHLIMIT_HASH_DPT 0x0002
14 #define XT_HASHLIMIT_HASH_SIP 0x0004
15 #define XT_HASHLIMIT_HASH_SPT 0x0008
17 struct hashlimit_cfg {
18 u_int32_t mode; /* bitmask of IPT_HASHLIMIT_HASH_* */
19 u_int32_t avg; /* Average secs between packets * scale */
20 u_int32_t burst; /* Period multiplier for upper limit. */
23 u_int32_t size; /* how many buckets */
24 u_int32_t max; /* max number of entries */
25 u_int32_t gc_interval; /* gc interval */
26 u_int32_t expire; /* when do entries expire? */
29 struct xt_hashlimit_info {
30 char name [IFNAMSIZ]; /* name */
31 struct hashlimit_cfg cfg;
32 struct xt_hashlimit_htable *hinfo;
34 /* Used internally by the kernel */
37 struct xt_hashlimit_info *master;
40 #endif /*_XT_HASHLIMIT_H*/