19 const u32 *idx1, *idx2;
121 clib_warning (
"Unrecognized VRRP timer type (%d)", type);
142 clib_warning (
"Timeout on free timer index %u", timer_index);
172 uword *event_data = 0;
181 if (next_timer == ~0)
218 .name =
"vrrp-periodic-process",
static f64 vlib_process_wait_for_event_or_clock(vlib_main_t *vm, f64 dt)
Suspend a cooperative multi-tasking thread Waits for an event, or for the indicated number of seconds...
static uword * vlib_process_wait_for_event(vlib_main_t *vm)
vrrp_vr_timer_t * vr_timers
static f64 vlib_time_now(vlib_main_t *vm)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define vec_foreach_backwards(var, vec)
Vector iterator (reverse)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define VRRP_EVENT_VR_TIMER_UPDATE
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
void vrrp_vr_timer_timeout(u32 timer_index)
static uword vlib_process_get_events(vlib_main_t *vm, uword **data_vector)
Return the first event type which has occurred and a vector of per-event data of that type...
void vrrp_vr_timer_cancel(vrrp_vr_t *vr)
vl_api_fib_path_type_t type
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
static int vrrp_vr_timer_compare(const void *v1, const void *v2)
vrrp_vr_runtime_t runtime
void vrrp_vr_timer_set(vrrp_vr_t *vr, vrrp_vr_timer_type_t type)
#define VLIB_REGISTER_NODE(x,...)
enum vrrp_vr_timer_type vrrp_vr_timer_type_t
#define clib_warning(format, args...)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
#define pool_put_index(p, i)
Free pool element with given index.
#define vec_delete(V, N, M)
Delete N elements starting at element M.
int vrrp_adv_send(vrrp_vr_t *vr, int shutdown)
static vlib_main_t * vlib_get_main(void)
#define vec_elt(v, i)
Get vector value at index i.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
static u32 vrrp_vr_timer_get_next(void)
vlib_node_registration_t vrrp_periodic_node
(constructor) VLIB_REGISTER_NODE (vrrp_periodic_node)
vrrp_vr_timer_type_t type
static uword vrrp_periodic_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
void vrrp_vr_transition(vrrp_vr_t *vr, vrrp_vr_state_t new_state, void *data)