VRF_CMD_HELP_STR
"join prune aggregation list\n")
{
- struct vrf *v;
- struct pim_instance *pim;
-
- v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
-
- if (!v) {
- vty_out(vty, "%% Vrf specified: %s does not exist\n", vrf);
- return CMD_WARNING;
- }
- pim = pim_get_pim_instance(v->vrf_id);
-
- if (!pim) {
- vty_out(vty, "%% Unable to find pim instance\n");
- return CMD_WARNING;
- }
-
- pim_show_jp_agg_list(pim, vty);
-
- return CMD_SUCCESS;
+ return pim_show_jp_agg_list_cmd_helper(vrf, vty);
}
DEFPY (show_ipv6_pim_local_membership,
VRF_CMD_HELP_STR
"join prune aggregation list\n")
{
- struct vrf *v;
- struct pim_instance *pim;
-
- v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
-
- if (!v) {
- vty_out(vty, "%% Vrf specified: %s does not exist\n", vrf);
- return CMD_WARNING;
- }
- pim = pim_get_pim_instance(v->vrf_id);
-
- if (!pim) {
- vty_out(vty, "%% Unable to find pim instance\n");
- return CMD_WARNING;
- }
-
- pim_show_jp_agg_list(pim, vty);
-
- return CMD_SUCCESS;
+ return pim_show_jp_agg_list_cmd_helper(vrf, vty);
}
DEFPY (show_ip_pim_local_membership,
is_join ? "J" : "P");
}
+int pim_show_jp_agg_list_cmd_helper(const char *vrf, struct vty *vty)
+{
+ struct vrf *v;
+ struct pim_instance *pim;
+
+ v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
+
+ if (!v) {
+ vty_out(vty, "%% Vrf specified: %s does not exist\n", vrf);
+ return CMD_WARNING;
+ }
+ pim = pim_get_pim_instance(v->vrf_id);
+
+ if (!pim) {
+ vty_out(vty, "%% Unable to find pim instance\n");
+ return CMD_WARNING;
+ }
+
+ pim_show_jp_agg_list(pim, vty);
+
+ return CMD_SUCCESS;
+}
+
void pim_show_jp_agg_list(struct pim_instance *pim, struct vty *vty)
{
struct interface *ifp;
void json_object_pim_upstream_add(json_object *json, struct pim_upstream *up);
void pim_show_join(struct pim_instance *pim, struct vty *vty, pim_sgaddr *sg,
json_object *json);
+int pim_show_jp_agg_list_cmd_helper(const char *vrf, struct vty *vty);
void pim_show_jp_agg_list(struct pim_instance *pim, struct vty *vty);
void pim_show_membership(struct pim_instance *pim, struct vty *vty, bool uj);
void pim_show_channel(struct pim_instance *pim, struct vty *vty, bool uj);