summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2016-02-23 04:17:09 +0000
committervivek <vivek@cumulusnetworks.com>2016-02-23 04:17:09 +0000
commita815b7881e166a5dcf3adf9035a1b2c6fd22adc3 (patch)
tree1eaadb94012ed7ce471431670a634d9c7677feea /zebra/interface.c
parent9ec6b0bb0e020f15336b43cf2d4781f5ddbb836e (diff)
Zebra: Zebra: Display interface info for NHT in a VRF
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Ticket: CM-9458 Reviewed By: CCR-4150 Testing Done: Manual
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 8b25c33f17..7b19379910 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -183,6 +183,14 @@ if_lookup_by_index_per_ns (struct zebra_ns *ns, u_int32_t ifindex)
return ifp;
}
+const char *
+ifindex2ifname_per_ns (struct zebra_ns *zns, unsigned int ifindex)
+{
+ struct interface *ifp;
+
+ return ((ifp = if_lookup_by_index_per_ns (zns, ifindex)) != NULL) ?
+ ifp->name : "unknown";
+}
/* Tie an interface address to its derived subnet list of addresses. */
int