source: svn/trunk/newcon3bcm2_21bu/toolchain/mipsel-linux-uclibc/include/linux/netdevice.h @ 29

Last change on this file since 29 was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 3.4 KB
Line 
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#include <asm/types.h>
33#include <endian.h>
34#include <byteswap.h>
35
36#define MAX_ADDR_LEN    32              /* Largest hardware address length */
37
38/* Driver transmit return codes */
39#define NETDEV_TX_OK 0          /* driver took care of packet */
40#define NETDEV_TX_BUSY 1        /* driver tx path was busy*/
41#define NETDEV_TX_LOCKED -1     /* driver tx lock was already taken */
42
43/*
44 *      Compute the worst case header length according to the protocols
45 *      used.
46 */
47 
48#if !defined(CONFIG_AX25) && !defined(CONFIG_AX25_MODULE) && !defined(CONFIG_TR)
49#define LL_MAX_HEADER   32
50#else
51#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
52#define LL_MAX_HEADER   96
53#else
54#define LL_MAX_HEADER   48
55#endif
56#endif
57
58#if !defined(CONFIG_NET_IPIP) && \
59    !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE)
60#define MAX_HEADER LL_MAX_HEADER
61#else
62#define MAX_HEADER (LL_MAX_HEADER + 48)
63#endif
64
65/*
66 *      Network device statistics. Akin to the 2.0 ether stats but
67 *      with byte counters.
68 */
69 
70struct net_device_stats
71{
72        unsigned long   rx_packets;             /* total packets received       */
73        unsigned long   tx_packets;             /* total packets transmitted    */
74        unsigned long   rx_bytes;               /* total bytes received         */
75        unsigned long   tx_bytes;               /* total bytes transmitted      */
76        unsigned long   rx_errors;              /* bad packets received         */
77        unsigned long   tx_errors;              /* packet transmit problems     */
78        unsigned long   rx_dropped;             /* no space in linux buffers    */
79        unsigned long   tx_dropped;             /* no space available in linux  */
80        unsigned long   multicast;              /* multicast packets received   */
81        unsigned long   collisions;
82
83        /* detailed rx_errors: */
84        unsigned long   rx_length_errors;
85        unsigned long   rx_over_errors;         /* receiver ring buff overflow  */
86        unsigned long   rx_crc_errors;          /* recved pkt with crc error    */
87        unsigned long   rx_frame_errors;        /* recv'd frame alignment error */
88        unsigned long   rx_fifo_errors;         /* recv'r fifo overrun          */
89        unsigned long   rx_missed_errors;       /* receiver missed packet       */
90
91        /* detailed tx_errors */
92        unsigned long   tx_aborted_errors;
93        unsigned long   tx_carrier_errors;
94        unsigned long   tx_fifo_errors;
95        unsigned long   tx_heartbeat_errors;
96        unsigned long   tx_window_errors;
97       
98        /* for cslip etc */
99        unsigned long   rx_compressed;
100        unsigned long   tx_compressed;
101};
102
103
104/* Media selection options. */
105enum {
106        IF_PORT_UNKNOWN = 0,
107        IF_PORT_10BASE2,
108        IF_PORT_10BASET,
109        IF_PORT_AUI,
110        IF_PORT_100BASET,
111        IF_PORT_100BASETX,
112        IF_PORT_100BASEFX
113};
114
115#endif  /* _LINUX_DEV_H */
Note: See TracBrowser for help on using the repository browser.