mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 14:29:47 +00:00
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 <sharpd@nvidia.com>
This commit is contained in:
parent
a29a60016e
commit
80a6ee90c3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user