summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2004-04-25 02:48:05 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2004-04-25 02:48:05 +0000
commitc6b0397c7d1701e68dfbb8b0106f79196a34d424 (patch)
tree6665fdcb3ed2813f738a28f1185b681f9484fcfb /sys/netinet
parent8656adaef3dd7fc8fa5dbfea91bc95376b2bc07b (diff)
radix tree with multipath support. from kame. deraadt ok
user visible changes: - you can add multiple routes with same key (route add A B then route add A C) - you have to specify gateway address if there are multiple entries on the table (route delete A B, instead of route delete A) kernel change: - radix_node_head has an extra entry - rnh_deladdr takes extra argument TODO: - actually take advantage of multipath (rtalloc -> rtalloc_mpath)
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in_proto.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c
index 06c535d0fb1..5af1754e7e5 100644
--- a/sys/netinet/in_proto.c
+++ b/sys/netinet/in_proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_proto.c,v 1.38 2003/12/15 07:11:30 mcbride Exp $ */
+/* $OpenBSD: in_proto.c,v 1.39 2004/04/25 02:48:04 itojun Exp $ */
/* $NetBSD: in_proto.c,v 1.14 1996/02/18 18:58:32 christos Exp $ */
/*
@@ -105,6 +105,10 @@
#include <net/if.h>
#include <net/route.h>
+#include <net/radix.h>
+#ifndef SMALL_KERNEL
+#include <net/radix_mpath.h>
+#endif
#include <netinet/in.h>
#include <netinet/in_systm.h>
@@ -335,7 +339,12 @@ struct protosw inetsw[] = {
struct domain inetdomain =
{ AF_INET, "internet", 0, 0, 0,
inetsw, &inetsw[sizeof(inetsw)/sizeof(inetsw[0])], 0,
- rn_inithead, 32, sizeof(struct sockaddr_in) };
+#ifndef SMALL_KERNEL
+ rn_mpath_inithead,
+#else
+ rn_inithead,
+#endif
+ 32, sizeof(struct sockaddr_in) };
#ifdef notyet /* XXXX */
#include "hy.h"