mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 12:52:49 +00:00
pimd: Northbound implementation for pim router commands.
ip_pim_joinprune_time no_ip_pim_joinprune_time ip_pim_register_suppress no_ip_pim_register_suppress ip_pim_packets no_ip_pim_packets Yang Model: module: frr-pim +--rw pim +--rw packets? uint8 <3> +--rw join-prune-interval? uint16 <60> +--rw register-suppress-time? uint16 <60> Signed-off-by: Sarita Patra <saritap@vmware.com>
This commit is contained in:
parent
675c8fdef0
commit
d27b7884fb
@ -6848,9 +6848,10 @@ DEFUN (ip_pim_joinprune_time,
|
||||
"Join Prune Send Interval\n"
|
||||
"Seconds\n")
|
||||
{
|
||||
PIM_DECLVAR_CONTEXT(vrf, pim);
|
||||
router->t_periodic = atoi(argv[3]->arg);
|
||||
return CMD_SUCCESS;
|
||||
nb_cli_enqueue_change(vty, "/frr-pim:pim/join-prune-interval",
|
||||
NB_OP_MODIFY, argv[3]->arg);
|
||||
|
||||
return nb_cli_apply_changes(vty, NULL);
|
||||
}
|
||||
|
||||
DEFUN (no_ip_pim_joinprune_time,
|
||||
@ -6862,9 +6863,15 @@ DEFUN (no_ip_pim_joinprune_time,
|
||||
"Join Prune Send Interval\n"
|
||||
"Seconds\n")
|
||||
{
|
||||
PIM_DECLVAR_CONTEXT(vrf, pim);
|
||||
router->t_periodic = PIM_DEFAULT_T_PERIODIC;
|
||||
return CMD_SUCCESS;
|
||||
char jp_default_timer[5];
|
||||
|
||||
snprintf(jp_default_timer, sizeof(jp_default_timer), "%d",
|
||||
PIM_DEFAULT_T_PERIODIC);
|
||||
|
||||
nb_cli_enqueue_change(vty, "/frr-pim:pim/join-prune-interval",
|
||||
NB_OP_MODIFY, jp_default_timer);
|
||||
|
||||
return nb_cli_apply_changes(vty, NULL);
|
||||
}
|
||||
|
||||
DEFUN (ip_pim_register_suppress,
|
||||
@ -6875,9 +6882,10 @@ DEFUN (ip_pim_register_suppress,
|
||||
"Register Suppress Timer\n"
|
||||
"Seconds\n")
|
||||
{
|
||||
PIM_DECLVAR_CONTEXT(vrf, pim);
|
||||
router->register_suppress_time = atoi(argv[3]->arg);
|
||||
return CMD_SUCCESS;
|
||||
nb_cli_enqueue_change(vty, "/frr-pim:pim/register-suppress-time",
|
||||
NB_OP_MODIFY, argv[3]->arg);
|
||||
|
||||
return nb_cli_apply_changes(vty, NULL);
|
||||
}
|
||||
|
||||
DEFUN (no_ip_pim_register_suppress,
|
||||
@ -6889,9 +6897,15 @@ DEFUN (no_ip_pim_register_suppress,
|
||||
"Register Suppress Timer\n"
|
||||
"Seconds\n")
|
||||
{
|
||||
PIM_DECLVAR_CONTEXT(vrf, pim);
|
||||
router->register_suppress_time = PIM_REGISTER_SUPPRESSION_TIME_DEFAULT;
|
||||
return CMD_SUCCESS;
|
||||
char rs_default_timer[5];
|
||||
|
||||
snprintf(rs_default_timer, sizeof(rs_default_timer), "%d",
|
||||
PIM_REGISTER_SUPPRESSION_TIME_DEFAULT);
|
||||
|
||||
nb_cli_enqueue_change(vty, "/frr-pim:pim/register-suppress-time",
|
||||
NB_OP_MODIFY, rs_default_timer);
|
||||
|
||||
return nb_cli_apply_changes(vty, NULL);
|
||||
}
|
||||
|
||||
DEFUN (ip_pim_rp_keep_alive,
|
||||
@ -6958,9 +6972,10 @@ DEFUN (ip_pim_packets,
|
||||
"packets to process at one time per fd\n"
|
||||
"Number of packets\n")
|
||||
{
|
||||
PIM_DECLVAR_CONTEXT(vrf, pim);
|
||||
router->packet_process = atoi(argv[3]->arg);
|
||||
return CMD_SUCCESS;
|
||||
nb_cli_enqueue_change(vty, "/frr-pim:pim/packets", NB_OP_MODIFY,
|
||||
argv[3]->arg);
|
||||
|
||||
return nb_cli_apply_changes(vty, NULL);
|
||||
}
|
||||
|
||||
DEFUN (no_ip_pim_packets,
|
||||
@ -6972,9 +6987,15 @@ DEFUN (no_ip_pim_packets,
|
||||
"packets to process at one time per fd\n"
|
||||
"Number of packets\n")
|
||||
{
|
||||
PIM_DECLVAR_CONTEXT(vrf, pim);
|
||||
router->packet_process = PIM_DEFAULT_PACKET_PROCESS;
|
||||
return CMD_SUCCESS;
|
||||
char default_packet[3];
|
||||
|
||||
snprintf(default_packet, sizeof(default_packet), "%d",
|
||||
PIM_DEFAULT_PACKET_PROCESS);
|
||||
|
||||
nb_cli_enqueue_change(vty, "/frr-pim:pim/packets", NB_OP_MODIFY,
|
||||
default_packet);
|
||||
|
||||
return nb_cli_apply_changes(vty, NULL);
|
||||
}
|
||||
|
||||
DEFPY (igmp_group_watermark,
|
||||
|
@ -390,8 +390,10 @@ int pim_packets_modify(struct nb_cb_modify_args *args)
|
||||
case NB_EV_VALIDATE:
|
||||
case NB_EV_PREPARE:
|
||||
case NB_EV_ABORT:
|
||||
break;
|
||||
case NB_EV_APPLY:
|
||||
/* TODO: implement me. */
|
||||
router->packet_process = yang_dnode_get_uint8(args->dnode,
|
||||
NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -407,8 +409,9 @@ int pim_join_prune_interval_modify(struct nb_cb_modify_args *args)
|
||||
case NB_EV_VALIDATE:
|
||||
case NB_EV_PREPARE:
|
||||
case NB_EV_ABORT:
|
||||
break;
|
||||
case NB_EV_APPLY:
|
||||
/* TODO: implement me. */
|
||||
router->t_periodic = yang_dnode_get_uint16(args->dnode, NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -420,12 +423,18 @@ int pim_join_prune_interval_modify(struct nb_cb_modify_args *args)
|
||||
*/
|
||||
int pim_register_suppress_time_modify(struct nb_cb_modify_args *args)
|
||||
{
|
||||
struct vrf *vrf;
|
||||
struct pim_instance *pim;
|
||||
|
||||
switch (args->event) {
|
||||
case NB_EV_VALIDATE:
|
||||
case NB_EV_PREPARE:
|
||||
case NB_EV_ABORT:
|
||||
break;
|
||||
case NB_EV_APPLY:
|
||||
/* TODO: implement me. */
|
||||
vrf = nb_running_get_entry(args->dnode, NULL, true);
|
||||
pim = vrf->info;
|
||||
pim->keep_alive_time = yang_dnode_get_uint16(args->dnode, NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user