ip: Replace Sematics for Interface IP addresses
[vpp.git] / src / vnet / ip / ip6_ll_table.c
index 67d05ed..75489ea 100644 (file)
@@ -99,6 +99,7 @@ ip6_ll_prefix_to_fib (const ip6_ll_prefix_t * ilp, fib_prefix_t * fp)
   fp->fp_proto = FIB_PROTOCOL_IP6;
   fp->fp_len = 128;
   fp->fp_addr.ip6 = ilp->ilp_addr;
+  fp->___fp___pad = 0;
 }
 
 fib_node_index_t
@@ -210,18 +211,20 @@ typedef struct
   u64 count_by_prefix_length[129];
 } count_routes_in_fib_at_prefix_length_arg_t;
 
-static void
-count_routes_in_fib_at_prefix_length (BVT (clib_bihash_kv) * kvp, void *arg)
+static int
+count_routes_in_fib_at_prefix_length (clib_bihash_kv_24_8_t * kvp, void *arg)
 {
   count_routes_in_fib_at_prefix_length_arg_t *ap = arg;
   int mask_width;
 
   if ((kvp->key[2] >> 32) != ap->fib_index)
-    return;
+    return (BIHASH_WALK_CONTINUE);
 
   mask_width = kvp->key[2] & 0xFF;
 
   ap->count_by_prefix_length[mask_width]++;
+
+  return (BIHASH_WALK_CONTINUE);
 }
 
 static clib_error_t *
@@ -283,7 +286,7 @@ ip6_ll_show_fib (vlib_main_t * vm,
     s = format (s, "%U, fib_index:%d, locks:[",
                format_fib_table_name, fib_index,
                FIB_PROTOCOL_IP6, fib_index);
-    FOR_EACH_FIB_SOURCE (source)
+    vec_foreach_index (source, fib_table->ft_locks)
     {
       if (0 != fib_table->ft_locks[source])
        {
@@ -298,16 +301,16 @@ ip6_ll_show_fib (vlib_main_t * vm,
     /* Show summary? */
     if (!verbose)
       {
-       BVT (clib_bihash) * h =
+       clib_bihash_24_8_t *h =
          &im6->ip6_table[IP6_FIB_TABLE_NON_FWDING].ip6_hash;
        int len;
 
        vlib_cli_output (vm, "%=20s%=16s", "Prefix length", "Count");
 
-       memset (ca, 0, sizeof (*ca));
+       clib_memset (ca, 0, sizeof (*ca));
        ca->fib_index = fib_index;
 
-       BV (clib_bihash_foreach_key_value_pair)
+       clib_bihash_foreach_key_value_pair_24_8
          (h, count_routes_in_fib_at_prefix_length, ca);
 
        for (len = 128; len >= 0; len--)