const struct prefix *longer_prefix_p,
bool supernets_only, int type,
unsigned short ospf_instance_id, uint32_t tableid,
- struct route_show_ctx *ctx);
+ bool show_ng, struct route_show_ctx *ctx);
static void vty_show_ip_route_detail(struct vty *vty, struct route_node *rn,
int mcast, bool use_fib, bool show_ng);
static void vty_show_ip_route_summary(struct vty *vty,
};
return do_show_ip_route(vty, VRF_DEFAULT_NAME, AFI_IP, SAFI_MULTICAST,
- false, uj, 0, NULL, false, 0, 0, 0, &ctx);
+ false, uj, 0, NULL, false, 0, 0, 0, false,
+ &ctx);
}
DEFUN (show_ip_rpf_addr,
static void vty_show_ip_route(struct vty *vty, struct route_node *rn,
struct route_entry *re, json_object *json,
- bool is_fib)
+ bool is_fib, bool show_ng)
{
const struct nexthop *nexthop;
int len = 0;
len += vty_out(vty, " [%u/%u]", re->distance,
re->metric);
+ if (show_ng)
+ len += vty_out(vty, " (%u)", re->nhe_id);
+
/* Nexthop information. */
for (ALL_NEXTHOPS_PTR(nhg, nexthop)) {
if (first_p) {
*/
if (use_fib && re != dest->selected_fib)
continue;
- vty_show_ip_route(vty, rn, re, json_prefix, use_fib);
+ vty_show_ip_route(vty, rn, re, json_prefix, use_fib, false);
}
prefix2str(&rn->p, buf, sizeof(buf));
const struct prefix *longer_prefix_p,
bool supernets_only, int type,
unsigned short ospf_instance_id, bool use_json,
- uint32_t tableid, struct route_show_ctx *ctx)
+ uint32_t tableid, bool show_ng,
+ struct route_show_ctx *ctx)
{
struct route_node *rn;
struct route_entry *re;
first = 0;
}
- vty_show_ip_route(vty, rn, re, json_prefix, use_fib);
+ vty_show_ip_route(vty, rn, re, json_prefix, use_fib,
+ show_ng);
}
if (json_prefix) {
route_tag_t tag,
const struct prefix *longer_prefix_p,
bool supernets_only, int type,
- unsigned short ospf_instance_id,
+ unsigned short ospf_instance_id, bool show_ng,
struct route_show_ctx *ctx)
{
struct zebra_router_table *zrt;
do_show_ip_route(vty, zvrf_name(zvrf), afi, SAFI_UNICAST,
use_fib, use_json, tag, longer_prefix_p,
supernets_only, type, ospf_instance_id,
- zrt->tableid, ctx);
+ zrt->tableid, show_ng, ctx);
}
}
const struct prefix *longer_prefix_p,
bool supernets_only, int type,
unsigned short ospf_instance_id, uint32_t tableid,
- struct route_show_ctx *ctx)
+ bool show_ng, struct route_show_ctx *ctx)
{
struct route_table *table;
struct zebra_vrf *zvrf = NULL;
do_show_route_helper(vty, zvrf, table, afi, use_fib, tag,
longer_prefix_p, supernets_only, type,
- ospf_instance_id, use_json, tableid, ctx);
+ ospf_instance_id, use_json, tableid, show_ng, ctx);
return CMD_SUCCESS;
}
}]\
[" FRR_IP6_REDIST_STR_ZEBRA "$type_str]\
>\
- [json$json]",
+ [<json$json|nexthop-group$ng>]",
SHOW_STR
IP_STR
"IP forwarding table\n"
"IPv6 prefix\n"
"Show route matching the specified Network/Mask pair only\n"
FRR_IP6_REDIST_HELP_STR_ZEBRA
- JSON_STR)
+ JSON_STR
+ "Nexthop Group Information\n")
{
afi_t afi = ipv4 ? AFI_IP : AFI_IP6;
struct vrf *vrf;
continue;
if (table_all)
- do_show_ip_route_all(vty, zvrf, afi, !!fib,
- !!json, tag,
- prefix_str ? prefix : NULL,
- !!supernets_only, type,
- ospf_instance_id, &ctx);
+ do_show_ip_route_all(
+ vty, zvrf, afi, !!fib, !!json, tag,
+ prefix_str ? prefix : NULL,
+ !!supernets_only, type,
+ ospf_instance_id, !!ng, &ctx);
else
- do_show_ip_route(vty, zvrf_name(zvrf), afi,
- SAFI_UNICAST, !!fib, !!json,
- tag,
- prefix_str ? prefix : NULL,
- !!supernets_only, type,
- ospf_instance_id, table, &ctx);
+ do_show_ip_route(
+ vty, zvrf_name(zvrf), afi, SAFI_UNICAST,
+ !!fib, !!json, tag,
+ prefix_str ? prefix : NULL,
+ !!supernets_only, type,
+ ospf_instance_id, table, !!ng, &ctx);
}
} else {
vrf_id_t vrf_id = VRF_DEFAULT;
do_show_ip_route_all(vty, zvrf, afi, !!fib, !!json, tag,
prefix_str ? prefix : NULL,
!!supernets_only, type,
- ospf_instance_id, &ctx);
+ ospf_instance_id, !!ng, &ctx);
else
do_show_ip_route(vty, vrf->name, afi, SAFI_UNICAST,
!!fib, !!json, tag,
prefix_str ? prefix : NULL,
!!supernets_only, type,
- ospf_instance_id, table, &ctx);
+ ospf_instance_id, table, !!ng, &ctx);
}
return CMD_SUCCESS;
vty_out(vty, SHOW_ROUTE_V6_HEADER);
first = 0;
}
- vty_show_ip_route(vty, rn, re, NULL, false);
+ vty_show_ip_route(vty, rn, re, NULL, false, false);
}
return CMD_SUCCESS;
}
vty_out(vty, SHOW_ROUTE_V6_HEADER);
first = 0;
}
- vty_show_ip_route(vty, rn, re, NULL, false);
+ vty_show_ip_route(vty, rn, re, NULL, false,
+ false);
}
}
return CMD_SUCCESS;