diff options
| author | Sai Gomathi N <nsaigomathi@vmware.com> | 2022-06-09 01:34:06 -0700 |
|---|---|---|
| committer | Sai Gomathi N <nsaigomathi@vmware.com> | 2022-06-09 01:34:06 -0700 |
| commit | 154aa4fcd42743f9f0bc370489ed28e78fb27262 (patch) | |
| tree | 11160fbc4052e716c9c1249f2535030b7dceec58 /pimd/pim6_cmd.c | |
| parent | bec5bdbe7f3b33efe69d624a07cb9c799c135115 (diff) | |
pim6d: Moving the common lines of pim_show_neighbors cli
Moving the common lines of pim_show_neighbors cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Diffstat (limited to 'pimd/pim6_cmd.c')
| -rw-r--r-- | pimd/pim6_cmd.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c index 3fb36eae71..764e8059a9 100644 --- a/pimd/pim6_cmd.c +++ b/pimd/pim6_cmd.c @@ -1391,26 +1391,7 @@ DEFPY (show_ipv6_pim_neighbor, "Name of interface or neighbor\n" JSON_STR) { - struct vrf *v; - json_object *json_parent = NULL; - - v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME); - - if (!v) - return CMD_WARNING; - - if (json) - json_parent = json_object_new_object(); - - if (interface) - pim_show_neighbors_single(v->info, vty, interface, json_parent); - else - pim_show_neighbors(v->info, vty, json_parent); - - if (json) - vty_json(vty, json_parent); - - return CMD_SUCCESS; + return pim_show_neighbors_cmd_helper(vrf, vty, json, interface); } DEFPY (show_ipv6_pim_neighbor_vrf_all, |
