From 325260edb16447416a41ae1fa7985e5c0ebc91d4 Mon Sep 17 00:00:00 2001 From: Thomas Gschwantner Date: Sun, 14 Apr 2019 23:46:57 +0200 Subject: radix-trie: remove bits arg from radix_insert_v4/6 --- radix-trie.c | 8 ++++---- radix-trie.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/radix-trie.c b/radix-trie.c index 0e67a52..4786c69 100644 --- a/radix-trie.c +++ b/radix-trie.c @@ -293,15 +293,15 @@ void radix_free(struct radix_trie *trie) radix_free_nodes(trie->ip6_root); } -void *radix_find_v4(struct radix_trie *trie, uint8_t bits, const void *be_ip) +void *radix_find_v4(struct radix_trie *trie, const void *be_ip) { - struct radix_node *found = lookup(trie->ip4_root, bits, be_ip); + struct radix_node *found = lookup(trie->ip4_root, 32, be_ip); return found ? found->data : NULL; } -void *radix_find_v6(struct radix_trie *trie, uint8_t bits, const void *be_ip) +void *radix_find_v6(struct radix_trie *trie, const void *be_ip) { - struct radix_node *found = lookup(trie->ip6_root, bits, be_ip); + struct radix_node *found = lookup(trie->ip6_root, 128, be_ip); return found ? found->data : NULL; } diff --git a/radix-trie.h b/radix-trie.h index 3d0b00f..9e210af 100644 --- a/radix-trie.h +++ b/radix-trie.h @@ -16,8 +16,8 @@ struct radix_trie { void radix_init(struct radix_trie *trie); void radix_free(struct radix_trie *trie); -void *radix_find_v4(struct radix_trie *trie, uint8_t bits, const void *be_ip); -void *radix_find_v6(struct radix_trie *trie, uint8_t bits, const void *be_ip); +void *radix_find_v4(struct radix_trie *trie, const void *be_ip); +void *radix_find_v6(struct radix_trie *trie, const void *be_ip); int radix_insert_v4(struct radix_trie *root, const struct in_addr *ip, uint8_t cidr, void *data); int radix_insert_v6(struct radix_trie *root, const struct in6_addr *ip, -- cgit v1.2.3-59-g8ed1b