netdevice.h revision 04a9fc0a50f9a7677f22c9746cf2f4aadc2c8257
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 *	Old network device statistics. Fields are native words
39 *	(unsigned long) so they can be read and written atomically.
40 */
41
42struct net_device_stats {
43	unsigned long	rx_packets;
44	unsigned long	tx_packets;
45	unsigned long	rx_bytes;
46	unsigned long	tx_bytes;
47	unsigned long	rx_errors;
48	unsigned long	tx_errors;
49	unsigned long	rx_dropped;
50	unsigned long	tx_dropped;
51	unsigned long	multicast;
52	unsigned long	collisions;
53	unsigned long	rx_length_errors;
54	unsigned long	rx_over_errors;
55	unsigned long	rx_crc_errors;
56	unsigned long	rx_frame_errors;
57	unsigned long	rx_fifo_errors;
58	unsigned long	rx_missed_errors;
59	unsigned long	tx_aborted_errors;
60	unsigned long	tx_carrier_errors;
61	unsigned long	tx_fifo_errors;
62	unsigned long	tx_heartbeat_errors;
63	unsigned long	tx_window_errors;
64	unsigned long	rx_compressed;
65	unsigned long	tx_compressed;
66};
67
68/* Media selection options. */
69enum {
70        IF_PORT_UNKNOWN = 0,
71        IF_PORT_10BASE2,
72        IF_PORT_10BASET,
73        IF_PORT_AUI,
74        IF_PORT_100BASET,
75        IF_PORT_100BASETX,
76        IF_PORT_100BASEFX
77};
78
79
80#endif	/* _LINUX_NETDEVICE_H */
81