FIB: encode the label stack in the FIB path during table dump

Change-Id: I28e8a99b980ad343a4209e673201791b91ceab4e
Signed-off-by: Neale Ranns <nranns@cisco.com>
diff --git a/src/vnet/mfib/mfib_entry.c b/src/vnet/mfib/mfib_entry.c
index 51d775d..ac37665 100644
--- a/src/vnet/mfib/mfib_entry.c
+++ b/src/vnet/mfib/mfib_entry.c
@@ -1324,9 +1324,10 @@
 
     if (FIB_NODE_INDEX_INVALID != bsrc->mfes_pl)
     {
-        fib_path_list_walk(bsrc->mfes_pl,
-                           fib_path_encode,
-                           api_rpaths);
+        fib_path_list_walk_w_ext(bsrc->mfes_pl,
+                                 NULL,
+                                 fib_path_encode,
+                                 api_rpaths);
     }
 }
 
diff --git a/src/vnet/mfib/mfib_table.c b/src/vnet/mfib/mfib_table.c
index 8ae4a78..68154b3 100644
--- a/src/vnet/mfib/mfib_table.c
+++ b/src/vnet/mfib/mfib_table.c
@@ -490,6 +490,17 @@
 }
 
 u32
+mfib_table_get_table_id (u32 fib_index,
+                        fib_protocol_t proto)
+{
+    mfib_table_t *mfib_table;
+
+    mfib_table = mfib_table_get(fib_index, proto);
+
+    return ((NULL != mfib_table ? mfib_table->mft_table_id : ~0));
+}
+
+u32
 mfib_table_find (fib_protocol_t proto,
                  u32 table_id)
 {
diff --git a/src/vnet/mfib/mfib_table.h b/src/vnet/mfib/mfib_table.h
index 89f194f..6be4f79 100644
--- a/src/vnet/mfib/mfib_table.h
+++ b/src/vnet/mfib/mfib_table.h
@@ -291,6 +291,21 @@
 
 /**
  * @brief
+ *  Get the Table-ID of the FIB from protocol and index
+ *
+ * @param fib_index
+ *  The FIB index
+ *
+ * @paran proto
+ *  The protocol of the FIB (and thus the entries therein)
+ *
+ * @return fib_index
+ *  The tableID of the FIB
+ */
+extern u32 mfib_table_get_table_id(u32 fib_index, fib_protocol_t proto);
+
+/**
+ * @brief
  *  Get the index of the FIB for a Table-ID. This DOES NOT create the
  * FIB if it does not exist.
  *