VRF_CMD_HELP_STR
"PIM cached nexthop rpf information\n")
{
- struct vrf *v;
-
- v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
-
- if (!v)
- return CMD_WARNING;
-
- pim_show_nexthop(v->info, vty);
-
- return CMD_SUCCESS;
+ return pim_show_nexthop_cmd_helper(vrf, vty);
}
DEFPY (show_ipv6_pim_nexthop_lookup,
VRF_CMD_HELP_STR
"PIM cached nexthop rpf information\n")
{
- struct vrf *v;
-
- v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
-
- if (!v)
- return CMD_WARNING;
-
- pim_show_nexthop(v->info, vty);
-
- return CMD_SUCCESS;
+ return pim_show_nexthop_cmd_helper(vrf, vty);
}
DEFPY (show_ip_pim_nexthop_lookup,
return CMD_SUCCESS;
}
+int pim_show_nexthop_cmd_helper(const char *vrf, struct vty *vty)
+{
+ struct vrf *v;
+
+ v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
+
+ if (!v)
+ return CMD_WARNING;
+
+ pim_show_nexthop(v->info, vty);
+
+ return CMD_SUCCESS;
+}
+
void pim_show_nexthop(struct pim_instance *pim, struct vty *vty)
{
struct pnc_cache_walk_data cwd;
json_object *json);
void ip_pim_ssm_show_group_range(struct pim_instance *pim, struct vty *vty,
bool uj);
+int pim_show_nexthop_cmd_helper(const char *vrf, struct vty *vty);
void pim_show_nexthop(struct pim_instance *pim, struct vty *vty);
int pim_show_neighbors_cmd_helper(const char *vrf, struct vty *vty,
const char *json, const char *interface);