diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2015-02-19 23:16:10 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2015-02-19 23:16:10 +0000 |
commit | e072c794ad546141ca36a77dacd772280cc51601 (patch) | |
tree | d1a73e3b79a17ded7bbfee5736d483701c497ca7 | |
parent | b0af3a5363f5f962018bcc0f73b2d348c2391447 (diff) | |
download | src-e072c794ad546141ca36a77dacd772280cc51601.tar.gz src-e072c794ad546141ca36a77dacd772280cc51601.zip |
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.
Notes
Notes:
svn path=/head/; revision=279030
-rw-r--r-- | sys/net/if_var.h | 10 | ||||
-rw-r--r-- | sys/netinet/in_var.h | 4 | ||||
-rw-r--r-- | sys/netinet6/in6_var.h | 4 |
3 files changed, 6 insertions, 12 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 98e9828dab5b..e7166f263455 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -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 diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index 2a8e28e43509..a3fbd14e9417 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -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" */ diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 7da67bb5dfb7..7d1551bd9524 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -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 { |