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.
This commit is contained in:
Gleb Smirnoff 2015-02-19 23:16:10 +00:00
parent b0af3a5363
commit e072c794ad
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279030
3 changed files with 6 additions and 12 deletions

View File

@ -365,8 +365,6 @@ EVENTHANDLER_DECLARE(group_change_event, group_change_event_handler_t);
#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, group_change_event_handler_t);
* 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

View File

@ -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" */

View File

@ -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 {