svn commit: r262767 - in head: sys/net usr.bin/netstat

Gleb Smirnoff glebius at FreeBSD.org
Wed Mar 5 01:47:09 UTC 2014


Author: glebius
Date: Wed Mar  5 01:47:08 2014
New Revision: 262767
URL: http://svnweb.freebsd.org/changeset/base/262767

Log:
  Hide struct rtentry from userland.

Modified:
  head/sys/net/route.h
  head/usr.bin/netstat/route.c

Modified: head/sys/net/route.h
==============================================================================
--- head/sys/net/route.h	Wed Mar  5 01:41:10 2014	(r262766)
+++ head/sys/net/route.h	Wed Mar  5 01:47:08 2014	(r262767)
@@ -105,6 +105,8 @@ struct mbuf;
 #include <net/radix_mpath.h>
 #endif
 #endif
+
+#if defined(_KERNEL) || defined(_WANT_RTENTRY)
 struct rtentry {
 	struct	radix_node rt_nodes[2];	/* tree glue, and other values */
 	/*
@@ -127,6 +129,7 @@ struct rtentry {
 	counter_u64_t	rt_pksent;	/* packets sent using this route */
 	struct mtx	rt_mtx;		/* mutex for routing entry */
 };
+#endif /* _KERNEL || _WANT_RTENTRY */
 
 /*
  * Following structure necessary for 4.3 compatibility;

Modified: head/usr.bin/netstat/route.c
==============================================================================
--- head/usr.bin/netstat/route.c	Wed Mar  5 01:41:10 2014	(r262766)
+++ head/usr.bin/netstat/route.c	Wed Mar  5 01:47:08 2014	(r262767)
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
 #include <net/if_dl.h>
 #include <net/if_types.h>
 #include <net/radix.h>
+#define	_WANT_RTENTRY
 #include <net/route.h>
 
 #include <netinet/in.h>


More information about the svn-src-head mailing list