summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-06-02 23:38:47 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-06-03 00:02:08 +0200
commit5e5cbc7b23eaf13e18652c03efbad5be6995de6a (patch)
tree483466247708cfa50badf20783523992acac5786 /include/net
parent00bfb3205e62970ff14ac8756e1a72b753a990ab (diff)
downloadop-kernel-dev-5e5cbc7b23eaf13e18652c03efbad5be6995de6a.zip
op-kernel-dev-5e5cbc7b23eaf13e18652c03efbad5be6995de6a.tar.gz
netfilter: nf_conncount: expose connection list interface
This patch provides an interface to maintain the list of connections and the lookup function to obtain the number of connections in the list. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netfilter/nf_conntrack_count.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_conntrack_count.h b/include/net/netfilter/nf_conntrack_count.h
index e61184f..1910b65 100644
--- a/include/net/netfilter/nf_conntrack_count.h
+++ b/include/net/netfilter/nf_conntrack_count.h
@@ -13,4 +13,15 @@ unsigned int nf_conncount_count(struct net *net,
const u32 *key,
const struct nf_conntrack_tuple *tuple,
const struct nf_conntrack_zone *zone);
+
+unsigned int nf_conncount_lookup(struct net *net, struct hlist_head *head,
+ const struct nf_conntrack_tuple *tuple,
+ const struct nf_conntrack_zone *zone,
+ bool *addit);
+
+bool nf_conncount_add(struct hlist_head *head,
+ const struct nf_conntrack_tuple *tuple);
+
+void nf_conncount_cache_free(struct hlist_head *hhead);
+
#endif
OpenPOWER on IntegriCloud