Annotation of XNU/bsd/net/if_mib.h, revision 1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.