diff options
| author | Mobashshera Rasool <mrasool@vmware.com> | 2022-01-19 00:06:41 -0800 |
|---|---|---|
| committer | Mobashshera Rasool <mrasool@vmware.com> | 2022-02-28 01:38:41 -0800 |
| commit | c73113ea9a888f830d1e4972ccce349bc3c7bc16 (patch) | |
| tree | aaed12de68a84e7a53e90cfc0a8e8f04bf1a2e5f /pimd/pim_cmd_common.c | |
| parent | 528311b5c8aedc397d6b8f7da3a35a56585c2311 (diff) | |
pim6d: Implementing join-prune interval CLI
Adding "ipv6 pim join-prune interval (1-65535)
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
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 a85a2f0b4d..395719d150 100644 --- a/pimd/pim_cmd_common.c +++ b/pimd/pim_cmd_common.c @@ -36,6 +36,7 @@ #include "lib/northbound_cli.h" #include "pim_errors.h" #include "pim_nb.h" +#include "pim_cmd_common.h" /** * Get current node VRF name. @@ -62,3 +63,28 @@ const char *pim_cli_get_vrf_name(struct vty *vty) return yang_dnode_get_string(vrf_node, "./name"); } +int pim_process_join_prune_cmd(struct vty *vty, const char *jpi_str) +{ + char xpath[XPATH_MAXLEN]; + + snprintf(xpath, sizeof(xpath), FRR_PIM_ROUTER_XPATH, + FRR_PIM_AF_XPATH_VAL); + strlcat(xpath, "/join-prune-interval", sizeof(xpath)); + + nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY, jpi_str); + + return nb_cli_apply_changes(vty, NULL); +} + +int pim_process_no_join_prune_cmd(struct vty *vty) +{ + char xpath[XPATH_MAXLEN]; + + snprintf(xpath, sizeof(xpath), FRR_PIM_ROUTER_XPATH, + FRR_PIM_AF_XPATH_VAL); + strlcat(xpath, "/join-prune-interval", sizeof(xpath)); + + nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); + + return nb_cli_apply_changes(vty, NULL); +} |
