diff options
author | Thomas Gschwantner <tharre3@gmail.com> | 2019-07-18 02:49:05 +0200 |
---|---|---|
committer | Thomas Gschwantner <tharre3@gmail.com> | 2019-07-18 15:14:46 +0200 |
commit | f302fdecb5492fd43b647f0f60ca35427bf2987e (patch) | |
tree | 3b12e518b5f9edad1dc4dc05688ca605954a6f8d /radix-trie.h | |
parent | Implement lease expiration (diff) | |
download | wg-dynamic-f302fdecb5492fd43b647f0f60ca35427bf2987e.tar.xz wg-dynamic-f302fdecb5492fd43b647f0f60ca35427bf2987e.zip |
Move counting logic from lease.c to radix-trie.c
Diffstat (limited to '')
-rw-r--r-- | radix-trie.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/radix-trie.h b/radix-trie.h index 9475cdb..60d383b 100644 --- a/radix-trie.h +++ b/radix-trie.h @@ -11,6 +11,8 @@ #include <stdint.h> struct ip_pool { + uint64_t totall_ipv6; + uint32_t totalh_ipv6, total_ipv4; struct radix_node *ip4_root, *ip6_root; struct radix_pool *ip4_pool, *ip6_pool; }; @@ -24,9 +26,6 @@ int ipp_add_v6(struct ip_pool *pool, const struct in6_addr *ip, uint8_t cidr); int ipp_del_v4(struct ip_pool *pool, const struct in_addr *ip, uint8_t cidr); int ipp_del_v6(struct ip_pool *pool, const struct in6_addr *ip, uint8_t cidr); -uint32_t ipp_gettotal_v4(struct ip_pool *pool); -uint64_t ipp_gettotal_v6(struct ip_pool *pool, uint32_t *high); - void ipp_addnth_v4(struct ip_pool *pool, struct in_addr *dest, uint32_t index); void ipp_addnth_v6(struct ip_pool *pool, struct in6_addr *dest, uint32_t index_low, uint64_t index_high); |