summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/route.h8
-rw-r--r--sys/net/rtable.h19
2 files changed, 3 insertions, 24 deletions
diff --git a/sys/net/route.h b/sys/net/route.h
index 41aa5a1ace7..93ed426607c 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.h,v 1.174 2019/02/13 23:47:42 dlg Exp $ */
+/* $OpenBSD: route.h,v 1.175 2019/04/28 17:59:51 mpi Exp $ */
/* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */
/*
@@ -93,12 +93,8 @@ struct rt_metrics {
*/
struct rtentry {
-#if !defined(_KERNEL) && !defined(ART)
- struct radix_node rt_nodes[2]; /* tree glue, and other values */
-#else
struct sockaddr *rt_dest; /* destination */
SRPL_ENTRY(rtentry) rt_next; /* Next multipath entry to our dst. */
-#endif
struct sockaddr *rt_gateway; /* value */
struct ifaddr *rt_ifa; /* the answer: interface addr to use */
caddr_t rt_llinfo; /* pointer to link level info cache or
@@ -115,9 +111,7 @@ struct rtentry {
unsigned int rt_ifidx; /* the answer: interface to use */
unsigned int rt_flags; /* up/down?, host/net */
int rt_refcnt; /* # held references */
-#if defined(_KERNEL) || defined(ART)
int rt_plen; /* prefix length */
-#endif
uint16_t rt_labelid; /* route label ID */
uint8_t rt_priority; /* routing priority to use */
};
diff --git a/sys/net/rtable.h b/sys/net/rtable.h
index ea78d8bed06..69909cf9a55 100644
--- a/sys/net/rtable.h
+++ b/sys/net/rtable.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtable.h,v 1.22 2018/11/23 16:24:11 claudio Exp $ */
+/* $OpenBSD: rtable.h,v 1.23 2019/04/28 17:59:51 mpi Exp $ */
/*
* Copyright (c) 2014-2016 Martin Pieuchot
@@ -19,20 +19,6 @@
#ifndef _NET_RTABLE_H_
#define _NET_RTABLE_H_
-#if !defined(_KERNEL) && !defined(ART)
-
-/*
- * Traditional BSD routing table implementation based on a radix tree.
- */
-#include <net/radix.h>
-
-#define rt_key(rt) (((struct sockaddr *)(rt)->rt_nodes[0].rn_key))
-#define rt_mask(rt) (((struct sockaddr *)(rt)->rt_nodes[0].rn_mask))
-#define rt_plen(rt) (rtable_satoplen(rt_key(rt)->sa_family, rt_mask(rt)))
-#define RT_ROOT(rt) ((rt)->rt_nodes[0].rn_flags & RNF_ROOT)
-
-#else /* defined(_KERNEL) || defined(ART) */
-
/*
* Newer routing table implementation based on ART (Allotment Routing
* Table).
@@ -43,8 +29,6 @@
#define rt_plen(rt) ((rt)->rt_plen)
#define RT_ROOT(rt) (0)
-#endif /* defined(_KERNEL) || defined(ART) */
-
int rtable_satoplen(sa_family_t, struct sockaddr *);
void rtable_init(void);
@@ -72,4 +56,5 @@ struct rtentry *rtable_mpath_match(unsigned int, struct rtentry *,
struct sockaddr *, uint8_t);
int rtable_mpath_reprio(unsigned int, struct sockaddr *, int,
uint8_t, struct rtentry *);
+
#endif /* _NET_RTABLE_H_ */