"PIM interface local-membership\n"
JSON_STR)
{
- struct vrf *v;
- bool uj = !!json;
-
- v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
-
- if (!v)
- return CMD_WARNING;
-
- pim_show_membership(v->info, vty, uj);
-
- return CMD_SUCCESS;
+ return pim_show_membership_cmd_helper(vrf, vty, !!json);
}
DEFPY (show_ipv6_pim_neighbor,
"PIM interface local-membership\n"
JSON_STR)
{
- struct vrf *v;
- bool uj = !!json;
-
- v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
-
- if (!v)
- return CMD_WARNING;
-
- pim_show_membership(v->info, vty, uj);
-
- return CMD_SUCCESS;
+ return pim_show_membership_cmd_helper(vrf, vty, !!json);
}
static void pim_show_mlag_up_entry_detail(struct vrf *vrf,
}
}
+int pim_show_membership_cmd_helper(const char *vrf, struct vty *vty, bool uj)
+{
+ struct vrf *v;
+
+ v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
+
+ if (!v)
+ return CMD_WARNING;
+
+ pim_show_membership(v->info, vty, uj);
+
+ return CMD_SUCCESS;
+}
+
static void pim_show_membership_helper(struct vty *vty,
struct pim_interface *pim_ifp,
struct pim_ifchannel *ch,
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);
+int pim_show_membership_cmd_helper(const char *vrf, struct vty *vty, bool uj);
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);
int pim_show_channel_cmd_helper(const char *vrf, struct vty *vty, bool uj);