From 5a8123bda0261158457e38bfb4922aa5961389ff Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 26 Jan 2017 01:18:23 -0800 Subject: Python test IP and MPLS objects conform to infra. Add IP[46] MFIB dump. Change-Id: I4a2821f65e67a5416b291e4912c84f64989883b8 Signed-off-by: Neale Ranns --- src/vnet/mfib/mfib_table.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/vnet/mfib/mfib_table.h') diff --git a/src/vnet/mfib/mfib_table.h b/src/vnet/mfib/mfib_table.h index 4c51b70f..95239f7c 100644 --- a/src/vnet/mfib/mfib_table.h +++ b/src/vnet/mfib/mfib_table.h @@ -360,4 +360,20 @@ extern u32 mfib_table_get_num_entries(u32 fib_index, extern mfib_table_t *mfib_table_get(fib_node_index_t index, fib_protocol_t proto); +/** + * @brief Call back function when walking entries in a FIB table + */ +typedef int (*mfib_table_walk_fn_t)(fib_node_index_t fei, + void *ctx); + +/** + * @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 mfib_table_walk(u32 fib_index, + fib_protocol_t proto, + mfib_table_walk_fn_t fn, + void *ctx); + #endif -- cgit 1.2.3-korg