RT_TIMER_ADD(9)
Hii bestie! Welcome to RT_TIMER_ADD(9) from the Kernel Developer's Manual π β this one's the route timer queues interface, and she's lowkey iconic.
β¨ NAME β¨
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_count β route timer queues interface
πΈ SYNOPSIS πΈ
Okay so first, the include and the exact signatures, no cap:
#include <net/route.h>
int
rt_timer_add(struct rtentry *rt, struct rttimer_queue *queue,
u_int rtableid);
void
rt_timer_remove_all(struct rtentry *rt);
time_t
rt_timer_get_expire(const struct rtentry *rt);
void
rt_timer_queue_init(struct rttimer_queue *rtq, int timeout,
void (*func)(struct rtentry *, u_int));
void
rt_timer_queue_change(struct rttimer_queue *rtq, int timeout);
void
rt_timer_queue_flush(struct rttimer_queue *rtq);
unsigned long
rt_timer_queue_count(struct rttimer_queue *rtq);
π DESCRIPTION π
The rt_timer subsystem queues routing-related functions for asynchronous execution in the future β future vibes only, bestie β¨.
rt_timer_add()β allocates anrttimer_queuertqto be called onrtusing the timeout ofqueue. If an action already exists, it will be replaced with the new one.rt_timer_remove_all()β removes all timeouts associated withrtfrom all routing timer queues.rt_timer_get_expire()β returns the current expiry time in seconds.rt_timer_queue_init()β creates a timer queue with a timeout oftimeoutseconds.rt_timer_queue_change()β sets the timeout forrtqtotimeoutseconds.rt_timer_queue_flush()β removes all timeouts from the routing timer queuertq, executes their associated callback and destroys it.rt_timer_queue_count()β returns the number of timers present in the queuertq.
π«Ά CONTEXT π«Ά
Vibe check: 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. Slay, they're flexible like that π
.
π ERRORS π
rt_timer_add() may fail with ENOBUFS if memory could not be allocated for the timeout. Not the glow-up we wanted, but now you know, fr fr.
π¦ SEE ALSO π¦
Debian is the source/version here, dated June 20, 2023 β bye bestie, go queue those timers and stay hydrated π π
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 2011 Bret S. Lambert <blambert@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms