summaryrefslogtreecommitdiffstats
path: root/src/vnet/mfib/mfib_table.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-01-26 01:18:23 -0800
committerFlorin Coras <florin.coras@gmail.com>2017-02-20 09:54:49 +0000
commit5a8123bda0261158457e38bfb4922aa5961389ff (patch)
treedf221814e21d30ea5d63620504c73e64371a5780 /src/vnet/mfib/mfib_table.c
parent90c55724b583434957cf83555a084770f2efdd7a (diff)
Python test IP and MPLS objects conform to infra.
Add IP[46] MFIB dump. Change-Id: I4a2821f65e67a5416b291e4912c84f64989883b8 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/mfib/mfib_table.c')
-rw-r--r--src/vnet/mfib/mfib_table.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/vnet/mfib/mfib_table.c b/src/vnet/mfib/mfib_table.c
index b4e855ff071..3b4bd985893 100644
--- a/src/vnet/mfib/mfib_table.c
+++ b/src/vnet/mfib/mfib_table.c
@@ -489,6 +489,25 @@ mfib_table_lock (u32 fib_index,
mfib_table->mft_locks++;
}
+void
+mfib_table_walk (u32 fib_index,
+ fib_protocol_t proto,
+ mfib_table_walk_fn_t fn,
+ void *ctx)
+{
+ switch (proto)
+ {
+ case FIB_PROTOCOL_IP4:
+ ip4_mfib_table_walk(ip4_mfib_get(fib_index), fn, ctx);
+ break;
+ case FIB_PROTOCOL_IP6:
+ ip6_mfib_table_walk(ip6_mfib_get(fib_index), fn, ctx);
+ break;
+ case FIB_PROTOCOL_MPLS:
+ break;
+ }
+}
+
u8*
format_mfib_table_name (u8* s, va_list ap)
{