Module Name: src Committed By: ozaki-r Date: Mon Aug 1 02:50:03 UTC 2016
Modified Files: src/sys/net: if.h Log Message: Revert "Revert part of "Switch the address list of intefaces to pslist(9)" (r1.220)" netstat now uses sysctl instead of kvm(3) to get address information from the kernel. So we can avoid the issue introduced by the reverted commit (PR kern/51325) by updating netstat with the latest source code. To generate a diff of this commit: cvs rdiff -u -r1.222 -r1.223 src/sys/net/if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.222 src/sys/net/if.h:1.223 --- src/sys/net/if.h:1.222 Fri Jul 22 07:09:40 2016 +++ src/sys/net/if.h Mon Aug 1 02:50:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.222 2016/07/22 07:09:40 knakahara Exp $ */ +/* $NetBSD: if.h,v 1.223 2016/08/01 02:50:03 ozaki-r Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -596,7 +596,9 @@ struct ifaddr { const struct sockaddr *); uint32_t *ifa_seqno; int16_t ifa_preference; /* preference level for this address */ - /* XXX adding variables here breaks kvm(3) users of struct *_ifaddr */ +#ifdef _KERNEL + struct pslist_entry ifa_pslist_entry; +#endif }; #define IFA_ROUTE RTF_UP /* (0x01) route installed */ @@ -1051,7 +1053,6 @@ __END_DECLS &(__ifp)->if_addrlist, ifa_list, __nifa) #define IFADDR_EMPTY(__ifp) TAILQ_EMPTY(&(__ifp)->if_addrlist) -#ifdef notyet #define IFADDR_ENTRY_INIT(__ifa) \ PSLIST_ENTRY_INIT((__ifa), ifa_pslist_entry) #define IFADDR_ENTRY_DESTROY(__ifa) \ @@ -1097,34 +1098,6 @@ __END_DECLS } \ } \ } while (0) -#else -#define IFADDR_ENTRY_INIT(__ifa) \ - do {} while (0) -#define IFADDR_ENTRY_DESTROY(__ifa) \ - do {} while (0) -#define IFADDR_READER_EMPTY(__ifp) \ - IFADDR_EMPTY(__ifp) -#define IFADDR_READER_FIRST(__ifp) \ - IFADDR_FIRST(__ifp) -#define IFADDR_READER_NEXT(__ifa) \ - IFADDR_NEXT(__ifa) -#define IFADDR_READER_FOREACH(__ifa, __ifp) \ - IFADDR_FOREACH(__ifa, __ifp) -#define IFADDR_WRITER_INSERT_HEAD(__ifp, __ifa) \ - do {} while (0) -#define IFADDR_WRITER_REMOVE(__ifa) \ - do {} while (0) -#define IFADDR_WRITER_FOREACH(__ifa, __ifp) \ - IFADDR_FOREACH(__ifa, __ifp) -#define IFADDR_WRITER_NEXT(__ifp) \ - IFADDR_NEXT(__ifa) -#define IFADDR_WRITER_INSERT_AFTER(__ifp, __new) \ - do {} while (0) -#define IFADDR_WRITER_EMPTY(__ifp) \ - IFADDR_EMPTY(__ifp) -#define IFADDR_WRITER_INSERT_TAIL(__ifp, __new) \ - do {} while (0) -#endif /* notyet */ #define IFNET_LOCK() mutex_enter(&ifnet_mtx) #define IFNET_UNLOCK() mutex_exit(&ifnet_mtx)