summaryrefslogtreecommitdiffstats
path: root/src/vnet/mfib
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/mfib')
-rw-r--r--src/vnet/mfib/mfib_entry.c10
-rw-r--r--src/vnet/mfib/mfib_entry.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/vnet/mfib/mfib_entry.c b/src/vnet/mfib/mfib_entry.c
index a88f375ec19..7427334fa17 100644
--- a/src/vnet/mfib/mfib_entry.c
+++ b/src/vnet/mfib/mfib_entry.c
@@ -1106,6 +1106,16 @@ mfib_entry_last_lock_gone (fib_node_t *node)
pool_put(mfib_entry_pool, mfib_entry);
}
+u32
+mfib_entry_get_stats_index (fib_node_index_t fib_entry_index)
+{
+ mfib_entry_t *mfib_entry;
+
+ mfib_entry = mfib_entry_get(fib_entry_index);
+
+ return (mfib_entry->mfe_rep.dpoi_index);
+}
+
/*
* mfib_entry_back_walk_notify
*
diff --git a/src/vnet/mfib/mfib_entry.h b/src/vnet/mfib/mfib_entry.h
index a1d5acf9066..880c1e2933c 100644
--- a/src/vnet/mfib/mfib_entry.h
+++ b/src/vnet/mfib/mfib_entry.h
@@ -132,6 +132,7 @@ extern void mfib_entry_get_prefix(fib_node_index_t fib_entry_index,
extern u32 mfib_entry_get_fib_index(fib_node_index_t fib_entry_index);
extern int mfib_entry_is_sourced(fib_node_index_t fib_entry_index,
mfib_source_t source);
+extern u32 mfib_entry_get_stats_index(fib_node_index_t fib_entry_index);
extern const dpo_id_t*mfib_entry_contribute_ip_forwarding(
fib_node_index_t mfib_entry_index);