netdevice.h revision c40bba6922b470c0fd0c7a7b8b09584527c468e9
1811d75ee35b8b061a9b10a4e7b81e0c0eaf739c3Argyrios Kyrtzidis/* 283fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * INET An implementation of the TCP/IP protocol suite for the LINUX 383fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * operating system. INET is implemented using the BSD Socket 483fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * interface as the means of communication with the user level. 583fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * 683fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * Definitions for the Interfaces handler. 783fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * 883fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * Version: @(#)dev.h 1.0.10 08/12/93 983fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * 1083fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * Authors: Ross Biro 1183fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 1283fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * Corey Minyard <wf-rch!minyard@relay.EU.net> 1383fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * Donald J. Becker, <becker@cesdis.gsfc.nasa.gov> 14afed099bd2e759efd4bb63fdc525d3445f94cc13Daniel Dunbar * Alan Cox, <alan@lxorguk.ukuu.org.uk> 15682180bf823c315cf2d7f2bb866a310649dbb216Argyrios Kyrtzidis * Bjorn Ekwall. <bj0rn@blox.se> 16682180bf823c315cf2d7f2bb866a310649dbb216Argyrios Kyrtzidis * Pekka Riikonen <priikone@poseidon.pspt.fi> 1783fc147dc253197fe22518757e6e6bbfbf073c0dTed Kremenek * 18afed099bd2e759efd4bb63fdc525d3445f94cc13Daniel Dunbar * 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/* 42 * Network device statistics. Akin to the 2.0 ether stats but 43 * with byte counters. 44 */ 45 46struct net_device_stats 47{ 48 unsigned long rx_packets; /* total packets received */ 49 unsigned long tx_packets; /* total packets transmitted */ 50 unsigned long rx_bytes; /* total bytes received */ 51 unsigned long tx_bytes; /* total bytes transmitted */ 52 unsigned long rx_errors; /* bad packets received */ 53 unsigned long tx_errors; /* packet transmit problems */ 54 unsigned long rx_dropped; /* no space in linux buffers */ 55 unsigned long tx_dropped; /* no space available in linux */ 56 unsigned long multicast; /* multicast packets received */ 57 unsigned long collisions; 58 59 /* detailed rx_errors: */ 60 unsigned long rx_length_errors; 61 unsigned long rx_over_errors; /* receiver ring buff overflow */ 62 unsigned long rx_crc_errors; /* recved pkt with crc error */ 63 unsigned long rx_frame_errors; /* recv'd frame alignment error */ 64 unsigned long rx_fifo_errors; /* recv'r fifo overrun */ 65 unsigned long rx_missed_errors; /* receiver missed packet */ 66 67 /* detailed tx_errors */ 68 unsigned long tx_aborted_errors; 69 unsigned long tx_carrier_errors; 70 unsigned long tx_fifo_errors; 71 unsigned long tx_heartbeat_errors; 72 unsigned long tx_window_errors; 73 74 /* for cslip etc */ 75 unsigned long rx_compressed; 76 unsigned long tx_compressed; 77}; 78 79 80/* Media selection options. */ 81enum { 82 IF_PORT_UNKNOWN = 0, 83 IF_PORT_10BASE2, 84 IF_PORT_10BASET, 85 IF_PORT_AUI, 86 IF_PORT_100BASET, 87 IF_PORT_100BASETX, 88 IF_PORT_100BASEFX 89}; 90 91 92#endif /* _LINUX_NETDEVICE_H */ 93