pim_br->pmbr = br;
}
+/*
+ * Remove the (S,G) from the stored values
+ */
+void
+pim_br_clear_pmbr (struct in_addr source, struct in_addr group)
+{
+ struct listnode *node, *next;
+ struct pim_br *pim_br;
+
+ for (ALL_LIST_ELEMENTS (pim_br_list, node, next, pim_br)) {
+ if (source.s_addr == pim_br->source.s_addr &&
+ group.s_addr == pim_br->group.s_addr)
+ break;
+ }
+
+ if (!pim_br)
+ return;
+
+ listnode_delete (pim_br_list, pim_br);
+}
void pim_br_init (void)
{
struct in_addr pim_br_get_pmbr (struct in_addr source, struct in_addr group);
void pim_br_set_pmbr (struct in_addr source, struct in_addr group, struct in_addr value);
+void pim_br_clear_pmbr (struct in_addr source, struct in_addr group);
void pim_br_init (void);
#include "pim_oil.h"
#include "pim_macro.h"
#include "pim_rp.h"
+#include "pim_br.h"
static void join_timer_start(struct pim_upstream *up);
static void pim_upstream_update_assert_tracking_desired(struct pim_upstream *up);
void pim_upstream_delete(struct pim_upstream *up)
{
THREAD_OFF(up->t_join_timer);
+ THREAD_OFF(up->t_ka_timer);
upstream_channel_oil_detach(up);
} /* scan iface channel list */
} /* scan iflist */
}
+
+/*
+ * On an RP, the PMBR value must be cleared when the
+ * Keepalive Timer expires
+ */
+static int
+pim_upstream_keep_alive_timer (struct thread *t)
+{
+ struct pim_upstream *up;
+
+ up = THREAD_ARG(t);
+
+ pim_br_clear_pmbr (up->source_addr, up->group_addr);
+ /*
+ * We need to do more here :)
+ * But this is the start.
+ */
+
+ return 0;
+}
+
+
+void
+pim_upstream_keep_alive_timer_start (struct pim_upstream *up,
+ uint32_t time)
+{
+ THREAD_TIMER_ON (master,
+ up->t_ka_timer,
+ pim_upstream_keep_alive_timer,
+ up, time);
+}
void pim_upstream_update_could_assert(struct pim_upstream *up);
void pim_upstream_update_my_assert_metric(struct pim_upstream *up);
+void pim_upstream_keep_alive_timer_start (struct pim_upstream *up, uint32_t time);
#endif /* PIM_UPSTREAM_H */