diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-06-02 23:38:47 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-06-03 00:02:08 +0200 |
commit | 5e5cbc7b23eaf13e18652c03efbad5be6995de6a (patch) | |
tree | 483466247708cfa50badf20783523992acac5786 /include/net | |
parent | netfilter: nf_tables: pass context to object destroy indirection (diff) | |
download | linux-5e5cbc7b23eaf13e18652c03efbad5be6995de6a.tar.xz linux-5e5cbc7b23eaf13e18652c03efbad5be6995de6a.zip |
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.h | 11 |
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 e61184fbfb71..1910b6572430 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 |