From 5e19174e4ef09b116ed7a1c94be4212a11f99492 Mon Sep 17 00:00:00 2001 From: iedowse Date: Mon, 20 May 2002 22:48:39 +0000 Subject: 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) --- sys/net/if.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/net/if.h') 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 +#endif /* * does not depend on 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. -- cgit v1.1