summaryrefslogtreecommitdiff
path: root/sys/net/route.h
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2006-06-15 16:33:03 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2006-06-15 16:33:03 +0000
commit76df8e5b0f5b64f80edc3988c2c84757ae779f94 (patch)
treef9b21052eb8f07402acee94ef038c38ba36707e6 /sys/net/route.h
parent686c8cda73261a63e3f930ab893ed44830d5e938 (diff)
put the multiple routing tables support back in, fixed.
problem before: with this, we are no longer using the address family as array index directly, since only 3 of 31 address fanilies actually attach a table, but we're using an address family to array index translation (just another array). there, 0 meant "does not attach a table", thus rt_gettable has to return a null pointer. unfortunately we were using array index 0 for whatever af attaches first, and since the list is backwards,, that used to be ipsec - execpt on ipsec-less ramdisks, where it was inet6, and since route show blindly iterates over all address families, and all those without a table pointed to index 0, we got 28 or 29 copies of the v6 table. i had that right initally, and then i borked it later... re-spotted by claudio. ok norby hshoexer claudio
Diffstat (limited to 'sys/net/route.h')
-rw-r--r--sys/net/route.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/route.h b/sys/net/route.h
index 9db16dbf54a..6534ddf1057 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.h,v 1.42 2006/06/06 15:36:07 deraadt Exp $ */
+/* $OpenBSD: route.h,v 1.43 2006/06/15 16:33:02 henning Exp $ */
/* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */
/*
@@ -304,6 +304,8 @@ void rtlabel_unref(u_int16_t);
#define ONNET_CLONING 1
#define NO_CLONING 2
+#define RT_TABLEID_MAX 255
+
extern struct route_cb route_cb;
extern struct rtstat rtstat;
extern const struct sockaddr_rtin rt_defmask4;
@@ -334,7 +336,6 @@ void rt_timer_queue_destroy(struct rttimer_queue *, int);
void rt_timer_remove_all(struct rtentry *);
unsigned long rt_timer_count(struct rttimer_queue *);
void rt_timer_timer(void *);
-void rtable_init(void **);
void rtalloc(struct route *);
struct rtentry *
rtalloc1(struct sockaddr *, int);
@@ -354,7 +355,7 @@ int rtrequest(int, struct sockaddr *,
int rtrequest1(int, struct rt_addrinfo *, struct rtentry **);
void rt_if_remove(struct ifnet *);
-struct radix_node_head *rt_gettable(sa_family_t, int);
+struct radix_node_head *rt_gettable(sa_family_t, u_int);
struct radix_node *rt_lookup(struct sockaddr *, struct sockaddr *, int);
#endif /* _KERNEL */
#endif /* _NET_ROUTE_H_ */