NAME
rt_timer_add
,
rt_timer_remove_all
,
rt_timer_queue_create
,
rt_timer_queue_count
,
rt_timer_queue_change
,
rt_timer_queue_destroy
—
route timer queues interface
SYNOPSIS
#include
<net/route.h>
int
rt_timer_add
(struct
rtentry *rt, void
(*func)(struct rtentry *, struct rttimer *),
struct rttimer_queue
*queue, u_int
rtableid);
void
rt_timer_remove_all
(struct
rtentry *rt);
struct rttimer_queue *
rt_timer_queue_create
(u_int
timeout);
unsigned long
rt_timer_queue_count
(struct
rttimer_queue *rtq);
void
rt_timer_queue_change
(struct
rttimer_queue *rtq, long
timeout);
void
rt_timer_queue_destroy
(struct
rttimer_queue *rtq);
DESCRIPTION
Route timer queues provide a method of queueing routing-related actions to be triggered once per second.
rt_timer_add
(struct rtentry *rt, void (*func)(struct rtentry *, struct rttimer *), struct rttimer_queue *queue, u_int rtableid)- Schedule func to be called on rt using the timeout of queue. If rt already has a call to func scheduled on any timer queue, it will be replaced with the new invocation.
rt_timer_remove_all
(struct rtentry *rt)- Remove all timeouts associated with rt from all routing timer queues.
rt_timer_queue_create
(u_int timeout)- Create a timer queue with a timeout of timeout seconds.
rt_timer_queue_count
(struct rtentry *rt)- Return the number of timers present in the queue rtq.
rt_timer_queue_change
(struct rttimer_queue *rtq, long timeout)- Set timeout for rtq to timeout seconds.
rt_timer_queue_destroy
(struct rttimer_queue *rtq)- Remove all timeouts from the routing timer queue rtq, execute their associated callback and destroy it.
CONTEXT
rt_timer_add
(),
rt_timer_remove_all
(),
rt_timer_queue_create
(),
rt_timer_queue_count
(),
rt_timer_queue_change
(), and
rt_timer_queue_destroy
() can be called during
autoconf, from process context, or from interrupt context.
RETURN VALUES
rt_timer_add
() may fail with
ENOBUFS
if memory could not be allocated for the
timeout.