The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/bsd/net/if_mib.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
    3  *
    4  * @APPLE_LICENSE_HEADER_START@
    5  * 
    6  * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
    7  * 
    8  * This file contains Original Code and/or Modifications of Original Code
    9  * as defined in and that are subject to the Apple Public Source License
   10  * Version 2.0 (the 'License'). You may not use this file except in
   11  * compliance with the License. Please obtain a copy of the License at
   12  * http://www.opensource.apple.com/apsl/ and read it before using this
   13  * file.
   14  * 
   15  * The Original Code and all software distributed under the License are
   16  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   17  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   18  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   19  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   20  * Please see the License for the specific language governing rights and
   21  * limitations under the License.
   22  * 
   23  * @APPLE_LICENSE_HEADER_END@
   24  */
   25 /*
   26  * Copyright 1996 Massachusetts Institute of Technology
   27  *
   28  * Permission to use, copy, modify, and distribute this software and
   29  * its documentation for any purpose and without fee is hereby
   30  * granted, provided that both the above copyright notice and this
   31  * permission notice appear in all copies, that both the above
   32  * copyright notice and this permission notice appear in all
   33  * supporting documentation, and that the name of M.I.T. not be used
   34  * in advertising or publicity pertaining to distribution of the
   35  * software without specific, written prior permission.  M.I.T. makes
   36  * no representations about the suitability of this software for any
   37  * purpose.  It is provided "as is" without express or implied
   38  * warranty.
   39  * 
   40  * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''.  M.I.T. DISCLAIMS
   41  * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
   42  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   43  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
   44  * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   45  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   46  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   47  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   48  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   49  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   50  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   51  * SUCH DAMAGE.
   52  *
   53  * $FreeBSD: src/sys/net/if_mib.h,v 1.6 1999/08/28 00:48:19 peter Exp $
   54  */
   55 
   56 #ifndef _NET_IF_MIB_H
   57 #define _NET_IF_MIB_H   1
   58 #include <sys/appleapiopts.h>
   59 
   60 #ifdef __APPLE_API_UNSTABLE
   61 struct ifmibdata {
   62         char    ifmd_name[IFNAMSIZ]; /* name of interface */
   63         int     ifmd_pcount;    /* number of promiscuous listeners */
   64         int     ifmd_flags;     /* interface flags */
   65         int     ifmd_snd_len;   /* instantaneous length of send queue */
   66         int     ifmd_snd_maxlen; /* maximum length of send queue */
   67         int     ifmd_snd_drops; /* number of drops in send queue */
   68         int     ifmd_filler[4]; /* for future expansion */
   69         struct  if_data ifmd_data; /* generic information and statistics */
   70 };
   71 
   72 /*
   73  * sysctl MIB tags at the net.link.generic level
   74  */
   75 #define IFMIB_SYSTEM    1       /* non-interface-specific */
   76 #define IFMIB_IFDATA    2       /* per-interface data table */
   77 
   78 /*
   79  * MIB tags for the various net.link.generic.ifdata tables
   80  */
   81 #define IFDATA_GENERAL  1       /* generic stats for all kinds of ifaces */
   82 #define IFDATA_LINKSPECIFIC     2 /* specific to the type of interface */
   83 
   84 /*
   85  * MIB tags at the net.link.generic.system level
   86  */
   87 #define IFMIB_IFCOUNT   1       /* number of interfaces configured */
   88 
   89 /*
   90  * MIB tags as the net.link level
   91  * All of the other values are IFT_* names defined in if_types.h.
   92  */
   93 #define NETLINK_GENERIC 0       /* functions not specific to a type of iface */
   94 
   95 /*
   96  * The reason why the IFDATA_LINKSPECIFIC stuff is not under the
   97  * net.link.<iftype> branches is twofold:
   98  *   1) It's easier to code this way, and doesn't require duplication.
   99  *   2) The fourth level under net.link.<iftype> is <pf>; that is to say,
  100  *      the net.link.<iftype> tree instruments the adaptation layers between
  101  *      <iftype> and a particular protocol family (e.g., net.link.ether.inet
  102  *      instruments ARP).  This does not really leave room for anything else
  103  *      that needs to have a well-known number.
  104  */
  105 
  106 /*
  107  * Link-specific MIB structures for various link types.
  108  */
  109 
  110 /* For IFT_ETHER, IFT_ISO88023, and IFT_STARLAN, as used by RFC 1650 */
  111 struct ifmib_iso_8802_3 {
  112         u_int32_t       dot3StatsAlignmentErrors;
  113         u_int32_t       dot3StatsFCSErrors;
  114         u_int32_t       dot3StatsSingleCollisionFrames;
  115         u_int32_t       dot3StatsMultipleCollisionFrames;
  116         u_int32_t       dot3StatsSQETestErrors;
  117         u_int32_t       dot3StatsDeferredTransmissions;
  118         u_int32_t       dot3StatsLateCollisions;
  119         u_int32_t       dot3StatsExcessiveCollisions;
  120         u_int32_t       dot3StatsInternalMacTransmitErrors;
  121         u_int32_t       dot3StatsCarrierSenseErrors;
  122         u_int32_t       dot3StatsFrameTooLongs;
  123         u_int32_t       dot3StatsInternalMacReceiveErrors;
  124         u_int32_t       dot3StatsEtherChipSet;
  125         /* Matt Thomas wants this one, not included in RFC 1650: */
  126         u_int32_t       dot3StatsMissedFrames;
  127 
  128         u_int32_t       dot3StatsCollFrequencies[16]; /* NB: index origin */
  129 
  130         u_int32_t       dot3Compliance;
  131 #define DOT3COMPLIANCE_STATS    1
  132 #define DOT3COMPLIANCE_COLLS    2
  133 };
  134 
  135 /*
  136  * Chipset identifiers are normally part of the vendor's enterprise MIB.
  137  * However, we don't want to be trying to represent arbitrary-length
  138  * OBJECT IDENTIFIERs here (ick!), and the right value is not necessarily
  139  * obvious to the driver implementor.  So, we define our own identification
  140  * mechanism here, and let the agent writer deal with the translation.
  141  */
  142 #define DOT3CHIPSET_VENDOR(x)   ((x) >> 16)
  143 #define DOT3CHIPSET_PART(x)     ((x) & 0xffff)
  144 #define DOT3CHIPSET(v,p)        (((v) << 16) + ((p) & 0xffff))
  145 
  146 /* Driver writers!  Add your vendors here! */
  147 enum dot3Vendors {
  148         dot3VendorAMD = 1,
  149         dot3VendorIntel = 2,
  150         dot3VendorNational = 4,
  151         dot3VendorFujitsu = 5,
  152         dot3VendorDigital = 6,
  153         dot3VendorWesternDigital = 7
  154 };
  155 
  156 /* Driver writers!  Add your chipsets here! */
  157 enum {
  158         dot3ChipSetAMD7990 = 1,
  159         dot3ChipSetAMD79900 = 2,
  160         dot3ChipSetAMD79C940 = 3
  161 };
  162 
  163 enum {
  164         dot3ChipSetIntel82586 = 1,
  165         dot3ChipSetIntel82596 = 2,
  166         dot3ChipSetIntel82557 = 3
  167 };
  168 
  169 enum {
  170         dot3ChipSetNational8390 = 1,
  171         dot3ChipSetNationalSonic = 2
  172 };
  173 
  174 enum {
  175         dot3ChipSetFujitsu86950 = 1
  176 };
  177 
  178 enum {
  179         dot3ChipSetDigitalDC21040 = 1,
  180         dot3ChipSetDigitalDC21140 = 2,
  181         dot3ChipSetDigitalDC21041 = 3,
  182         dot3ChipSetDigitalDC21140A = 4,
  183         dot3ChipSetDigitalDC21142 = 5
  184 };
  185 
  186 enum {
  187         dot3ChipSetWesternDigital83C690 = 1,
  188         dot3ChipSetWesternDigital83C790 = 2
  189 };
  190 /* END of Ethernet-link MIB stuff */
  191 
  192 /*
  193  * Put other types of interface MIBs here, or in interface-specific
  194  * header files if convenient ones already exist.
  195  */
  196 #endif /* __APPLE_API_UNSTABLE */
  197 #endif /* _NET_IF_MIB_H */

Cache object: d02a37be7f047b2490dd91f44b31354e


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.