summaryrefslogtreecommitdiffstats
path: root/sys/net/if.h
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-05-20 22:48:39 +0000
committeriedowse <iedowse@FreeBSD.org>2002-05-20 22:48:39 +0000
commit5e19174e4ef09b116ed7a1c94be4212a11f99492 (patch)
treecf5db9cc5201705d2c4fd5e4eca440ea039a8d79 /sys/net/if.h
parent6224af585023ce97c222e9198753003d26efc266 (diff)
downloadFreeBSD-src-5e19174e4ef09b116ed7a1c94be4212a11f99492.zip
FreeBSD-src-5e19174e4ef09b116ed7a1c94be4212a11f99492.tar.gz
Avoid exposing struct if_clone and the sys/queue.h macros to userland
programs by restricting these to the case where _KERNEL is defined. Reviewed by: brooks (ages ago)
Diffstat (limited to 'sys/net/if.h')
-rw-r--r--sys/net/if.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/if.h b/sys/net/if.h
index d25d625..de1b370 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -37,7 +37,9 @@
#ifndef _NET_IF_H_
#define _NET_IF_H_
+#ifdef _KERNEL
#include <sys/queue.h>
+#endif
/*
* <net/if.h> does not depend on <sys/time.h> on most other systems. This
@@ -57,6 +59,7 @@ struct ifnet;
#define IF_NAMESIZE IFNAMSIZ
#define IF_MAXUNIT 0x7fff /* ifp->if_unit is only 15 bits */
+#ifdef _KERNEL
/*
* Structure describing a `cloning' interface.
*/
@@ -74,6 +77,7 @@ struct if_clone {
#define IF_CLONE_INITIALIZER(name, create, destroy, maxunit) \
{ { 0 }, name, sizeof(name) - 1, maxunit, NULL, 0, create, destroy }
+#endif
/*
* Structure used to query names of interface cloners.
OpenPOWER on IntegriCloud