summaryrefslogtreecommitdiff
path: root/sys/net/route.h
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-12-03 21:58:00 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-12-03 21:58:00 +0000
commitf448ef3672f16ab4039c0990f4181b16111956bc (patch)
treef9e930f4dfdc271f047d198430678145ed3d0c21 /sys/net/route.h
parentcf0e146a4d23b167153e741cab2fef993dadd10c (diff)
Get rid of rt_mask() and stop allocating a "struct sockaddr" for every
route entry in ART. rt_plen() now represents the prefix length of a route entry and should be used instead. For now use a "struct sockaddr_in6" to represent the mask when needed, this should be then replaced by the prefix length and RTA_NETMASK only used for compatibility with userland. ok claudio@
Diffstat (limited to 'sys/net/route.h')
-rw-r--r--sys/net/route.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/route.h b/sys/net/route.h
index 3186e5de82b..fb61518e4cb 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.h,v 1.129 2015/12/03 16:27:32 mpi Exp $ */
+/* $OpenBSD: route.h,v 1.130 2015/12/03 21:57:59 mpi Exp $ */
/* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */
/*
@@ -98,7 +98,6 @@ struct rtentry {
#else
struct art_node *rt_node; /* ART entry */
struct sockaddr *rt_dest; /* destination */
- struct sockaddr *rt_mask; /* mask (radix tree compat) */
SRPL_ENTRY(rtentry) rt_next; /* Next multipath entry to our dst. */
#endif
struct sockaddr *rt_gateway; /* value */
@@ -346,6 +345,7 @@ extern const struct sockaddr_rtin rt_defmask4;
struct mbuf;
struct socket;
struct ifnet;
+struct sockaddr_in6;
void route_init(void);
int route_output(struct mbuf *, ...);
@@ -355,6 +355,7 @@ void rt_ifmsg(struct ifnet *);
void rt_ifannouncemsg(struct ifnet *, int);
void rt_maskedcopy(struct sockaddr *,
struct sockaddr *, struct sockaddr *);
+struct sockaddr *rt_plen2mask(struct rtentry *, struct sockaddr_in6 *);
void rt_sendmsg(struct rtentry *, int, u_int);
void rt_sendaddrmsg(struct rtentry *, int);
void rt_missmsg(int, struct rt_addrinfo *, int, u_int, int, u_int);