This diff hides a bunch of structures (namely arpcom, llinfo_arp,
ethernet multicast macros along the way, and in_ifaddr the same
way in6_ifaddr is hidden).

OK?

diff --git sys/netinet/if_ether.h sys/netinet/if_ether.h
index 9ef9c12..459c3fa 100644
--- sys/netinet/if_ether.h
+++ sys/netinet/if_ether.h
@@ -144,10 +144,11 @@ struct    ether_arp {
 #define        arp_pro ea_hdr.ar_pro
 #define        arp_hln ea_hdr.ar_hln
 #define        arp_pln ea_hdr.ar_pln
 #define        arp_op  ea_hdr.ar_op
 
+#ifdef _KERNEL
 /*
  * Structure shared between the ethernet driver modules and
  * the address resolution code.  For example, each ec_softc or il_softc
  * begins with this structure.
  */
@@ -169,10 +170,11 @@ struct llinfo_arp {
        int     la_hold_count;          /* number of packets queued */
        long    la_asked;               /* last time we QUERIED for this addr */
 };
 #define MAX_HOLD_QUEUE 10
 #define MAX_HOLD_TOTAL 100
+#endif
 
 struct sockaddr_inarp {
        u_int8_t  sin_len;
        u_int8_t  sin_family;
        u_int16_t sin_port;
@@ -204,11 +206,10 @@ void      arp_ifinit(struct arpcom *, struct ifaddr *);
 void   arp_rtrequest(int, struct rtentry *);
 
 int    ether_addmulti(struct ifreq *, struct arpcom *);
 int    ether_delmulti(struct ifreq *, struct arpcom *);
 int    ether_multiaddr(struct sockaddr *, u_int8_t[], u_int8_t[]);
-#endif /* _KERNEL */
 
 /*
  * Ethernet multicast address structure.  There is one of these for each
  * multicast address or range of multicast addresses that we are supposed
  * to listen to on a particular interface.  They are kept in a linked list,
@@ -272,12 +273,10 @@ do {                                                      
                \
 do {                                                                   \
        (step).e_enm = LIST_FIRST(&(ac)->ac_multiaddrs);                \
        ETHER_NEXT_MULTI((step), (enm));                                \
 } while (/* CONSTCOND */ 0)
 
-#ifdef _KERNEL
-
 #ifdef NFSCLIENT
 extern struct ifnet *revarp_ifp;
 #endif /* NFSCLIENT */
 
 void arprequest(struct ifnet *, u_int32_t *, u_int32_t *, u_int8_t *);
diff --git sys/netinet/in_var.h sys/netinet/in_var.h
index 249966b..88557a7 100644
--- sys/netinet/in_var.h
+++ sys/netinet/in_var.h
@@ -35,10 +35,11 @@
 #ifndef _NETINET_IN_VAR_H_
 #define _NETINET_IN_VAR_H_
 
 #include <sys/queue.h>
 
+#ifdef _KERNEL
 /*
  * Interface address, Internet version.  One of these structures
  * is allocated for each interface with an Internet address.
  * The ifaddr structure contains the protocol-independent part
  * of the structure and is assumed to be first.
@@ -57,10 +58,11 @@ struct in_ifaddr {
        struct  sockaddr_in ia_sockmask; /* reserve space for general netmask */
        LIST_HEAD(, in_multi) ia_multiaddrs; /* list of multicast addresses */
        struct  in_multi *ia_allhosts;  /* multicast address record for
                                           the allhosts multicast group */
 };
+#endif
 
 struct in_aliasreq {
        char    ifra_name[IFNAMSIZ];            /* if name, e.g. "en0" */
        union {
                struct  sockaddr_in ifrau_addr;

Reply via email to