Prints the SAFI_MULTICAST NHT state in zebra.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
}
}
-void zebra_print_rnh_table(vrf_id_t vrfid, afi_t afi, struct vty *vty,
- struct prefix *p)
+void zebra_print_rnh_table(vrf_id_t vrfid, afi_t afi, safi_t safi,
+ struct vty *vty, struct prefix *p)
{
struct route_table *table;
struct route_node *rn;
- table = get_rnh_table(vrfid, afi, SAFI_UNICAST);
+ table = get_rnh_table(vrfid, afi, safi);
if (!table) {
if (IS_ZEBRA_DEBUG_NHT)
zlog_debug("print_rnhs: rnh table not found");
extern void zebra_remove_rnh_client(struct rnh *rnh, struct zserv *client);
extern void zebra_evaluate_rnh(struct zebra_vrf *zvrf, afi_t afi, int force,
struct prefix *p, safi_t safi);
-extern void zebra_print_rnh_table(vrf_id_t vrfid, afi_t afi, struct vty *vty,
- struct prefix *p);
+extern void zebra_print_rnh_table(vrf_id_t vrfid, afi_t afi, safi_t safi,
+ struct vty *vty, struct prefix *p);
extern int rnh_resolve_via_default(struct zebra_vrf *zvrf, int family);
DEFPY (show_ip_nht,
show_ip_nht_cmd,
- "show <ip$ipv4|ipv6$ipv6> <nht|import-check>$type [<A.B.C.D|X:X::X:X>$addr|vrf NAME$vrf_name [<A.B.C.D|X:X::X:X>$addr]|vrf all$vrf_all]",
+ "show <ip$ipv4|ipv6$ipv6> <nht|import-check>$type [<A.B.C.D|X:X::X:X>$addr|vrf NAME$vrf_name [<A.B.C.D|X:X::X:X>$addr]|vrf all$vrf_all] [mrib$mrib]",
SHOW_STR
IP_STR
IP6_STR
VRF_CMD_HELP_STR
"IPv4 Address\n"
"IPv6 Address\n"
- VRF_ALL_CMD_HELP_STR)
+ VRF_ALL_CMD_HELP_STR
+ "Show Multicast (MRIB) NHT state\n")
{
afi_t afi = ipv4 ? AFI_IP : AFI_IP6;
vrf_id_t vrf_id = VRF_DEFAULT;
struct prefix prefix, *p = NULL;
+ safi_t safi = mrib ? SAFI_MULTICAST : SAFI_UNICAST;
if (vrf_all) {
struct vrf *vrf;
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
if ((zvrf = vrf->info) != NULL) {
vty_out(vty, "\nVRF %s:\n", zvrf_name(zvrf));
- zebra_print_rnh_table(zvrf_id(zvrf), afi, vty,
- NULL);
+ zebra_print_rnh_table(zvrf_id(zvrf), afi, safi,
+ vty, NULL);
}
return CMD_SUCCESS;
}
return CMD_WARNING;
}
- zebra_print_rnh_table(vrf_id, afi, vty, p);
+ zebra_print_rnh_table(vrf_id, afi, safi, vty, p);
return CMD_SUCCESS;
}