json_path = json_object_new_array();
if (detail)
- route_vty_out_detail(vty, bgp, &rn->p, pi,
+ route_vty_out_detail(vty, bgp, rn, pi,
AFI_L2VPN, SAFI_EVPN,
json_path);
else
if (json)
json_path = json_object_new_array();
- route_vty_out_detail(vty, bgp, &rn->p, pi, afi, safi,
+ route_vty_out_detail(vty, bgp, rn, pi, afi, safi,
json_path);
if (json)
if (json)
json_path = json_object_new_array();
- route_vty_out_detail(vty, bgp, &rn->p, pi, afi, safi,
+ route_vty_out_detail(vty, bgp, rn, pi, afi, safi,
json_path);
if (json)
if (json)
json_path = json_object_new_array();
- route_vty_out_detail(vty, bgp, &rn->p, pi, afi, safi,
+ route_vty_out_detail(vty, bgp, rn, pi, afi, safi,
json_path);
if (json)
if (json)
json_path = json_object_new_array();
- route_vty_out_detail(vty, bgp, &rn->p, pi, afi, safi,
+ route_vty_out_detail(vty, bgp, rn, pi, afi, safi,
json_path);
if (json)
if (detail) {
route_vty_out_detail(
- vty, bgp, &rn->p, pi, AFI_L2VPN,
+ vty, bgp, rn, pi, AFI_L2VPN,
SAFI_EVPN, json_path);
} else
route_vty_out(vty, &rn->p, pi, 0,
}
}
-void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct prefix *p,
- struct bgp_path_info *path, afi_t afi, safi_t safi,
- json_object *json_paths)
+void route_vty_out_detail(struct vty *vty, struct bgp *bgp,
+ struct bgp_node *bn, struct bgp_path_info *path,
+ afi_t afi, safi_t safi, json_object *json_paths)
{
char buf[INET6_ADDRSTRLEN];
char buf1[BUFSIZ];
if (!json_paths && safi == SAFI_EVPN) {
char tag_buf[30];
- bgp_evpn_route2str((struct prefix_evpn *)p, buf2, sizeof(buf2));
+ bgp_evpn_route2str((struct prefix_evpn *)&bn->p,
+ buf2, sizeof(buf2));
vty_out(vty, " Route %s", buf2);
tag_buf[0] = '\0';
if (path->extra && path->extra->num_labels) {
/* Line2 display Next-hop, Neighbor, Router-id */
/* Display the nexthop */
- if ((p->family == AF_INET || p->family == AF_ETHERNET
- || p->family == AF_EVPN)
+ if ((bn->p.family == AF_INET || bn->p.family == AF_ETHERNET
+ || bn->p.family == AF_EVPN)
&& (safi == SAFI_MPLS_VPN || safi == SAFI_ENCAP
|| safi == SAFI_EVPN
|| !BGP_ATTR_NEXTHOP_AFI_IP6(attr))) {
if (path->peer == bgp->peer_self) {
if (safi == SAFI_EVPN
- || (p->family == AF_INET
+ || (bn->p.family == AF_INET
&& !BGP_ATTR_NEXTHOP_AFI_IP6(attr))) {
if (json_paths)
json_object_string_add(
BGP_PATH_MULTIPATH)
|| CHECK_FLAG(pi->flags,
BGP_PATH_SELECTED))))
- route_vty_out_detail(vty, bgp, &rm->p,
+ route_vty_out_detail(vty, bgp, rm,
pi, AFI_IP, safi,
json_paths);
}
pi->flags,
BGP_PATH_SELECTED))))
route_vty_out_detail(
- vty, bgp, &rn->p, pi,
+ vty, bgp, rn, pi,
afi, safi, json_paths);
}
}
struct prefix_rd *prd, afi_t afi,
safi_t safi, json_object *json);
extern void route_vty_out_detail(struct vty *vty, struct bgp *bgp,
- struct prefix *p, struct bgp_path_info *path,
+ struct bgp_node *bn,
+ struct bgp_path_info *path,
afi_t afi, safi_t safi,
json_object *json_paths);
extern int bgp_show_table_rd(struct vty *vty, struct bgp *bgp, safi_t safi,