mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 04:14:19 +00:00
pim6d: Moving the common lines of pim_show_jp_agg cli
Moving the common lines of pim_show_jp_agg cli in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
This commit is contained in:
parent
342ba5f3bd
commit
3ca4082343
@ -1363,25 +1363,7 @@ DEFPY (show_ipv6_pim_jp_agg,
|
||||
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,
|
||||
|
@ -2540,25 +2540,7 @@ DEFPY (show_ip_pim_jp_agg,
|
||||
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,
|
||||
|
@ -1701,6 +1701,29 @@ static void pim_show_jp_agg_helper(struct vty *vty, struct interface *ifp,
|
||||
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;
|
||||
|
@ -85,6 +85,7 @@ void pim_print_ifp_flags(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);
|
||||
|
Loading…
Reference in New Issue
Block a user