Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Kill remaining use of the old lists of IP addresses



details:   https://anonhg.NetBSD.org/src/rev/14f3a0113724
branches:  trunk
changeset: 346333:14f3a0113724
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Jul 08 03:40:34 2016 +0000

description:
Kill remaining use of the old lists of IP addresses

diffstat:

 sys/netinet/in_var.h   |  10 ++++++----
 sys/netinet6/in6_var.h |   4 ++--
 2 files changed, 8 insertions(+), 6 deletions(-)

diffs (63 lines):

diff -r 869f0540a422 -r 14f3a0113724 sys/netinet/in_var.h
--- a/sys/netinet/in_var.h      Fri Jul 08 01:24:53 2016 +0000
+++ b/sys/netinet/in_var.h      Fri Jul 08 03:40:34 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in_var.h,v 1.76 2016/07/06 08:42:34 ozaki-r Exp $      */
+/*     $NetBSD: in_var.h,v 1.77 2016/07/08 03:40:34 ozaki-r Exp $      */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -167,6 +167,8 @@
        PSLIST_ENTRY_INIT((__ia), ia_hash_pslist_entry);
 #define IN_ADDRHASH_ENTRY_DESTROY(__ia)                                        \
        PSLIST_ENTRY_DESTROY((__ia), ia_hash_pslist_entry);
+#define IN_ADDRHASH_READER_NEXT(__ia)                                  \
+       PSLIST_READER_NEXT((__ia), struct in_ifaddr, ia_hash_pslist_entry)
 
 #define IN_ADDRLIST_ENTRY_INIT(__ia)                                   \
        PSLIST_ENTRY_INIT((__ia), ia_pslist_entry)
@@ -227,7 +229,7 @@
        /* struct in_addr addr; */ \
        /* struct in_ifaddr *ia; */ \
 { \
-       LIST_FOREACH(ia, &IN_IFADDR_HASH((addr).s_addr), ia_hash) { \
+       IN_ADDRHASH_READER_FOREACH(ia, addr.s_addr) { \
                if (in_hosteq(ia->ia_addr.sin_addr, (addr))) \
                        break; \
        } \
@@ -245,7 +247,7 @@
        struct in_addr addr; \
        addr = ia->ia_addr.sin_addr; \
        do { \
-               ia = LIST_NEXT(ia, ia_hash); \
+               ia = IN_ADDRHASH_READER_NEXT(ia); \
        } while ((ia != NULL) && !in_hosteq(ia->ia_addr.sin_addr, addr)); \
 }
 
@@ -273,7 +275,7 @@
 { \
        struct ifaddr *ifa; \
 \
-       IFADDR_FOREACH(ifa, ifp) { \
+       IFADDR_READER_FOREACH(ifa, ifp) { \
                if (ifa->ifa_addr->sa_family == AF_INET) \
                        break; \
        } \
diff -r 869f0540a422 -r 14f3a0113724 sys/netinet6/in6_var.h
--- a/sys/netinet6/in6_var.h    Fri Jul 08 01:24:53 2016 +0000
+++ b/sys/netinet6/in6_var.h    Fri Jul 08 03:40:34 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6_var.h,v 1.81 2016/07/06 10:49:49 ozaki-r Exp $     */
+/*     $NetBSD: in6_var.h,v 1.82 2016/07/08 03:40:34 ozaki-r Exp $     */
 /*     $KAME: in6_var.h,v 1.81 2002/06/08 11:16:51 itojun Exp $        */
 
 /*
@@ -566,7 +566,7 @@
 {
        struct ifaddr *ifa;
 
-       IFADDR_FOREACH(ifa, ifp) {
+       IFADDR_READER_FOREACH(ifa, ifp) {
                if (ifa->ifa_addr->sa_family == AF_INET6)
                        break;
        }



Home | Main Index | Thread Index | Old Index