summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/netstat/mbuf.c24
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);