diff options
-rw-r--r-- | src/vnet/fib/fib_entry.h | 3 | ||||
-rw-r--r-- | src/vnet/fib/fib_entry_src.c | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/vnet/fib/fib_entry.h b/src/vnet/fib/fib_entry.h index 4053ff65181..223928354b7 100644 --- a/src/vnet/fib/fib_entry.h +++ b/src/vnet/fib/fib_entry.h @@ -421,6 +421,9 @@ extern const int fib_entry_get_dpo_for_source ( fib_node_index_t fib_entry_index, fib_source_t source, dpo_id_t *dpo); +extern fib_node_index_t fib_entry_get_path_list_for_source ( + fib_node_index_t fib_entry_index, + fib_source_t source); extern adj_index_t fib_entry_get_adj(fib_node_index_t fib_entry_index); diff --git a/src/vnet/fib/fib_entry_src.c b/src/vnet/fib/fib_entry_src.c index 39e719e6a7a..ff81f6bcddd 100644 --- a/src/vnet/fib/fib_entry_src.c +++ b/src/vnet/fib/fib_entry_src.c @@ -1797,6 +1797,25 @@ fib_entry_get_dpo_for_source (fib_node_index_t fib_entry_index, return (0); } +fib_node_index_t +fib_entry_get_path_list_for_source (fib_node_index_t fib_entry_index, + fib_source_t source) +{ + fib_entry_t *fib_entry; + fib_entry_src_t *esrc; + + if (FIB_NODE_INDEX_INVALID == fib_entry_index) + return FIB_NODE_INDEX_INVALID; + + fib_entry = fib_entry_get(fib_entry_index); + esrc = fib_entry_src_find(fib_entry, source); + + if (esrc) + return esrc->fes_pl; + + return FIB_NODE_INDEX_INVALID; +} + u32 fib_entry_get_resolving_interface_for_source (fib_node_index_t entry_index, fib_source_t source) |