diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter/Kbuild | 1 | ||||
-rw-r--r-- | include/linux/netfilter/xt_RATEEST.h | 11 | ||||
-rw-r--r-- | include/net/netfilter/xt_rateest.h | 17 |
3 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index 1e6900278318..707a15854430 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
@@ -10,6 +10,7 @@ header-y += xt_DSCP.h | |||
10 | header-y += xt_MARK.h | 10 | header-y += xt_MARK.h |
11 | header-y += xt_NFLOG.h | 11 | header-y += xt_NFLOG.h |
12 | header-y += xt_NFQUEUE.h | 12 | header-y += xt_NFQUEUE.h |
13 | header-y += xt_RATEEST.h | ||
13 | header-y += xt_SECMARK.h | 14 | header-y += xt_SECMARK.h |
14 | header-y += xt_TCPMSS.h | 15 | header-y += xt_TCPMSS.h |
15 | header-y += xt_comment.h | 16 | header-y += xt_comment.h |
diff --git a/include/linux/netfilter/xt_RATEEST.h b/include/linux/netfilter/xt_RATEEST.h new file mode 100644 index 000000000000..670f2e49d4fb --- /dev/null +++ b/include/linux/netfilter/xt_RATEEST.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef _XT_RATEEST_TARGET_H | ||
2 | #define _XT_RATEEST_TARGET_H | ||
3 | |||
4 | struct xt_rateest_target_info { | ||
5 | char name[IFNAMSIZ]; | ||
6 | int8_t interval; | ||
7 | u_int8_t ewma_log; | ||
8 | struct xt_rateest *est __attribute__((aligned(8))); | ||
9 | }; | ||
10 | |||
11 | #endif /* _XT_RATEEST_TARGET_H */ | ||
diff --git a/include/net/netfilter/xt_rateest.h b/include/net/netfilter/xt_rateest.h new file mode 100644 index 000000000000..65d594dffbff --- /dev/null +++ b/include/net/netfilter/xt_rateest.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef _XT_RATEEST_H | ||
2 | #define _XT_RATEEST_H | ||
3 | |||
4 | struct xt_rateest { | ||
5 | struct hlist_node list; | ||
6 | char name[IFNAMSIZ]; | ||
7 | unsigned int refcnt; | ||
8 | spinlock_t lock; | ||
9 | struct gnet_estimator params; | ||
10 | struct gnet_stats_rate_est rstats; | ||
11 | struct gnet_stats_basic bstats; | ||
12 | }; | ||
13 | |||
14 | extern struct xt_rateest *xt_rateest_lookup(const char *name); | ||
15 | extern void xt_rateest_put(struct xt_rateest *est); | ||
16 | |||
17 | #endif /* _XT_RATEEST_H */ | ||