svn commit: r281191 - projects/ifnet/sys/net
Gleb Smirnoff
glebius at FreeBSD.org
Tue Apr 7 06:17:36 UTC 2015
Author: glebius
Date: Tue Apr 7 06:17:34 2015
New Revision: 281191
URL: https://svnweb.freebsd.org/changeset/base/281191
Log:
Make if_var.h a kernel-only include.
Ideally the header should #error, but since FreeBSD 3.0 we have taught
many third party applications to always include if_var.h along with if.h
on FreeBSD, thus #error lives under BURN_BRIDGES.
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
Modified:
projects/ifnet/sys/net/if_var.h
Modified: projects/ifnet/sys/net/if_var.h
==============================================================================
--- projects/ifnet/sys/net/if_var.h Tue Apr 7 06:11:57 2015 (r281190)
+++ projects/ifnet/sys/net/if_var.h Tue Apr 7 06:17:34 2015 (r281191)
@@ -32,6 +32,11 @@
#ifndef _NET_IF_VAR_H_
#define _NET_IF_VAR_H_
+#ifndef _KERNEL
+#ifdef BURN_BRIDGES
+#error "no user-servicable parts inside"
+#endif
+#else
struct rtentry; /* ifa_rtrequest */
struct rt_addrinfo; /* ifa_rtrequest */
@@ -41,11 +46,9 @@ struct ifvlantrunk;
struct ifmedia;
struct netmap_adapter;
-#ifdef _KERNEL
#include <sys/mbuf.h> /* ifqueue only? */
#include <sys/buf_ring.h>
#include <net/vnet.h>
-#endif /* _KERNEL */
#include <sys/counter.h>
#include <sys/lock.h> /* XXX */
#include <sys/mutex.h> /* struct ifqueue */
@@ -59,10 +62,8 @@ TAILQ_HEAD(ifaddrhead, ifaddr); /* insta
TAILQ_HEAD(ifmultihead, ifmultiaddr);
TAILQ_HEAD(ifgrouphead, ifg_group);
-#ifdef _KERNEL
VNET_DECLARE(struct pfil_head, link_pfil_hook); /* packet filter hooks */
#define V_link_pfil_hook VNET(link_pfil_hook)
-#endif /* _KERNEL */
typedef void (*iftype_attach_t)(if_t ifp, struct if_attach_args *args);
typedef void (*iftype_detach_t)(if_t ifp);
@@ -202,7 +203,6 @@ struct ifnet {
#define IF_ADDR_LOCK_ASSERT(ifp) IF_LOCK_ASSERT(ifp)
#define IF_ADDR_WLOCK_ASSERT(ifp) IF_WLOCK_ASSERT(ifp)
-#ifdef _KERNEL
#ifdef _SYS_EVENTHANDLER_H_
/* interface link layer address change event */
typedef void (*iflladdr_event_handler_t)(void *, struct ifnet *);
More information about the svn-src-projects
mailing list