diff options
| author | Sai Gomathi N <nsaigomathi@vmware.com> | 2022-06-08 23:56:17 -0700 |
|---|---|---|
| committer | Sai Gomathi N <nsaigomathi@vmware.com> | 2022-06-08 23:56:17 -0700 |
| commit | 342ba5f3bd32fe0f6df3aceb624a81d3ed365fc2 (patch) | |
| tree | 101901e10b7808cc958db4358b8d37da1a9ad358 /pimd/pim_cmd.c | |
| parent | 8282b988388af5598ef64af3950a785de515fce6 (diff) | |
pim6d: Moving the common lines of pim_show_interface_vrf_all cli
Moving the common lines of pim_show_interface_vrf_all 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/pim_cmd.c')
| -rw-r--r-- | pimd/pim_cmd.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 0d66b9e79b..6c8d2e3575 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -2444,34 +2444,8 @@ DEFPY (show_ip_pim_interface_vrf_all, "interface name\n" JSON_STR) { - bool uj = !!json; - bool is_mlag = !!mlag; - struct vrf *v; - json_object *json_parent = NULL; - json_object *json_vrf = NULL; - - if (uj) - json_parent = json_object_new_object(); - - RB_FOREACH (v, vrf_name_head, &vrfs_by_name) { - if (!uj) - vty_out(vty, "VRF: %s\n", v->name); - else - json_vrf = json_object_new_object(); - - if (interface) - pim_show_interfaces_single(v->info, vty, interface, - is_mlag, json_vrf); - else - pim_show_interfaces(v->info, vty, is_mlag, json_vrf); - - if (uj) - json_object_object_add(json_parent, v->name, json_vrf); - } - if (uj) - vty_json(vty, json_parent); - - return CMD_SUCCESS; + return pim_show_interface_vrf_all_cmd_helper(vty, !!json, !!mlag, + interface); } DEFPY (show_ip_pim_join, |
