From 4489c0d66d9a0e6033c9472fd54df155788010b7 Mon Sep 17 00:00:00 2001 From: Yasuyuki KOZAKAI Date: Tue, 24 Jul 2007 07:11:26 +0000 Subject: Unifies libip[6]t_limit.c into libxt_limit.c. --- include/linux/netfilter/xt_limit.h | 21 +++++++++++++++++++++ include/linux/netfilter_ipv4/ipt_limit.h | 21 --------------------- include/linux/netfilter_ipv6/ip6t_limit.h | 21 --------------------- 3 files changed, 21 insertions(+), 42 deletions(-) create mode 100644 include/linux/netfilter/xt_limit.h delete mode 100644 include/linux/netfilter_ipv4/ipt_limit.h delete mode 100644 include/linux/netfilter_ipv6/ip6t_limit.h (limited to 'include') diff --git a/include/linux/netfilter/xt_limit.h b/include/linux/netfilter/xt_limit.h new file mode 100644 index 00000000..c0aa6d9f --- /dev/null +++ b/include/linux/netfilter/xt_limit.h @@ -0,0 +1,21 @@ +#ifndef _XT_RATE_H +#define _XT_RATE_H + +/* timings are in milliseconds. */ +#define XT_LIMIT_SCALE 10000 + +/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 + seconds, or one every 59 hours. */ +struct xt_rateinfo { + u_int32_t avg; /* Average secs between packets * scale */ + u_int32_t burst; /* Period multiplier for upper limit. */ + + /* Used internally by the kernel */ + unsigned long prev; + /* Ugly, ugly fucker. */ + struct xt_rateinfo *master; + + u_int32_t credit; + u_int32_t credit_cap, cost; +}; +#endif /*_XT_RATE_H*/ diff --git a/include/linux/netfilter_ipv4/ipt_limit.h b/include/linux/netfilter_ipv4/ipt_limit.h deleted file mode 100644 index f46d4b4e..00000000 --- a/include/linux/netfilter_ipv4/ipt_limit.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _IPT_RATE_H -#define _IPT_RATE_H - -/* timings are in milliseconds. */ -#define IPT_LIMIT_SCALE 10000 - -/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 - seconds, or one every 59 hours. */ -struct ipt_rateinfo { - u_int32_t avg; /* Average secs between packets * scale */ - u_int32_t burst; /* Period multiplier for upper limit. */ - - /* Used internally by the kernel */ - unsigned long prev; - /* Ugly, ugly fucker. */ - struct ipt_rateinfo *master; - - u_int32_t credit; - u_int32_t credit_cap, cost; -}; -#endif /*_IPT_RATE_H*/ diff --git a/include/linux/netfilter_ipv6/ip6t_limit.h b/include/linux/netfilter_ipv6/ip6t_limit.h deleted file mode 100644 index 6e17a677..00000000 --- a/include/linux/netfilter_ipv6/ip6t_limit.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _IP6T_RATE_H -#define _IP6T_RATE_H - -/* timings are in milliseconds. */ -#define IP6T_LIMIT_SCALE 10000 - -/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 - seconds, or one every 59 hours. */ -struct ip6t_rateinfo { - u_int32_t avg; /* Average secs between packets * scale */ - u_int32_t burst; /* Period multiplier for upper limit. */ - - /* Used internally by the kernel */ - unsigned long prev; - /* Ugly, ugly fucker. */ - struct ip6t_rateinfo *master; - - u_int32_t credit; - u_int32_t credit_cap, cost; -}; -#endif /*_IPT_RATE_H*/ -- cgit v1.2.3