RT_TIMER_ADD(9) Kernel Developer's Manual RT_TIMER_ADD(9)

rt_timer_add, rt_timer_remove_all, rt_timer_get_expire, rt_timer_queue_init, rt_timer_queue_change, rt_timer_queue_flush, rt_timer_queue_countroute timer queues interface

#include <net/route.h>

rt_timer_add(struct rtentry *rt, struct rttimer_queue *queue, u_int rtableid);

rt_timer_remove_all(struct rtentry *rt);

rt_timer_get_expire(const struct rtentry *rt);

rt_timer_queue_init(struct rttimer_queue *rtq, int timeout, void (*func)(struct rtentry *, u_int));

rt_timer_queue_change(struct rttimer_queue *rtq, int timeout);

rt_timer_queue_flush(struct rttimer_queue *rtq);

unsigned long
rt_timer_queue_count(struct rttimer_queue *rtq);

The rt_timer subsystem queues routing-related functions for asynchronous execution in the future.

() allocates an rttimer_queue rtq to be called on rt using the timeout of queue. If an action already exists, it will be replaced with the new one.

() removes all timeouts associated with rt from all routing timer queues.

() returns the current expiry time in seconds.

() creates a timer queue with a timeout of timeout seconds.

() sets the timeout for rtq to timeout seconds.

() removes all timeouts from the routing timer queue rtq, executes their associated callback and destroys it.

() returns the number of timers present in the queue rtq.

rt_timer_add(), rt_timer_remove_all(), rt_timer_get_expire(), rt_timer_queue_init(), rt_timer_queue_change(), rt_timer_queue_flush() and rt_timer_queue_count() can be called during autoconf, from process context, or from interrupt context.

rt_timer_add() may fail with ENOBUFS if memory could not be allocated for the timeout.

route(4), route(9)

June 20, 2023 OpenBSD 7.5