mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 23:53:28 +00:00
pim6d: Implementing join-prune interval CLI
Adding "ipv6 pim join-prune interval (1-65535) Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
This commit is contained in:
parent
528311b5c8
commit
c73113ea9a
@ -43,7 +43,33 @@
|
|||||||
#include "pimd/pim6_cmd_clippy.c"
|
#include "pimd/pim6_cmd_clippy.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
DEFPY (ipv6_pim_joinprune_time,
|
||||||
|
ipv6_pim_joinprune_time_cmd,
|
||||||
|
"ipv6 pim join-prune-interval (1-65535)$jpi",
|
||||||
|
IPV6_STR
|
||||||
|
PIM_STR
|
||||||
|
"Join Prune Send Interval\n"
|
||||||
|
"Seconds\n")
|
||||||
|
{
|
||||||
|
return pim_process_join_prune_cmd(vty, jpi_str);
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFPY (no_ipv6_pim_joinprune_time,
|
||||||
|
no_ipv6_pim_joinprune_time_cmd,
|
||||||
|
"no ipv6 pim join-prune-interval [(1-65535)]",
|
||||||
|
NO_STR
|
||||||
|
IPV6_STR
|
||||||
|
PIM_STR
|
||||||
|
"Join Prune Send Interval\n"
|
||||||
|
IGNORED_IN_NO_STR)
|
||||||
|
{
|
||||||
|
return pim_process_no_join_prune_cmd(vty);
|
||||||
|
}
|
||||||
|
|
||||||
void pim_cmd_init(void)
|
void pim_cmd_init(void)
|
||||||
{
|
{
|
||||||
if_cmd_init(pim_interface_config_write);
|
if_cmd_init(pim_interface_config_write);
|
||||||
|
|
||||||
|
install_element(CONFIG_NODE, &ipv6_pim_joinprune_time_cmd);
|
||||||
|
install_element(CONFIG_NODE, &no_ipv6_pim_joinprune_time_cmd);
|
||||||
}
|
}
|
||||||
|
@ -6897,23 +6897,15 @@ DEFPY (pim_register_accept_list,
|
|||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (ip_pim_joinprune_time,
|
DEFPY (ip_pim_joinprune_time,
|
||||||
ip_pim_joinprune_time_cmd,
|
ip_pim_joinprune_time_cmd,
|
||||||
"ip pim join-prune-interval (1-65535)",
|
"ip pim join-prune-interval (1-65535)$jpi",
|
||||||
IP_STR
|
IP_STR
|
||||||
"pim multicast routing\n"
|
"pim multicast routing\n"
|
||||||
"Join Prune Send Interval\n"
|
"Join Prune Send Interval\n"
|
||||||
"Seconds\n")
|
"Seconds\n")
|
||||||
{
|
{
|
||||||
char xpath[XPATH_MAXLEN];
|
return pim_process_join_prune_cmd(vty, jpi_str);
|
||||||
|
|
||||||
snprintf(xpath, sizeof(xpath), FRR_PIM_ROUTER_XPATH,
|
|
||||||
"frr-routing:ipv4");
|
|
||||||
strlcat(xpath, "/join-prune-interval", sizeof(xpath));
|
|
||||||
|
|
||||||
nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY, argv[3]->arg);
|
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (no_ip_pim_joinprune_time,
|
DEFUN (no_ip_pim_joinprune_time,
|
||||||
@ -6925,15 +6917,7 @@ DEFUN (no_ip_pim_joinprune_time,
|
|||||||
"Join Prune Send Interval\n"
|
"Join Prune Send Interval\n"
|
||||||
IGNORED_IN_NO_STR)
|
IGNORED_IN_NO_STR)
|
||||||
{
|
{
|
||||||
char xpath[XPATH_MAXLEN];
|
return pim_process_no_join_prune_cmd(vty);
|
||||||
|
|
||||||
snprintf(xpath, sizeof(xpath), FRR_PIM_ROUTER_XPATH,
|
|
||||||
"frr-routing:ipv4");
|
|
||||||
strlcat(xpath, "/join-prune-interval", sizeof(xpath));
|
|
||||||
|
|
||||||
nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL);
|
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (ip_pim_register_suppress,
|
DEFUN (ip_pim_register_suppress,
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "lib/northbound_cli.h"
|
#include "lib/northbound_cli.h"
|
||||||
#include "pim_errors.h"
|
#include "pim_errors.h"
|
||||||
#include "pim_nb.h"
|
#include "pim_nb.h"
|
||||||
|
#include "pim_cmd_common.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get current node VRF name.
|
* 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");
|
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);
|
||||||
|
}
|
||||||
|
@ -21,4 +21,7 @@
|
|||||||
#define PIM_CMD_COMMON_H
|
#define PIM_CMD_COMMON_H
|
||||||
|
|
||||||
const char *pim_cli_get_vrf_name(struct vty *vty);
|
const char *pim_cli_get_vrf_name(struct vty *vty);
|
||||||
|
int pim_process_join_prune_cmd(struct vty *vty, const char *jpi_str);
|
||||||
|
int pim_process_no_join_prune_cmd(struct vty *vty);
|
||||||
|
|
||||||
#endif /* PIM_CMD_COMMON_H */
|
#endif /* PIM_CMD_COMMON_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user