mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 09:30:30 +00:00
pim6d: Moving the common lines of pim_show_nexthop cli
Moving the common lines of pim_show_nexthop 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
78b0e69073
commit
cefa37cf41
@ -1418,16 +1418,7 @@ DEFPY (show_ipv6_pim_nexthop,
|
|||||||
VRF_CMD_HELP_STR
|
VRF_CMD_HELP_STR
|
||||||
"PIM cached nexthop rpf information\n")
|
"PIM cached nexthop rpf information\n")
|
||||||
{
|
{
|
||||||
struct vrf *v;
|
return pim_show_nexthop_cmd_helper(vrf, vty);
|
||||||
|
|
||||||
v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
|
|
||||||
|
|
||||||
if (!v)
|
|
||||||
return CMD_WARNING;
|
|
||||||
|
|
||||||
pim_show_nexthop(v->info, vty);
|
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFPY (show_ipv6_pim_nexthop_lookup,
|
DEFPY (show_ipv6_pim_nexthop_lookup,
|
||||||
|
@ -3284,16 +3284,7 @@ DEFPY (show_ip_pim_nexthop,
|
|||||||
VRF_CMD_HELP_STR
|
VRF_CMD_HELP_STR
|
||||||
"PIM cached nexthop rpf information\n")
|
"PIM cached nexthop rpf information\n")
|
||||||
{
|
{
|
||||||
struct vrf *v;
|
return pim_show_nexthop_cmd_helper(vrf, vty);
|
||||||
|
|
||||||
v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
|
|
||||||
|
|
||||||
if (!v)
|
|
||||||
return CMD_WARNING;
|
|
||||||
|
|
||||||
pim_show_nexthop(v->info, vty);
|
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFPY (show_ip_pim_nexthop_lookup,
|
DEFPY (show_ip_pim_nexthop_lookup,
|
||||||
|
@ -2597,6 +2597,20 @@ static int pim_print_pnc_cache_walkcb(struct hash_bucket *bucket, void *arg)
|
|||||||
return CMD_SUCCESS;
|
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)
|
void pim_show_nexthop(struct pim_instance *pim, struct vty *vty)
|
||||||
{
|
{
|
||||||
struct pnc_cache_walk_data cwd;
|
struct pnc_cache_walk_data cwd;
|
||||||
|
@ -102,6 +102,7 @@ void pim_show_interfaces_single(struct pim_instance *pim, struct vty *vty,
|
|||||||
json_object *json);
|
json_object *json);
|
||||||
void ip_pim_ssm_show_group_range(struct pim_instance *pim, struct vty *vty,
|
void ip_pim_ssm_show_group_range(struct pim_instance *pim, struct vty *vty,
|
||||||
bool uj);
|
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);
|
void pim_show_nexthop(struct pim_instance *pim, struct vty *vty);
|
||||||
int pim_show_neighbors_cmd_helper(const char *vrf, struct vty *vty,
|
int pim_show_neighbors_cmd_helper(const char *vrf, struct vty *vty,
|
||||||
const char *json, const char *interface);
|
const char *json, const char *interface);
|
||||||
|
Loading…
Reference in New Issue
Block a user