source: packages/utils/collectd/patches/110-net-device-stats.patch @ 24237

Last change on this file since 24237 was 24237, checked in by acoul, 6 years ago

utils/collectd: update to version 4.10.2, fix a kernel 2.6.37 issue, refresh patches

File size: 1.3 KB
  • src/interface.c

    ---
     src/interface.c |   33 ++++++++++++++++++++++++++++++++-
     1 file changed, 32 insertions(+), 1 deletion(-)
    
    a b static int interface_read (void) 
    203203#  define IFA_RX_ERROR rx_errors 
    204204#  define IFA_TX_ERROR tx_errors 
    205205#else 
    206 #  error "No suitable type for `struct ifaddrs->ifa_data' found." 
     206struct net_device_stats { 
     207        unsigned long   rx_packets; 
     208        unsigned long   tx_packets; 
     209        unsigned long   rx_bytes; 
     210        unsigned long   tx_bytes; 
     211        unsigned long   rx_errors; 
     212        unsigned long   tx_errors; 
     213        unsigned long   rx_dropped; 
     214        unsigned long   tx_dropped; 
     215        unsigned long   multicast; 
     216        unsigned long   collisions; 
     217        unsigned long   rx_length_errors; 
     218        unsigned long   rx_over_errors; 
     219        unsigned long   rx_crc_errors; 
     220        unsigned long   rx_frame_errors; 
     221        unsigned long   rx_fifo_errors; 
     222        unsigned long   rx_missed_errors; 
     223        unsigned long   tx_aborted_errors; 
     224        unsigned long   tx_carrier_errors; 
     225        unsigned long   tx_fifo_errors; 
     226        unsigned long   tx_heartbeat_errors; 
     227        unsigned long   tx_window_errors; 
     228        unsigned long   rx_compressed; 
     229        unsigned long   tx_compressed; 
     230}; 
     231#  define IFA_DATA net_device_stats 
     232#  define IFA_RX_BYTES rx_bytes 
     233#  define IFA_TX_BYTES tx_bytes 
     234#  define IFA_RX_PACKT rx_packets 
     235#  define IFA_TX_PACKT tx_packets 
     236#  define IFA_RX_ERROR rx_errors 
     237#  define IFA_TX_ERROR tx_errors 
    207238#endif 
    208239 
    209240        struct IFA_DATA *if_data; 
Note: See TracBrowser for help on using the repository browser.