+ mpls_fib_table_destroy(fib_table->ft_index);
+ break;
+ }
+}
+
+void
+fib_table_walk (u32 fib_index,
+ fib_protocol_t proto,
+ fib_table_walk_fn_t fn,
+ void *ctx)
+{
+ switch (proto)
+ {
+ case FIB_PROTOCOL_IP4:
+ ip4_fib_table_walk(ip4_fib_get(fib_index), fn, ctx);
+ break;
+ case FIB_PROTOCOL_IP6:
+ ip6_fib_table_walk(fib_index, fn, ctx);
+ break;
+ case FIB_PROTOCOL_MPLS:
+ mpls_fib_table_walk(mpls_fib_get(fib_index), fn, ctx);
+ break;
+ }
+}
+
+void
+fib_table_sub_tree_walk (u32 fib_index,
+ fib_protocol_t proto,
+ const fib_prefix_t *root,
+ fib_table_walk_fn_t fn,
+ void *ctx)
+{
+ switch (proto)
+ {
+ case FIB_PROTOCOL_IP4:
+ ip4_fib_table_sub_tree_walk(ip4_fib_get(fib_index), root, fn, ctx);
+ break;
+ case FIB_PROTOCOL_IP6:
+ ip6_fib_table_sub_tree_walk(fib_index, root, fn, ctx);
+ break;
+ case FIB_PROTOCOL_MPLS: