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