diff options
author | glebius <glebius@FreeBSD.org> | 2012-01-23 15:39:45 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-01-23 15:39:45 +0000 |
commit | d5bb5249b28f8b367e607754ee57bb2949cff37d (patch) | |
tree | a6f32c6090209a268cc6b156f6907e9958f4e977 /usr.bin | |
parent | 6fbf18d42fa659fa2045199fee26d791fa06a136 (diff) | |
download | FreeBSD-src-d5bb5249b28f8b367e607754ee57bb2949cff37d.zip FreeBSD-src-d5bb5249b28f8b367e607754ee57bb2949cff37d.tar.gz |
In ng_socket(4) expose less kernel internals to userland. This commit
breaks ABI, but makes probability of ABI breakage in future less.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/netstat/netgraph.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.bin/netstat/netgraph.c b/usr.bin/netstat/netgraph.c index d510414..3427dd3 100644 --- a/usr.bin/netstat/netgraph.c +++ b/usr.bin/netstat/netgraph.c @@ -67,7 +67,6 @@ netgraphprotopr(u_long off, const char *name, int af1 __unused, { struct ngpcb *this, *next; struct ngpcb ngpcb; - struct ngsock info; struct socket sockb; int debug = 1; @@ -165,15 +164,10 @@ netgraphprotopr(u_long off, const char *name, int af1 __unused, printf("%-5.5s %6u %6u ", name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); - /* Get ngsock structure */ - if (ngpcb.sockdata == NULL) /* unconnected data socket */ - goto finish; - kread((u_long)ngpcb.sockdata, (char *)&info, sizeof(info)); - /* Get info on associated node */ - if (info.node_id == 0 || csock == -1) + if (ngpcb.node_id == 0 || csock == -1) goto finish; - snprintf(path, sizeof(path), "[%x]:", info.node_id); + snprintf(path, sizeof(path), "[%x]:", ngpcb.node_id); if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, NGM_NODEINFO, NULL, 0) < 0) goto finish; |