}
}
+/*
+ * Create route for aggregated prefix
+ */
static void
-create_route_ip4(struct aggregator_proto *p, const struct net_addr_ip4 *addr, struct aggregator_bucket *bucket)
+create_route_ip4(struct aggregator_proto *p, struct aggregator_bucket *bucket, const struct net_addr_ip4 *addr)
{
struct {
struct network net;
}
static void
-create_route_ip6(struct aggregator_proto *p, struct net_addr_ip6 *addr, struct aggregator_bucket *bucket)
+create_route_ip6(struct aggregator_proto *p, struct aggregator_bucket *bucket, const struct net_addr_ip6 *addr)
{
struct {
struct network n;
if (is_leaf(node))
{
assert(node->bucket != NULL);
- create_route_ip4(p, addr, node->bucket);
+ create_route_ip4(p, node->bucket, addr);
*count += 1;
return;
}
if (node->bucket)
{
- create_route_ip4(p, addr, node->bucket);
+ create_route_ip4(p, node->bucket, addr);
*count += 1;
}
if (is_leaf(node))
{
assert(node->bucket != NULL);
- create_route_ip6(p, addr, node->bucket);
+ create_route_ip6(p, node->bucket, addr);
*count += 1;
return;
}
if (node->bucket)
{
- create_route_ip6(p, addr, node->bucket);
+ create_route_ip6(p, node->bucket, addr);
*count += 1;
}