xref: /utopia/UTPA2-700.0.x/projects/tools/lint/mips-linux-gnu_include/linux/netdevice.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
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 #include <linux/if.h>
29 #include <linux/if_ether.h>
30 #include <linux/if_packet.h>
31 
32 
33 #define MAX_ADDR_LEN	32		/* Largest hardware address length */
34 
35 /* Driver transmit return codes */
36 #define NETDEV_TX_OK 0		/* driver took care of packet */
37 #define NETDEV_TX_BUSY 1	/* driver tx path was busy*/
38 #define NETDEV_TX_LOCKED -1	/* driver tx lock was already taken */
39 
40 
41 struct net_device_subqueue
42 {
43 	/* Give a control state for each queue.  This struct may contain
44 	 * per-queue locks in the future.
45 	 */
46 	unsigned long   state;
47 };
48 
49 /*
50  *	Network device statistics. Akin to the 2.0 ether stats but
51  *	with byte counters.
52  */
53 
54 struct net_device_stats
55 {
56 	unsigned long	rx_packets;		/* total packets received	*/
57 	unsigned long	tx_packets;		/* total packets transmitted	*/
58 	unsigned long	rx_bytes;		/* total bytes received 	*/
59 	unsigned long	tx_bytes;		/* total bytes transmitted	*/
60 	unsigned long	rx_errors;		/* bad packets received		*/
61 	unsigned long	tx_errors;		/* packet transmit problems	*/
62 	unsigned long	rx_dropped;		/* no space in linux buffers	*/
63 	unsigned long	tx_dropped;		/* no space available in linux	*/
64 	unsigned long	multicast;		/* multicast packets received	*/
65 	unsigned long	collisions;
66 
67 	/* detailed rx_errors: */
68 	unsigned long	rx_length_errors;
69 	unsigned long	rx_over_errors;		/* receiver ring buff overflow	*/
70 	unsigned long	rx_crc_errors;		/* recved pkt with crc error	*/
71 	unsigned long	rx_frame_errors;	/* recv'd frame alignment error */
72 	unsigned long	rx_fifo_errors;		/* recv'r fifo overrun		*/
73 	unsigned long	rx_missed_errors;	/* receiver missed packet	*/
74 
75 	/* detailed tx_errors */
76 	unsigned long	tx_aborted_errors;
77 	unsigned long	tx_carrier_errors;
78 	unsigned long	tx_fifo_errors;
79 	unsigned long	tx_heartbeat_errors;
80 	unsigned long	tx_window_errors;
81 
82 	/* for cslip etc */
83 	unsigned long	rx_compressed;
84 	unsigned long	tx_compressed;
85 };
86 
87 
88 /* Media selection options. */
89 enum {
90         IF_PORT_UNKNOWN = 0,
91         IF_PORT_10BASE2,
92         IF_PORT_10BASET,
93         IF_PORT_AUI,
94         IF_PORT_100BASET,
95         IF_PORT_100BASETX,
96         IF_PORT_100BASEFX
97 };
98 
99 
100 #endif	/* _LINUX_DEV_H */
101