|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
26 [IGMP_TIMER_QUERY] = 60,
27 [IGMP_TIMER_SRC] = (3 * 60),
28 [IGMP_TIMER_LEAVE] = 60,
29 [IGMP_TIMER_REPORT_INTERVAL] = 1,
32 #define IGMP_N_TIMERS (IGMP_TIMER_REPORT_INTERVAL+1)
85 const u32 *i1 = _v1, *i2 = _v2;
94 return (dt < 0 ? -1 : (dt > 0 ? +1 : 0));
117 return (timer->
data);
147 uword *event_data = 0, event_type;
189 .name =
"igmp-timer-process",
242 s =
format (s,
"not-running");
249 format (s,
"[expires-in:%f]",
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
void * igmp_timer_get_data(igmp_timer_id_t tid)
static uword igmp_timer_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
igmp timer process
u32 igmp_get_next_timer(void)
igmp get next timer
static uword * vlib_process_wait_for_event(vlib_main_t *vm)
int igmp_timer_is_running(igmp_timer_id_t tid)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
void igmp_timer_retire(igmp_timer_id_t *tid)
#define IGMP_TIMER_ID_INVALID
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
enum @682 igmp_process_event_t
void(* igmp_timer_function_t)(u32 obj, void *data)
A call-back function invoked when a timer expires;.
u8 * format_igmp_timer_id(u8 *s, va_list *args)
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
#define pool_put_index(p, i)
Free pool element with given index.
static int igmp_timer_compare(const void *_v1, const void *_v2)
void igmp_timer_type_set(igmp_timer_type_t t, u32 v)
u32 igmp_timer_type_get(igmp_timer_type_t t)
vlib_node_registration_t igmp_timer_process_node
(constructor) VLIB_REGISTER_NODE (igmp_timer_process_node)
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,...
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static u32 * pending_timers
Vector of pending timers.
enum igmp_timer_type_t_ igmp_timer_type_t
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
@ IGMP_PROCESS_EVENT_UPDATE_TIMER
void igmp_timer_set_data(igmp_timer_id_t tid, void *data)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
struct _vlib_node_registration vlib_node_registration_t
#define vec_search(v, E)
Search a vector for the index of the entry that matches.
u32 obj
index of the object that scheduled the timer
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...
description fragment has unexpected format
u32 igmp_timer_id_t
The id of a running timer.
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
static igmp_timer_type_t igmp_default_timer_values[]
Default timer values as per RFC.
static vlib_main_t * vlib_get_main(void)
vnet_interface_output_runtime_t * rt
static f64 vlib_time_now(vlib_main_t *vm)
struct igmp_timer_t_ igmp_timer_t
Timer.
void * data
Data registered by the client and passed back when the timer expires.
static igmp_timer_t * timer_pool
pool of timers
#define vec_del1(v, i)
Delete the element at index I.
igmp_timer_id_t igmp_timer_schedule(f64 when, u32 obj, igmp_timer_function_t fn, void *data)
Schedule a timer to expire in 'when' seconds.
#define VLIB_REGISTER_NODE(x,...)
igmp_timer_function_t func
Call-back function to invoke on expiry.
f64 exp_time
Expiration timer.