netdevice.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * INET An implementation of the TCP/IP protocol suite for the LINUX
  3. * operating system. INET is implemented using the BSD Socket
  4. * interface as the means of communication with the user level.
  5. *
  6. * Definitions for the Interfaces handler.
  7. *
  8. * Version: @(#)dev.h 1.0.10 08/12/93
  9. *
  10. * Authors: Ross Biro
  11. * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  12. * Corey Minyard <wf-rch!minyard@relay.EU.net>
  13. * Donald J. Becker, <becker@cesdis.gsfc.nasa.gov>
  14. * Alan Cox, <Alan.Cox@linux.org>
  15. * Bjorn Ekwall. <bj0rn@blox.se>
  16. * Pekka Riikonen <priikone@poseidon.pspt.fi>
  17. *
  18. * This program is free software; you can redistribute it and/or
  19. * modify it under the terms of the GNU General Public License
  20. * as published by the Free Software Foundation; either version
  21. * 2 of the License, or (at your option) any later version.
  22. *
  23. * Moved to /usr/include/linux for NET3
  24. */
  25. #ifndef _LINUX_NETDEVICE_H
  26. #define _LINUX_NETDEVICE_H
  27. /*
  28. * Network device statistics. Akin to the 2.0 ether stats but
  29. * with byte counters.
  30. */
  31. struct net_device_stats {
  32. unsigned long rx_packets; /* total packets received */
  33. unsigned long tx_packets; /* total packets transmitted */
  34. unsigned long rx_bytes; /* total bytes received */
  35. unsigned long tx_bytes; /* total bytes transmitted */
  36. unsigned long rx_errors; /* bad packets received */
  37. unsigned long tx_errors; /* packet transmit problems */
  38. unsigned long rx_dropped; /* no space in linux buffers */
  39. unsigned long tx_dropped; /* no space available in linux */
  40. unsigned long multicast; /* multicast packets received */
  41. unsigned long collisions;
  42. /* detailed rx_errors: */
  43. unsigned long rx_length_errors;
  44. unsigned long rx_over_errors; /* receiver ring buff overflow */
  45. unsigned long rx_crc_errors; /* recved pkt with crc error */
  46. unsigned long rx_frame_errors; /* recv'd frame alignment error */
  47. unsigned long rx_fifo_errors; /* recv'r fifo overrun */
  48. unsigned long rx_missed_errors; /* receiver missed packet */
  49. /* detailed tx_errors */
  50. unsigned long tx_aborted_errors;
  51. unsigned long tx_carrier_errors;
  52. unsigned long tx_fifo_errors;
  53. unsigned long tx_heartbeat_errors;
  54. unsigned long tx_window_errors;
  55. /* for cslip etc */
  56. unsigned long rx_compressed;
  57. unsigned long tx_compressed;
  58. };
  59. #endif /* _LINUX_NETDEVICE_H */