diff -r 8fa0571f9996 -r 69f2b2702336 master/device.h --- a/master/device.h Wed Nov 09 12:58:09 2011 +0100 +++ b/master/device.h Wed Nov 09 14:53:33 2011 +0100 @@ -101,19 +101,26 @@ u64 tx_count; /**< Number of frames sent. */ u64 last_tx_count; /**< Number of frames sent of last statistics cycle. */ u64 rx_count; /**< Number of frames received. */ - u64 tx_bytes; /**< Number of frames sent. */ + u64 last_rx_count; /**< Number of frames received of last statistics + cycle. */ + u64 tx_bytes; /**< Number of bytes sent. */ u64 last_tx_bytes; /**< Number of bytes sent of last statistics cycle. */ + u64 rx_bytes; /**< Number of bytes received. */ + u64 last_rx_bytes; /**< Number of bytes received of last statistics cycle. + */ u64 tx_errors; /**< Number of transmit errors. */ - u64 last_loss; /**< Tx/Rx difference of last statistics cycle. */ unsigned int tx_frame_rates[EC_RATE_COUNT]; /**< Transmit rates in frames/s for different statistics cycle periods. */ + unsigned int rx_frame_rates[EC_RATE_COUNT]; /**< Receive rates in + frames/s for different + statistics cycle periods. */ unsigned int tx_byte_rates[EC_RATE_COUNT]; /**< Transmit rates in byte/s for different statistics cycle periods. */ - int loss_rates[EC_RATE_COUNT]; /**< Frame loss rates for different - statistics cycle periods. */ - unsigned long stats_jiffies; /**< Jiffies of last statistic cycle. */ + unsigned int rx_byte_rates[EC_RATE_COUNT]; /**< Receive rates in byte/s + for different statistics + cycle periods. */ #ifdef EC_DEBUG_IF ec_debug_t dbg; /**< debug device */ @@ -141,6 +148,7 @@ uint8_t *ec_device_tx_data(ec_device_t *); void ec_device_send(ec_device_t *, size_t); void ec_device_clear_stats(ec_device_t *); +void ec_device_update_stats(ec_device_t *); #ifdef EC_DEBUG_RING void ec_device_debug_ring_append(ec_device_t *, ec_debug_frame_dir_t,