aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2011-02-14 16:38:32 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2011-02-14 16:38:32 +0000
commitfc81e9e04a3eba91ccaeb0be97230927fe094f83 (patch)
treedb65ff715f2ec92353d27a88ccf23201c61e6bcd
parent5da2d20a3685c6cd1b420083819c48abbeac9c4c (diff)
Notes
-rw-r--r--sys/compat/linprocfs/linprocfs.c39
1 files changed, 31 insertions, 8 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index a1e22399d88a..5d88f392509d 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -1214,20 +1214,43 @@ linprocfs_donetdev(PFS_FILL_ARGS)
char ifname[16]; /* XXX LINUX_IFNAMSIZ */
struct ifnet *ifp;
- sbuf_printf(sb, "%6s|%58s|%s\n%6s|%58s|%58s\n",
- "Inter-", " Receive", " Transmit", " face",
- "bytes packets errs drop fifo frame compressed",
- "bytes packets errs drop fifo frame compressed");
+ sbuf_printf(sb, "%6s|%58s|%s\n"
+ "%6s|%58s|%58s\n",
+ "Inter-", " Receive", " Transmit",
+ " face",
+ "bytes packets errs drop fifo frame compressed multicast",
+ "bytes packets errs drop fifo colls carrier compressed");
CURVNET_SET(TD_TO_VNET(curthread));
IFNET_RLOCK();
TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
linux_ifname(ifp, ifname, sizeof ifname);
- sbuf_printf(sb, "%6.6s:", ifname);
- sbuf_printf(sb, "%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu ",
- 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL);
+ sbuf_printf(sb, "%6.6s: ", ifname);
+ sbuf_printf(sb, "%7lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu ",
+ ifp->if_ibytes, /* rx_bytes */
+ ifp->if_ipackets, /* rx_packets */
+ ifp->if_ierrors, /* rx_errors */
+ ifp->if_iqdrops, /* rx_dropped +
+ * rx_missed_errors */
+ 0UL, /* rx_fifo_errors */
+ 0UL, /* rx_length_errors +
+ * rx_over_errors +
+ * rx_crc_errors +
+ * rx_frame_errors */
+ 0UL, /* rx_compressed */
+ ifp->if_imcasts); /* multicast, XXX-BZ rx only? */
sbuf_printf(sb, "%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n",
- 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL);
+ ifp->if_obytes, /* tx_bytes */
+ ifp->if_opackets, /* tx_packets */
+ ifp->if_oerrors, /* tx_errors */
+ 0UL, /* tx_dropped */
+ 0UL, /* tx_fifo_errors */
+ ifp->if_collisions, /* collisions */
+ 0UL, /* tx_carrier_errors +
+ * tx_aborted_errors +
+ * tx_window_errors +
+ * tx_heartbeat_errors */
+ 0UL); /* tx_compressed */
}
IFNET_RUNLOCK();
CURVNET_RESTORE();