struct trie_node *new = sl_alloc(trie_slab);
assert(new != NULL);
*new = (struct trie_node) { 0 };
+ assert(new->bucket == NULL);
return new;
}
assert(node != NULL);
assert(trie_slab != NULL);
+ if (node->parent == NULL)
+ assert(node->bucket != NULL);
+
if (is_leaf(node))
{
//node->potential_buckets[node->potential_buckets_count++] = get_ancestor_bucket(node);
assert(node != NULL);
assert(node->potential_buckets_count <= MAX_POTENTIAL_BUCKETS_COUNT);
+ if (node->parent == NULL)
+ assert(node->bucket != NULL);
+
if (is_leaf(node))
{
assert(node->potential_buckets_count > 0);
if (node == NULL)
return;
+ if (node->parent == NULL)
+ assert(node->bucket != NULL);
+
assert(node->potential_buckets_count <= MAX_POTENTIAL_BUCKETS_COUNT);
/* Root is assigned any of its potential buckets */
//print_prefixes_helper(node, _MI4(0), 0);
struct net_addr_ip4 addr = { 0 };
print_prefixes_helper(node, addr, 0);
- log("==== END PREFIXES ====");
}
/*