Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Don't use radix tree API directly
details: https://anonhg.NetBSD.org/src/rev/52ddedb968ad
branches: trunk
changeset: 344685:52ddedb968ad
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Mon Apr 11 09:21:18 2016 +0000
description:
Don't use radix tree API directly
diffstat:
sys/net/if.c | 9 ++++-----
sys/net/route.h | 3 ++-
sys/net/rtbl.c | 11 +++++++++--
3 files changed, 15 insertions(+), 8 deletions(-)
diffs (83 lines):
diff -r 228a33b19821 -r 52ddedb968ad sys/net/if.c
--- a/sys/net/if.c Mon Apr 11 08:57:19 2016 +0000
+++ b/sys/net/if.c Mon Apr 11 09:21:18 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.328 2016/04/04 07:37:07 ozaki-r Exp $ */
+/* $NetBSD: if.c,v 1.329 2016/04/11 09:21:18 ozaki-r Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.328 2016/04/04 07:37:07 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.329 2016/04/11 09:21:18 ozaki-r Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -127,7 +127,6 @@
#include <net80211/ieee80211.h>
#include <net80211/ieee80211_ioctl.h>
#include <net/if_types.h>
-#include <net/radix.h>
#include <net/route.h>
#include <net/netisr.h>
#include <sys/module.h>
@@ -1556,8 +1555,8 @@
}
}
if (ifa_maybe == NULL ||
- rn_refines((void *)ifa->ifa_netmask,
- (void *)ifa_maybe->ifa_netmask))
+ rt_refines(ifa->ifa_netmask,
+ ifa_maybe->ifa_netmask))
ifa_maybe = ifa;
}
}
diff -r 228a33b19821 -r 52ddedb968ad sys/net/route.h
--- a/sys/net/route.h Mon Apr 11 08:57:19 2016 +0000
+++ b/sys/net/route.h Mon Apr 11 09:21:18 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.h,v 1.98 2016/04/04 07:37:07 ozaki-r Exp $ */
+/* $NetBSD: route.h,v 1.99 2016/04/11 09:21:18 ozaki-r Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -522,6 +522,7 @@
const struct sockaddr *);
struct rtentry *
rt_matchaddr(rtbl_t *, const struct sockaddr *);
+int rt_refines(const struct sockaddr *, const struct sockaddr *);
int rt_walktree(sa_family_t, int (*)(struct rtentry *, void *), void *);
void rtbl_init(void);
diff -r 228a33b19821 -r 52ddedb968ad sys/net/rtbl.c
--- a/sys/net/rtbl.c Mon Apr 11 08:57:19 2016 +0000
+++ b/sys/net/rtbl.c Mon Apr 11 09:21:18 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtbl.c,v 1.2 2015/08/24 22:21:26 pooka Exp $ */
+/* $NetBSD: rtbl.c,v 1.3 2016/04/11 09:21:18 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 2008, 2011 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
#endif /* _KERNEL && _KERNEL_OPT */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtbl.c,v 1.2 2015/08/24 22:21:26 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtbl.c,v 1.3 2016/04/11 09:21:18 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -228,3 +228,10 @@
if (rt->rt_nodes->rn_flags & (RNF_ACTIVE | RNF_ROOT))
panic ("rtfree 2");
}
+
+int
+rt_refines(const struct sockaddr *m_sa, const struct sockaddr *n_sa)
+{
+
+ return rn_refines(m_sa, n_sa);
+}
Home |
Main Index |
Thread Index |
Old Index