netdevice.h 2.0 KB

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