mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 00:59:13 +00:00
pimd: PIM BSM Processing g2rp timer start and expiry routine(dummy)
Expiry routine to be updated in later commit Signed-off-by: Saravanan K <saravanank@vmware.com>
This commit is contained in:
parent
23255dfd2a
commit
a5164e9790
@ -32,6 +32,9 @@
|
||||
|
||||
/* Functions forward declaration */
|
||||
static void pim_bs_timer_start(struct bsm_scope *scope, int bs_timeout);
|
||||
static void pim_g2rp_timer_start(struct bsm_rpinfo *bsrp, int hold_time);
|
||||
static inline void pim_g2rp_timer_restart(struct bsm_rpinfo *bsrp,
|
||||
int hold_time);
|
||||
|
||||
/* Memory Types */
|
||||
DEFINE_MTYPE_STATIC(PIMD, PIM_BSGRP_NODE, "PIM BSR advertised grp info")
|
||||
@ -133,6 +136,41 @@ void pim_bsm_proc_free(struct pim_instance *pim)
|
||||
route_table_finish(pim->global_scope.bsrp_table);
|
||||
}
|
||||
|
||||
static int pim_on_g2rp_timer(struct thread *t)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void pim_g2rp_timer_start(struct bsm_rpinfo *bsrp, int hold_time)
|
||||
{
|
||||
if (!bsrp) {
|
||||
if (PIM_DEBUG_BSM)
|
||||
zlog_debug("%s : Invalid brsp(NULL).",
|
||||
__PRETTY_FUNCTION__);
|
||||
return;
|
||||
}
|
||||
THREAD_OFF(bsrp->g2rp_timer);
|
||||
if (PIM_DEBUG_BSM) {
|
||||
char buf[48];
|
||||
|
||||
zlog_debug(
|
||||
"%s : starting g2rp timer for grp: %s - rp: %s with timeout %d secs(Actual Hold time : %d secs)",
|
||||
__PRETTY_FUNCTION__,
|
||||
prefix2str(&bsrp->bsgrp_node->group, buf, 48),
|
||||
inet_ntoa(bsrp->rp_address), hold_time,
|
||||
bsrp->rp_holdtime);
|
||||
}
|
||||
|
||||
thread_add_timer(router->master, pim_on_g2rp_timer, bsrp, hold_time,
|
||||
&bsrp->g2rp_timer);
|
||||
}
|
||||
|
||||
static inline void pim_g2rp_timer_restart(struct bsm_rpinfo *bsrp,
|
||||
int hold_time)
|
||||
{
|
||||
pim_g2rp_timer_start(bsrp, hold_time);
|
||||
}
|
||||
|
||||
struct bsgrp_node *pim_bsm_get_bsgrp_node(struct bsm_scope *scope,
|
||||
struct prefix *grp)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user