diff options
author | Michael Brown | 2007-07-03 01:15:53 +0200 |
---|---|---|
committer | Michael Brown | 2007-07-03 01:15:53 +0200 |
commit | 4968caab8288664d4fd21417f312f3c5a05df155 (patch) | |
tree | 6c5ecf09777ba61dc056e9253df17ea309885a7d /src/include/gpxe/netdevice.h | |
parent | Ensure that pxe_netdev is set before starting up PXE NBP. (diff) | |
download | ipxe-4968caab8288664d4fd21417f312f3c5a05df155.tar.gz ipxe-4968caab8288664d4fd21417f312f3c5a05df155.tar.xz ipxe-4968caab8288664d4fd21417f312f3c5a05df155.zip |
Add trivial net device statistics (TX and RX packet count), reported
via UNDI API and also by ifstat command; may be useful for debugging.
Diffstat (limited to 'src/include/gpxe/netdevice.h')
-rw-r--r-- | src/include/gpxe/netdevice.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/gpxe/netdevice.h b/src/include/gpxe/netdevice.h index 0060e7d5..c0df7c96 100644 --- a/src/include/gpxe/netdevice.h +++ b/src/include/gpxe/netdevice.h @@ -129,6 +129,17 @@ struct ll_protocol { }; /** + * Network device statistics + * + */ +struct net_device_stats { + /** Count of successfully completed transmissions */ + unsigned int tx_count; + /** Count of successfully received packets */ + unsigned int rx_count; +}; + +/** * A network device * * This structure represents a piece of networking hardware. It has @@ -215,6 +226,8 @@ struct net_device { struct list_head tx_queue; /** RX packet queue */ struct list_head rx_queue; + /** Device statistics */ + struct net_device_stats stats; /** Driver private data */ void *priv; |