Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Switch the address list of intefaces to pslist(9)
details: https://anonhg.NetBSD.org/src/rev/101faa1fc321
branches: trunk
changeset: 346327:101faa1fc321
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Jul 07 09:32:01 2016 +0000
description:
Switch the address list of intefaces to pslist(9)
As usual, we leave the old list to avoid breaking kvm(3) users.
diffstat:
sys/arch/x86/x86/vmt.c | 4 +-
sys/compat/common/uipc_syscalls_40.c | 8 ++--
sys/compat/linux/common/linux_socket.c | 12 +++---
sys/compat/linux32/common/linux32_socket.c | 12 +++---
sys/compat/svr4/svr4_sockio.c | 6 +-
sys/dev/qbus/if_dmc.c | 8 ++--
sys/dist/pf/net/pf_if.c | 6 +-
sys/external/bsd/ipf/netinet/ip_fil_netbsd.c | 8 ++--
sys/net/agr/if_agr.c | 6 +-
sys/net/if.c | 46 ++++++++++++++----------
sys/net/if.h | 52 +++++++++++++++++++++++++++-
sys/net/if_spppsubr.c | 14 +++---
sys/net/if_stf.c | 6 +-
sys/net/if_tun.c | 8 ++--
sys/net/link_proto.c | 8 ++--
sys/net/rtsock.c | 8 ++--
sys/netatalk/aarp.c | 10 ++--
sys/netatalk/at_control.c | 6 +-
sys/netinet/in.c | 12 +++---
sys/netinet/in_selsrc.c | 8 ++--
sys/netinet/ip_carp.c | 20 +++++-----
sys/netinet/ip_icmp.c | 8 ++--
sys/netinet/ip_input.c | 6 +-
sys/netinet/sctp_asconf.c | 8 ++--
sys/netinet/sctp_output.c | 42 +++++++++++-----------
sys/netinet/sctp_pcb.c | 6 +-
sys/netinet/sctp_usrreq.c | 10 ++--
sys/netinet/sctputil.c | 6 +-
sys/netinet6/icmp6.c | 8 ++--
sys/netinet6/in6.c | 20 +++++-----
sys/netinet6/in6_ifattach.c | 6 +-
sys/netinet6/ip6_input.c | 6 +-
sys/netinet6/mld6.c | 8 ++--
sys/netinet6/nd6.c | 12 +++---
sys/netinet6/nd6_rtr.c | 11 +++--
sys/netinet6/sctp6_usrreq.c | 6 +-
sys/netipsec/xform_ipip.c | 6 +-
37 files changed, 248 insertions(+), 189 deletions(-)
diffs (truncated from 1792 to 300 lines):
diff -r 4e3d66500590 -r 101faa1fc321 sys/arch/x86/x86/vmt.c
--- a/sys/arch/x86/x86/vmt.c Thu Jul 07 09:23:20 2016 +0000
+++ b/sys/arch/x86/x86/vmt.c Thu Jul 07 09:32:01 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmt.c,v 1.12 2016/05/12 02:24:16 ozaki-r Exp $ */
+/* $NetBSD: vmt.c,v 1.13 2016/07/07 09:32:01 ozaki-r Exp $ */
/* $OpenBSD: vmt.c,v 1.11 2011/01/27 21:29:25 dtucker Exp $ */
/*
@@ -817,7 +817,7 @@
continue;
}
- IFADDR_FOREACH(iface_addr, iface) {
+ IFADDR_READER_FOREACH(iface_addr, iface) {
if (iface_addr->ifa_addr->sa_family != AF_INET) {
continue;
}
diff -r 4e3d66500590 -r 101faa1fc321 sys/compat/common/uipc_syscalls_40.c
--- a/sys/compat/common/uipc_syscalls_40.c Thu Jul 07 09:23:20 2016 +0000
+++ b/sys/compat/common/uipc_syscalls_40.c Thu Jul 07 09:32:01 2016 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: uipc_syscalls_40.c,v 1.10 2016/06/16 02:38:40 ozaki-r Exp $ */
+/* $NetBSD: uipc_syscalls_40.c,v 1.11 2016/07/07 09:32:02 ozaki-r Exp $ */
/* written by Pavel Cahyna, 2006. Public domain. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.10 2016/06/16 02:38:40 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.11 2016/07/07 09:32:02 ozaki-r Exp $");
/*
* System call interface to the socket abstraction.
@@ -60,7 +60,7 @@
error = ENAMETOOLONG;
goto release_exit;
}
- if (IFADDR_EMPTY(ifp)) {
+ if (IFADDR_READER_EMPTY(ifp)) {
memset(&ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));
if (space >= sz) {
error = copyout(&ifr, ifrp, sz);
@@ -72,7 +72,7 @@
continue;
}
- IFADDR_FOREACH(ifa, ifp) {
+ IFADDR_READER_FOREACH(ifa, ifp) {
struct sockaddr *sa = ifa->ifa_addr;
#ifdef COMPAT_OSOCK
if (cmd == OOSIOCGIFCONF) {
diff -r 4e3d66500590 -r 101faa1fc321 sys/compat/linux/common/linux_socket.c
--- a/sys/compat/linux/common/linux_socket.c Thu Jul 07 09:23:20 2016 +0000
+++ b/sys/compat/linux/common/linux_socket.c Thu Jul 07 09:32:01 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_socket.c,v 1.130 2016/07/05 07:55:08 ozaki-r Exp $ */
+/* $NetBSD: linux_socket.c,v 1.131 2016/07/07 09:32:02 ozaki-r Exp $ */
/*-
* Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.130 2016/07/05 07:55:08 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.131 2016/07/07 09:32:02 ozaki-r Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -1150,7 +1150,7 @@
goto release_exit;
}
- IFADDR_FOREACH(ifa, ifp) {
+ IFADDR_READER_FOREACH(ifa, ifp) {
sa = ifa->ifa_addr;
if (sa->sa_family != AF_INET ||
sa->sa_len > sizeof(*osa))
@@ -1239,12 +1239,12 @@
continue;
found=1;
- if (IFADDR_EMPTY(ifp)) {
+ if (IFADDR_READER_EMPTY(ifp)) {
pserialize_read_exit(s);
error = ENODEV;
goto out;
}
- IFADDR_FOREACH(ifa, ifp) {
+ IFADDR_READER_FOREACH(ifa, ifp) {
sadl = satosdl(ifa->ifa_addr);
/* only return ethernet addresses */
/* XXX what about FDDI, etc. ? */
@@ -1282,7 +1282,7 @@
IFNET_READER_FOREACH(ifp) {
memcpy(lreq.ifr_name, ifp->if_xname,
MIN(LINUX_IFNAMSIZ, IFNAMSIZ));
- IFADDR_FOREACH(ifa, ifp) {
+ IFADDR_READER_FOREACH(ifa, ifp) {
sadl = satosdl(ifa->ifa_addr);
/* only return ethernet addresses */
/* XXX what about FDDI, etc. ? */
diff -r 4e3d66500590 -r 101faa1fc321 sys/compat/linux32/common/linux32_socket.c
--- a/sys/compat/linux32/common/linux32_socket.c Thu Jul 07 09:23:20 2016 +0000
+++ b/sys/compat/linux32/common/linux32_socket.c Thu Jul 07 09:32:01 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_socket.c,v 1.24 2016/07/05 08:48:51 ozaki-r Exp $ */
+/* $NetBSD: linux32_socket.c,v 1.25 2016/07/07 09:32:02 ozaki-r Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.24 2016/07/05 08:48:51 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.25 2016/07/07 09:32:02 ozaki-r Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -451,7 +451,7 @@
goto release_exit;
}
- IFADDR_FOREACH(ifa, ifp) {
+ IFADDR_READER_FOREACH(ifa, ifp) {
sa = ifa->ifa_addr;
if (sa->sa_family != AF_INET ||
sa->sa_len > sizeof(*osa))
@@ -538,11 +538,11 @@
/* not this interface */
continue;
found=1;
- if (IFADDR_EMPTY(ifp)) {
+ if (IFADDR_READER_EMPTY(ifp)) {
error = ENODEV;
goto out;
}
- IFADDR_FOREACH(ifa, ifp) {
+ IFADDR_READER_FOREACH(ifa, ifp) {
sadl = satosdl(ifa->ifa_addr);
/* only return ethernet addresses */
/* XXX what about FDDI, etc. ? */
@@ -575,7 +575,7 @@
IFNET_READER_FOREACH(ifp) {
memcpy(lreq.ifr_name, ifp->if_xname,
MIN(LINUX32_IFNAMSIZ, IFNAMSIZ));
- IFADDR_FOREACH(ifa, ifp) {
+ IFADDR_READER_FOREACH(ifa, ifp) {
sadl = satosdl(ifa->ifa_addr);
/* only return ethernet addresses */
/* XXX what about FDDI, etc. ? */
diff -r 4e3d66500590 -r 101faa1fc321 sys/compat/svr4/svr4_sockio.c
--- a/sys/compat/svr4/svr4_sockio.c Thu Jul 07 09:23:20 2016 +0000
+++ b/sys/compat/svr4/svr4_sockio.c Thu Jul 07 09:32:01 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svr4_sockio.c,v 1.37 2016/05/12 02:24:16 ozaki-r Exp $ */
+/* $NetBSD: svr4_sockio.c,v 1.38 2016/07/07 09:32:02 ozaki-r Exp $ */
/*-
* Copyright (c) 1995, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_sockio.c,v 1.37 2016/05/12 02:24:16 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_sockio.c,v 1.38 2016/07/07 09:32:02 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -88,7 +88,7 @@
struct ifaddr *ifa;
int ifnum = 0;
- IFADDR_FOREACH(ifa, ifp)
+ IFADDR_READER_FOREACH(ifa, ifp)
ifnum++;
return MAX(1, ifnum);
diff -r 4e3d66500590 -r 101faa1fc321 sys/dev/qbus/if_dmc.c
--- a/sys/dev/qbus/if_dmc.c Thu Jul 07 09:23:20 2016 +0000
+++ b/sys/dev/qbus/if_dmc.c Thu Jul 07 09:32:01 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_dmc.c,v 1.24 2016/04/20 09:01:04 knakahara Exp $ */
+/* $NetBSD: if_dmc.c,v 1.25 2016/07/07 09:32:02 ozaki-r Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
* All rights reserved.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.24 2016/04/20 09:01:04 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.25 2016/07/07 09:32:02 ozaki-r Exp $");
#undef DMCDEBUG /* for base table dump on fatal error */
@@ -313,10 +313,10 @@
* Check to see that an address has been set
* (both local and destination for an address family).
*/
- IFADDR_FOREACH(ifa, ifp)
+ IFADDR_READER_FOREACH(ifa, ifp)
if (ifa->ifa_addr->sa_family && ifa->ifa_dstaddr->sa_family)
break;
- if (ifa == (struct ifaddr *) 0)
+ if (ifa == NULL)
return 0;
if ((DMC_RBYTE(DMC_BSEL1) & DMC_RUN) == 0) {
diff -r 4e3d66500590 -r 101faa1fc321 sys/dist/pf/net/pf_if.c
--- a/sys/dist/pf/net/pf_if.c Thu Jul 07 09:23:20 2016 +0000
+++ b/sys/dist/pf/net/pf_if.c Thu Jul 07 09:32:01 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pf_if.c,v 1.29 2016/06/22 07:48:17 ozaki-r Exp $ */
+/* $NetBSD: pf_if.c,v 1.30 2016/07/07 09:32:02 ozaki-r Exp $ */
/* $OpenBSD: pf_if.c,v 1.47 2007/07/13 09:17:48 markus Exp $ */
/*
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pf_if.c,v 1.29 2016/06/22 07:48:17 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pf_if.c,v 1.30 2016/07/07 09:32:02 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -559,7 +559,7 @@
if (ifp == NULL)
return;
- IFADDR_FOREACH(ia, ifp) {
+ IFADDR_READER_FOREACH(ia, ifp) {
af = ia->ifa_addr->sa_family;
if (af != AF_INET && af != AF_INET6)
continue;
diff -r 4e3d66500590 -r 101faa1fc321 sys/external/bsd/ipf/netinet/ip_fil_netbsd.c
--- a/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c Thu Jul 07 09:23:20 2016 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c Thu Jul 07 09:32:01 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_fil_netbsd.c,v 1.15 2016/06/20 06:46:37 knakahara Exp $ */
+/* $NetBSD: ip_fil_netbsd.c,v 1.16 2016/07/07 09:32:02 ozaki-r Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -8,7 +8,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.15 2016/06/20 06:46:37 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.16 2016/07/07 09:32:02 ozaki-r Exp $");
#else
static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed";
static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp";
@@ -1545,7 +1545,7 @@
bzero((char *)inp, sizeof(*inp));
#endif
- ifa = IFADDR_FIRST(ifp);
+ ifa = IFADDR_READER_FIRST(ifp);
sock = ifa ? ifa->ifa_addr : NULL;
while (sock != NULL && ifa != NULL) {
sin = (struct sockaddr_in *)sock;
@@ -1559,7 +1559,7 @@
break;
}
#endif
- ifa = IFADDR_NEXT(ifa);
+ ifa = IFADDR_READER_NEXT(ifa);
if (ifa != NULL)
sock = ifa->ifa_addr;
}
diff -r 4e3d66500590 -r 101faa1fc321 sys/net/agr/if_agr.c
--- a/sys/net/agr/if_agr.c Thu Jul 07 09:23:20 2016 +0000
+++ b/sys/net/agr/if_agr.c Thu Jul 07 09:32:01 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_agr.c,v 1.36 2016/06/20 06:46:37 knakahara Exp $ */
+/* $NetBSD: if_agr.c,v 1.37 2016/07/07 09:32:02 ozaki-r Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_agr.c,v 1.36 2016/06/20 06:46:37 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_agr.c,v 1.37 2016/07/07 09:32:02 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -591,7 +591,7 @@
}
port->port_flags = AGRPORT_LARVAL;
- IFADDR_FOREACH(ifa, ifp_port) {
+ IFADDR_READER_FOREACH(ifa, ifp_port) {
if (ifa->ifa_addr->sa_family != AF_LINK) {
error = EBUSY;
goto out;
Home |
Main Index |
Thread Index |
Old Index