summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/mpls_fib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/fib/mpls_fib.h')
-rw-r--r--src/vnet/fib/mpls_fib.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vnet/fib/mpls_fib.h b/src/vnet/fib/mpls_fib.h
index 93ae4623016..e2ef9253a9d 100644
--- a/src/vnet/fib/mpls_fib.h
+++ b/src/vnet/fib/mpls_fib.h
@@ -71,6 +71,15 @@ extern void mpls_fib_forwarding_table_reset(mpls_fib_t *mf,
mpls_eos_bit_t eos);
/**
+ * @brief Walk all entries in a FIB table
+ * N.B: This is NOT safe to deletes. If you need to delete walk the whole
+ * table and store elements in a vector, then delete the elements
+ */
+extern void mpls_fib_table_walk(mpls_fib_t *fib,
+ fib_table_walk_fn_t fn,
+ void *ctx);
+
+/**
* @brief
* Lookup a label and EOS bit in the MPLS_FIB table to retrieve the
* load-balance index to be used for packet forwarding.