• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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@lxorguk.ukuu.org.uk>
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 #include <linux/if_link.h>
32 
33 
34 #define MAX_ADDR_LEN	32		/* Largest hardware address length */
35 
36 
37 /*
38  *	Network device statistics. Akin to the 2.0 ether stats but
39  *	with byte counters.
40  */
41 
42 struct net_device_stats {
43 	unsigned long	rx_packets;		/* total packets received	*/
44 	unsigned long	tx_packets;		/* total packets transmitted	*/
45 	unsigned long	rx_bytes;		/* total bytes received 	*/
46 	unsigned long	tx_bytes;		/* total bytes transmitted	*/
47 	unsigned long	rx_errors;		/* bad packets received		*/
48 	unsigned long	tx_errors;		/* packet transmit problems	*/
49 	unsigned long	rx_dropped;		/* no space in linux buffers	*/
50 	unsigned long	tx_dropped;		/* no space available in linux	*/
51 	unsigned long	multicast;		/* multicast packets received	*/
52 	unsigned long	collisions;
53 
54 	/* detailed rx_errors: */
55 	unsigned long	rx_length_errors;
56 	unsigned long	rx_over_errors;		/* receiver ring buff overflow	*/
57 	unsigned long	rx_crc_errors;		/* recved pkt with crc error	*/
58 	unsigned long	rx_frame_errors;	/* recv'd frame alignment error */
59 	unsigned long	rx_fifo_errors;		/* recv'r fifo overrun		*/
60 	unsigned long	rx_missed_errors;	/* receiver missed packet	*/
61 
62 	/* detailed tx_errors */
63 	unsigned long	tx_aborted_errors;
64 	unsigned long	tx_carrier_errors;
65 	unsigned long	tx_fifo_errors;
66 	unsigned long	tx_heartbeat_errors;
67 	unsigned long	tx_window_errors;
68 
69 	/* for cslip etc */
70 	unsigned long	rx_compressed;
71 	unsigned long	tx_compressed;
72 };
73 
74 
75 /* Media selection options. */
76 enum {
77         IF_PORT_UNKNOWN = 0,
78         IF_PORT_10BASE2,
79         IF_PORT_10BASET,
80         IF_PORT_AUI,
81         IF_PORT_100BASET,
82         IF_PORT_100BASETX,
83         IF_PORT_100BASEFX
84 };
85 
86 
87 #endif	/* _LINUX_NETDEVICE_H */
88