diff options
author | glebius <glebius@FreeBSD.org> | 2014-03-05 01:47:08 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-03-05 01:47:08 +0000 |
commit | 2d3e25388b4cb92f4a1d626f647ec517607a8b81 (patch) | |
tree | 4e893daa62fc9e93a60c1b2559bdd5f74c12c39b | |
parent | 8c6c5d08ceaa94eb7a79dbf9d8af3ce67a0e380d (diff) | |
download | FreeBSD-src-2d3e25388b4cb92f4a1d626f647ec517607a8b81.zip FreeBSD-src-2d3e25388b4cb92f4a1d626f647ec517607a8b81.tar.gz |
Hide struct rtentry from userland.
-rw-r--r-- | sys/net/route.h | 3 | ||||
-rw-r--r-- | usr.bin/netstat/route.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/route.h b/sys/net/route.h index f15be36..61f3b29 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -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; diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index 56a0f06..eee5ff7 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -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> |