From 80a6ee90c326acde82f07d8e5221b0c8010d3579 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 5 Dec 2020 07:06:38 -0500 Subject: [PATCH] zebra: Setup structure for opaque data to be displayed Setup the output mechanism for opaque data to be displayed to the end operator. Signed-off-by: Donald Sharp --- zebra/zebra_vty.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 072ed169b6..84f0c4c6be 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -419,6 +419,18 @@ static void show_nexthop_detail_helper(struct vty *vty, } } +static void zebra_show_ip_route_opaque(struct vty *vty, struct route_entry *re, + struct json_object *json) +{ + if (!re->opaque) + return; + + switch (re->type) { + default: + break; + } +} + /* New RIB. Detailed information for IPv4 route. */ static void vty_show_ip_route_detail(struct vty *vty, struct route_node *rn, int mcast, bool use_fib, bool show_ng) @@ -495,6 +507,8 @@ static void vty_show_ip_route_detail(struct vty *vty, struct route_node *rn, if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_HAS_BACKUP)) show_nh_backup_helper(vty, re, nexthop); } + zebra_show_ip_route_opaque(vty, re, NULL); + vty_out(vty, "\n"); } } @@ -927,6 +941,7 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn, json_object_object_add(json_route, "backupNexthops", json_nexthops); } + zebra_show_ip_route_opaque(NULL, re, json_route); json_object_array_add(json, json_route); return; -- 2.39.5