Warning: This file is not a C or C++ file. It does not have highlighting.
| 1 | #ifndef _NF_CONNTRACK_COUNT_H |
|---|---|
| 2 | #define _NF_CONNTRACK_COUNT_H |
| 3 | |
| 4 | #include <linux/list.h> |
| 5 | #include <linux/spinlock.h> |
| 6 | #include <net/netfilter/nf_conntrack_tuple.h> |
| 7 | #include <net/netfilter/nf_conntrack_zones.h> |
| 8 | |
| 9 | struct nf_conncount_data; |
| 10 | |
| 11 | struct nf_conncount_list { |
| 12 | spinlock_t list_lock; |
| 13 | u32 last_gc; /* jiffies at most recent gc */ |
| 14 | struct list_head head; /* connections with the same filtering key */ |
| 15 | unsigned int count; /* length of list */ |
| 16 | }; |
| 17 | |
| 18 | struct nf_conncount_data *nf_conncount_init(struct net *net, unsigned int keylen); |
| 19 | void nf_conncount_destroy(struct net *net, struct nf_conncount_data *data); |
| 20 | |
| 21 | unsigned int nf_conncount_count_skb(struct net *net, |
| 22 | const struct sk_buff *skb, |
| 23 | u16 l3num, |
| 24 | struct nf_conncount_data *data, |
| 25 | const u32 *key); |
| 26 | |
| 27 | int nf_conncount_add_skb(struct net *net, const struct sk_buff *skb, |
| 28 | u16 l3num, struct nf_conncount_list *list); |
| 29 | |
| 30 | void nf_conncount_list_init(struct nf_conncount_list *list); |
| 31 | |
| 32 | bool nf_conncount_gc_list(struct net *net, |
| 33 | struct nf_conncount_list *list); |
| 34 | |
| 35 | void nf_conncount_cache_free(struct nf_conncount_list *list); |
| 36 | |
| 37 | #endif |
| 38 |
Warning: This file is not a C or C++ file. It does not have highlighting.
