From owner-svn-src-all@FreeBSD.ORG Thu Feb 19 23:16:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C39C5A05; Thu, 19 Feb 2015 23:16:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADC9F2E0; Thu, 19 Feb 2015 23:16:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1JNGBll060794; Thu, 19 Feb 2015 23:16:11 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1JNGALg060789; Thu, 19 Feb 2015 23:16:10 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201502192316.t1JNGALg060789@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 19 Feb 2015 23:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279030 - in head/sys: net netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 23:16:12 -0000 Author: glebius Date: Thu Feb 19 23:16:10 2015 New Revision: 279030 URL: https://svnweb.freebsd.org/changeset/base/279030 Log: Now that all users of _WANT_IFADDR are fixed, remove this crutch and hide ifaddr, in_ifaddr and in6_ifaddr under _KERNEL. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/net/if_var.h head/sys/netinet/in_var.h head/sys/netinet6/in6_var.h Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu Feb 19 23:14:35 2015 (r279029) +++ head/sys/net/if_var.h Thu Feb 19 23:16:10 2015 (r279030) @@ -365,8 +365,6 @@ EVENTHANDLER_DECLARE(group_change_event, #define TOEDEV(ifp) ((ifp)->if_llsoftc) -#endif /* _KERNEL */ - /* * The ifaddr structure contains information about one address * of an interface. They are maintained by the different address families, @@ -377,7 +375,6 @@ EVENTHANDLER_DECLARE(group_change_event, * chunk of malloc'ed memory, where we store the three addresses * (ifa_addr, ifa_dstaddr and ifa_netmask) referenced here. */ -#if defined(_KERNEL) || defined(_WANT_IFADDR) struct ifaddr { struct sockaddr *ifa_addr; /* address of interface */ struct sockaddr *ifa_dstaddr; /* other end of p-to-p link */ @@ -389,6 +386,8 @@ struct ifaddr { void (*ifa_rtrequest) /* check or clean routes (+ or -)'d */ (int, struct rtentry *, struct rt_addrinfo *); u_short ifa_flags; /* mostly rt_flags for cloning */ +#define IFA_ROUTE RTF_UP /* route installed */ +#define IFA_RTSELF RTF_HOST /* loopback route to self installed */ u_int ifa_refcnt; /* references to this structure */ counter_u64_t ifa_ipackets; @@ -396,11 +395,6 @@ struct ifaddr { counter_u64_t ifa_ibytes; counter_u64_t ifa_obytes; }; -#endif - -#ifdef _KERNEL -#define IFA_ROUTE RTF_UP /* route installed */ -#define IFA_RTSELF RTF_HOST /* loopback route to self installed */ /* For compatibility with other BSDs. SCTP uses it. */ #define ifa_list ifa_link Modified: head/sys/netinet/in_var.h ============================================================================== --- head/sys/netinet/in_var.h Thu Feb 19 23:14:35 2015 (r279029) +++ head/sys/netinet/in_var.h Thu Feb 19 23:16:10 2015 (r279030) @@ -50,7 +50,7 @@ struct in_ifinfo { struct in_multi *ii_allhosts; /* 224.0.0.1 membership */ }; -#if defined(_KERNEL) || defined(_WANT_IFADDR) +#ifdef _KERNEL /* * Interface address, Internet version. One of these structures * is allocated for each Internet address on an interface. @@ -71,7 +71,7 @@ struct in_ifaddr { #define ia_broadaddr ia_dstaddr struct sockaddr_in ia_sockmask; /* reserve space for general netmask */ }; -#endif +#endif /* _KERNEL */ struct in_aliasreq { char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Thu Feb 19 23:14:35 2015 (r279029) +++ head/sys/netinet6/in6_var.h Thu Feb 19 23:16:10 2015 (r279030) @@ -110,7 +110,7 @@ struct in6_ifextra { #define LLTABLE6(ifp) (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->lltable) -#if defined(_KERNEL) || defined(_WANT_IFADDR) +#ifdef _KERNEL struct in6_ifaddr { struct ifaddr ia_ifa; /* protocol-independent info */ #define ia_ifp ia_ifa.ifa_ifp @@ -141,7 +141,7 @@ struct in6_ifaddr { /* List of in6_ifaddr's. */ TAILQ_HEAD(in6_ifaddrhead, in6_ifaddr); LIST_HEAD(in6_ifaddrlisthead, in6_ifaddr); -#endif +#endif /* _KERNEL */ /* control structure to manage address selection policy */ struct in6_addrpolicy {