diff options
author | denny <denny@cvs.openbsd.org> | 1997-07-23 02:50:56 +0000 |
---|---|---|
committer | denny <denny@cvs.openbsd.org> | 1997-07-23 02:50:56 +0000 |
commit | 3bee95fea8a62e43f33a07f5aad7bc3a854d1410 (patch) | |
tree | df0a8f55cabf0d3d9a3c9a068893eaa9d40f8ed0 /usr.bin | |
parent | 63f918fe7ce1a1bb3b342d2d0ae6cbd850524c48 (diff) |
Update for new <sys/mbuf.h>
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/netstat/mbuf.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/usr.bin/netstat/mbuf.c b/usr.bin/netstat/mbuf.c index a8fd9e3fb21..94121d0e2e0 100644 --- a/usr.bin/netstat/mbuf.c +++ b/usr.bin/netstat/mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mbuf.c,v 1.5 1997/06/29 21:46:03 millert Exp $ */ +/* $OpenBSD: mbuf.c,v 1.6 1997/07/23 02:50:55 denny Exp $ */ /* $NetBSD: mbuf.c,v 1.9 1996/05/07 02:55:03 thorpej Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "from: @(#)mbuf.c 8.1 (Berkeley) 6/6/93"; #else -static char *rcsid = "$OpenBSD: mbuf.c,v 1.5 1997/06/29 21:46:03 millert Exp $"; +static char *rcsid = "$OpenBSD: mbuf.c,v 1.6 1997/07/23 02:50:55 denny Exp $"; #endif #endif /* not lint */ @@ -64,9 +64,16 @@ static struct mbtypes { { MT_OOBDATA, "oob data" }, { MT_CONTROL, "ancillary data" }, { MT_HEADER, "packet headers" }, + { MT_SOCKET, "socket structures" }, /* XXX */ + { MT_PCB, "protocol control blocks" }, /* XXX */ + { MT_RTABLE, "routing table entries" }, /* XXX */ + { MT_HTABLE, "IMP host table entries" }, /* XXX */ + { MT_ATABLE, "address resolution tables" }, { MT_FTABLE, "fragment reassembly queue headers" }, /* XXX */ { MT_SONAME, "socket names and addresses" }, { MT_SOOPTS, "socket options" }, + { MT_RIGHTS, "access rights" }, + { MT_IFADDR, "interface addresses" }, /* XXX */ { 0, 0 } }; @@ -100,18 +107,21 @@ mbpr(mbaddr) totmbufs = 0; for (mp = mbtypes; mp->mt_name; mp++) totmbufs += mbstat.m_mtypes[mp->mt_type]; - printf("%u mbufs in use:\n", totmbufs); + printf("%u mbuf%s in use:\n", totmbufs, plural(totmbufs)); for (mp = mbtypes; mp->mt_name; mp++) if (mbstat.m_mtypes[mp->mt_type]) { seen[mp->mt_type] = YES; - printf("\t%u mbufs allocated to %s\n", - mbstat.m_mtypes[mp->mt_type], mp->mt_name); + printf("\t%u mbuf%s allocated to %s\n", + mbstat.m_mtypes[mp->mt_type], + plural((int)mbstat.m_mtypes[mp->mt_type]), + mp->mt_name); } seen[MT_FREE] = YES; for (i = 0; i < nmbtypes; i++) if (!seen[i] && mbstat.m_mtypes[i]) { - printf("\t%u mbufs allocated to <mbuf type %d>\n", - mbstat.m_mtypes[i], i); + printf("\t%u mbuf%s allocated to <mbuf type %d>\n", + mbstat.m_mtypes[i], + plural((int)mbstat.m_mtypes[i]), i); } printf("%lu/%lu mapped pages in use\n", mbstat.m_clusters - mbstat.m_clfree, mbstat.m_clusters); |