diff options
Diffstat (limited to 'pimd/pim_cmd_common.c')
| -rw-r--r-- | pimd/pim_cmd_common.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c index 303c9abe13..46f48e91a1 100644 --- a/pimd/pim_cmd_common.c +++ b/pimd/pim_cmd_common.c @@ -3887,3 +3887,29 @@ int pim_show_secondary_helper(const char *vrf, struct vty *vty) return CMD_SUCCESS; } + +int pim_show_statistics_helper(const char *vrf, struct vty *vty, + const char *word, bool uj) +{ + struct pim_instance *pim; + struct vrf *v; + + v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME); + + if (!v) + 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; + } + + if (word) + pim_show_statistics(pim, vty, word, uj); + else + pim_show_statistics(pim, vty, NULL, uj); + + return CMD_SUCCESS; +} |
