From fd1b2a7c5737765546e037fd5698a773fb4f8a67 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 19 Feb 2015 06:24:27 +0000 Subject: [PATCH] Widen _KERNEL ifdef to hide more kernel network stack structures from userland. --- sys/netinet/in_var.h | 9 --------- sys/netinet6/in6_var.h | 3 --- sys/sys/mbuf.h | 3 +-- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index 21d648e2eb8e..ad0482e7318e 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -173,7 +173,6 @@ do { \ ifa_ref(&(ia)->ia_ifa); \ IN_IFADDR_RUNLOCK(); \ } while (0) -#endif /* * IP datagram reassembly. @@ -343,8 +342,6 @@ ims_get_mode(const struct in_multi *inm, const struct ip_msource *ims, return (MCAST_UNDEFINED); } -#ifdef _KERNEL - #ifdef SYSCTL_DECL SYSCTL_DECL(_net_inet); SYSCTL_DECL(_net_inet_ip); @@ -425,12 +422,6 @@ void in_rtredirect(struct sockaddr *, struct sockaddr *, struct sockaddr *, int, struct sockaddr *, u_int); int in_rtrequest(int, struct sockaddr *, struct sockaddr *, struct sockaddr *, int, struct rtentry **, u_int); - -#if 0 -int in_rt_getifa(struct rt_addrinfo *, u_int fibnum); -int in_rtioctl(u_long, caddr_t, u_int); -int in_rtrequest1(int, struct rt_addrinfo *, struct rtentry **, u_int); -#endif #endif /* _KERNEL */ /* INET6 stuff */ diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 29578f79fe92..51aa4668d83e 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -596,7 +596,6 @@ ip6_msource_cmp(const struct ip6_msource *a, const struct ip6_msource *b) return (memcmp(&a->im6s_addr, &b->im6s_addr, sizeof(struct in6_addr))); } RB_PROTOTYPE(ip6_msource_tree, ip6_msource, im6s_link, ip6_msource_cmp); -#endif /* _KERNEL */ /* * IPv6 multicast PCB-layer group filter descriptor. @@ -696,8 +695,6 @@ im6s_get_mode(const struct in6_multi *inm, const struct ip6_msource *ims, return (MCAST_UNDEFINED); } -#ifdef _KERNEL - /* * Lock macros for IPv6 layer multicast address lists. IPv6 lock goes * before link layer multicast locks in the lock order. In most cases, diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 1932de411e89..e07111473eb4 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -1190,8 +1190,6 @@ rt_m_getfib(struct mbuf *m) ((_m)->m_pkthdr.fibnum) = (_fib); \ } while (0) -#endif /* _KERNEL */ - #ifdef MBUF_PROFILING void m_profile(struct mbuf *m); #define M_PROFILE(m) m_profile(m) @@ -1296,4 +1294,5 @@ mbufq_prepend(struct mbufq *mq, struct mbuf *m) STAILQ_INSERT_HEAD(&mq->mq_head, m, m_stailqpkt); mq->mq_len++; } +#endif /* _KERNEL */ #endif /* !_SYS_MBUF_H_ */