diff options
author | 1999-12-08 06:50:14 +0000 | |
---|---|---|
committer | 1999-12-08 06:50:14 +0000 | |
commit | 287546ea80ee896bda0c88b8a8c85a1dc6ff37f9 (patch) | |
tree | cef428e54b6d2bca56fb9b461aa0667c7fb5f6a2 /sys/net/route.h | |
parent | add GENERIC.v6 (IPv6 test configuration). to be integrated into GENREIC. (diff) | |
download | wireguard-openbsd-287546ea80ee896bda0c88b8a8c85a1dc6ff37f9.tar.xz wireguard-openbsd-287546ea80ee896bda0c88b8a8c85a1dc6ff37f9.zip |
bring in KAME IPv6 code, dated 19991208.
replaces NRL IPv6 layer. reuses NRL pcb layer. no IPsec-on-v6 support.
see sys/netinet6/{TODO,IMPLEMENTATION} for more details.
GENERIC configuration should work fine as before. GENERIC.v6 works fine
as well, but you'll need KAME userland tools to play with IPv6 (will be
bringed into soon).
Diffstat (limited to 'sys/net/route.h')
-rw-r--r-- | sys/net/route.h | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/sys/net/route.h b/sys/net/route.h index cd880ad239b..2165d8330f6 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -1,4 +1,4 @@ -/* $OpenBSD: route.h,v 1.6 1999/05/16 00:34:40 ho Exp $ */ +/* $OpenBSD: route.h,v 1.7 1999/12/08 06:50:18 itojun Exp $ */ /* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */ /* @@ -36,6 +36,8 @@ * @(#)route.h 8.3 (Berkeley) 4/19/94 */ +#include <sys/queue.h> + /* * Kernel resident routing tables. * @@ -105,6 +107,7 @@ struct rtentry { struct rt_metrics rt_rmx; /* metrics used by rx'ing protocols */ struct rtentry *rt_gwroute; /* implied entry for gatewayed routes */ struct rtentry *rt_parent; /* If cloned, parent of this route. */ + LIST_HEAD(, rttimer) rt_timer; /* queue of timeouts for misc funcs */ }; #define rt_use rt_rmx.rmx_pksent @@ -233,11 +236,34 @@ struct rt_addrinfo { struct route_cb { int ip_count; + int ip6_count; int ns_count; int iso_count; int any_count; }; +/* + * This structure, and the prototypes for the rt_timer_{init,remove_all, + * add,timer} functions all used with the kind permission of BSDI. + * These allow functions to be called for routes at specific times. + */ + +struct rttimer { + TAILQ_ENTRY(rttimer) rtt_next; /* entry on timer queue */ + LIST_ENTRY(rttimer) rtt_link; /* multiple timers per rtentry */ + struct rttimer_queue *rtt_queue;/* back pointer to queue */ + struct rtentry *rtt_rt; /* Back pointer to the route */ + void (*rtt_func) __P((struct rtentry *, + struct rttimer *)); + time_t rtt_time; /* When this timer was registered */ +}; + +struct rttimer_queue { + long rtq_timeout; + TAILQ_HEAD(, rttimer) rtq_head; + LIST_ENTRY(rttimer_queue) rtq_link; +}; + #ifdef _KERNEL #define RTFREE(rt) do { \ if ((rt)->rt_refcnt <= 1) \ @@ -270,6 +296,16 @@ void rt_newaddrmsg __P((int, struct ifaddr *, int, struct rtentry *)); int rt_setgate __P((struct rtentry *, struct sockaddr *, struct sockaddr *)); void rt_setmetrics __P((u_long, struct rt_metrics *, struct rt_metrics *)); +int rt_timer_add __P((struct rtentry *, + void(*)(struct rtentry *, struct rttimer *), + struct rttimer_queue *)); +void rt_timer_init __P((void)); +struct rttimer_queue * + rt_timer_queue_create __P((u_int)); +void rt_timer_queue_change __P((struct rttimer_queue *, long)); +void rt_timer_queue_destroy __P((struct rttimer_queue *, int)); +void rt_timer_remove_all __P((struct rtentry *)); +void rt_timer_timer __P((void *)); void rtable_init __P((void **)); void rtalloc __P((struct route *)); struct rtentry * |