Route counters in the stats segment
[vpp.git] / src / vnet / fib / fib_table.h
index ddc00e5..f13dd77 100644 (file)
@@ -338,7 +338,7 @@ extern fib_node_index_t fib_table_entry_path_add(u32 fib_index,
                                                 u32 next_hop_sw_if_index,
                                                 u32 next_hop_fib_index,
                                                 u32 next_hop_weight,
-                                                mpls_label_t *next_hop_label_stack,
+                                                fib_mpls_label_t *next_hop_label_stack,
                                                 fib_route_path_flags_t pf);
 /**
  * @brief
@@ -521,7 +521,7 @@ extern fib_node_index_t fib_table_entry_update_one_path(u32 fib_index,
                                                        u32 next_hop_sw_if_index,
                                                        u32 next_hop_fib_index,
                                                        u32 next_hop_weight,
-                                                       mpls_label_t *next_hop_label_stack,
+                                                       fib_mpls_label_t *next_hop_label_stack,
                                                        fib_route_path_flags_t pf);
 
 /**
@@ -594,6 +594,17 @@ extern void fib_table_entry_delete(u32 fib_index,
 extern void fib_table_entry_delete_index(fib_node_index_t entry_index,
                                         fib_source_t source);
 
+/**
+ * @brief
+ *  Return the stats index for a FIB entry
+ * @param fib_index
+ *  The table's FIB index
+ * @param prefix
+ *  The entry's prefix's
+ */
+extern u32 fib_table_entry_get_stats_index(u32 fib_index,
+                                           const fib_prefix_t *prefix);
+
 /**
  * @brief
  *  Flush all entries from a table for the source
@@ -643,6 +654,21 @@ extern u32 fib_table_get_index_for_sw_if_index(fib_protocol_t proto,
 extern u32 fib_table_get_table_id_for_sw_if_index(fib_protocol_t proto,
                                                  u32 sw_if_index);
 
+/**
+ * @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 fib_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