-- extracted from draft-dolnik-usb-mib-02.txt
-- at Thu Aug 10 07:08:29 2000

   USB-MIB DEFINITIONS ::= BEGIN
   IMPORTS
           MODULE-IDENTITY,
           OBJECT-TYPE,
           Counter32,
           Integer32,
           experimental
                   FROM SNMPv2-SMI
           MODULE-COMPLIANCE,
           OBJECT-GROUP
                   FROM SNMPv2-CONF
           TEXTUAL-CONVENTION,
           MacAddress,
           TruthValue
                   FROM SNMPv2-TC
           InterfaceIndexOrZero
                   FROM IF-MIB;

   usbMib MODULE-IDENTITY
           LAST-UPDATED    "200008070000Z"  -- August 07, 2000
           ORGANIZATION    "3Com"
           CONTACT-INFO
               "        Benjamin Dolnik
                Postal: 3Com Corporation
                        3800 Golf Road
                        Rolling Meadows, IL 60008
                        USA
                Phone:  +1 847 262 2098
                E-mail: benjamin-dolnik@3com.com"
           DESCRIPTION
                   "The MIB module to describe the USB interface."
           ::= { experimental 103 }


   -- Generic information

   usbMibObjects  OBJECT IDENTIFIER ::= { usbMib 1 }

   usbNumber OBJECT-TYPE
           SYNTAX       Integer32 (0..65535)
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
               "The number of ports regardless of their current state
                in the usb general port table"
           ::= { usbMibObjects 1 }
   --
   -- usb Generic Port Table
   --
   usbPortTable OBJECT-TYPE
           SYNTAX SEQUENCE OF UsbPortEntry
           MAX-ACCESS   not-accessible
           STATUS       current
           DESCRIPTION
               "A list of port entries. The number of entries is given
                by the value usbNumber."
           ::= { usbMibObjects 2 }

   usbPortEntry OBJECT-TYPE
           SYNTAX       UsbPortEntry
           MAX-ACCESS   not-accessible
           STATUS       current
           DESCRIPTION
               "Status and parameter values for the USB port."
           INDEX { usbPortIndex }
           ::= { usbPortTable 1 }

   UsbPortEntry ::= SEQUENCE {
             usbPortIndex
                      Integer32,
             usbPortType
                      INTEGER,
             usbPortRate
                      INTEGER
           }

   usbPortIndex OBJECT-TYPE
           SYNTAX       Integer32 (1..65535)
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
               "The unique identifier of the USB port hardware. By
                convention and if possible, hardware port numbers map
                directly to external connectors."
           ::= { usbPortEntry 1 }




   usbPortType OBJECT-TYPE
           SYNTAX       INTEGER {
               host(1),
               device(2),
               hub(3)
           }
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "The type of the USB port"
           ::= { usbPortEntry 2 }

   usbPortRate OBJECT-TYPE
           SYNTAX       INTEGER {
               low-speed (1),
               full-speed(2),
               high-speed(3)
           }
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "The USB port rate that could be low-speed(1) for 1.5
                 Mbps, full-speed(2) for 12Mbps or high-speed(3) for
                 USB 2.0"
           ::= { usbPortEntry 3 }

   --
   -- usb Device MIB
   --
   usbDeviceTable OBJECT-TYPE
           SYNTAX       SEQUENCE OF UsbDeviceEntry
           MAX-ACCESS   not-accessible
           STATUS       current
           DESCRIPTION
                "A list of USB device ports. Usually the device has
                 only one USB device port"
           ::= { usbMibObjects 3 }

   usbDeviceEntry OBJECT-TYPE
           SYNTAX       UsbDeviceEntry
           MAX-ACCESS   not-accessible
           STATUS       current
           DESCRIPTION
                "Status and parameter values for the USB device port."
           INDEX { usbDeviceIndex }
           ::= { usbDeviceTable 1 }

   UsbDeviceEntry ::=
           SEQUENCE {
                usbDeviceIndex
                           Integer32,
                usbDevicePower
                           INTEGER,
                usbDeviceVendorID
                           OCTET STRING,
                usbDeviceProductID
                           OCTET STRING,
                usbDeviceNumberConfigurations
                           Integer32,
                usbDeviceActiveClass
                           INTEGER,
                usbDeviceStatus
                           INTEGER,
                usbDeviceEnumCounter
                           Counter32,
                usbDeviceRemoteWakeup
                           TruthValue,
                usbDeviceRemoteWakeupOn
                           TruthValue
                }

   usbDeviceIndex       OBJECT-TYPE
           SYNTAX       Integer32 (1..65535)
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "The index is identical to usbPortIndex for the
                 correspondent USB port"
            ::= { usbDeviceEntry 1 }

   usbDevicePower OBJECT-TYPE
           SYNTAX INTEGER {
               unknown(1),
               self-powered(2),
               bus-powered(3)
           }
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "the way USB device port is powered"
           ::= { usbDeviceEntry 2 }

   usbDeviceVendorID OBJECT-TYPE
           SYNTAX       OCTET STRING
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "The USB device port vendor HEX-formatted string as it
                 is provided to the USB host by the USB device"
          ::= { usbDeviceEntry 3 }

   usbDeviceProductID OBJECT-TYPE
           SYNTAX OCTET STRING
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "The product ID HEX-formatted string as it is provided
                 to the USB host by the USB device"
           ::= { usbDeviceEntry 4 }

   usbDeviceNumberConfigurations OBJECT-TYPE
           SYNTAX       Integer32 (1..65535)
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "The total number of configurations the USB port
                 supports. Device port should support at least one
                 configuration"
           ::= { usbDeviceEntry 5 }

   usbDeviceActiveClass OBJECT-TYPE
           SYNTAX       INTEGER {
               other(1),
               cdc(2)
           }
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "This object returns USB Device Class type of the
                 active configuration"
           ::= { usbDeviceEntry 6 }


   usbDeviceStatus OBJECT-TYPE
           SYNTAX INTEGER {
               unattached(1),
               attached(2),
               powered(3),
               default(4),
               address(5),
               configured(6),
               suspended(7)
           }
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "Current status of the USB device state machine"
           ::= { usbDeviceEntry 7 }

   usbDeviceEnumCounter OBJECT-TYPE
           SYNTAX       Counter32
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "Total number reconnections (enumerations) since device
                 is operational"
           ::= { usbDeviceEntry 8 }



   usbDeviceRemoteWakeup OBJECT-TYPE
           SYNTAX        TruthValue
           MAX-ACCESS    read-only
           STATUS        current
           DESCRIPTION
               "If set to true(1), the device supports Remote Wakeup
                function. If set to false(2), the device doesn't
                support it"
           ::= { usbDeviceEntry 9 }

   usbDeviceRemoteWakeupOn OBJECT-TYPE
           SYNTAX          TruthValue
           MAX-ACCESS      read-only
           STATUS          current
           DESCRIPTION
                "If set to true(1), the remote wakeup function is
                 activated by the host. If set to false(2), remote
                 wakeup function is not active."
           ::= { usbDeviceEntry 10 }

   --
   -- Table of the CDC interfaces
   --
   usbCDCTable OBJECT-TYPE
           SYNTAX SEQUENCE OF UsbCDCEntry
           MAX-ACCESS   not-accessible
           STATUS       current
           DESCRIPTION
                "A list of Communication Device Class (CDC) interfaces
                 supported by the USB device. It could be more then one
                 CDC interface for the device that expose more then one
                 interface to the network"
           ::= { usbMibObjects 4 }

   usbCDCEntry OBJECT-TYPE
           SYNTAX       UsbCDCEntry
           MAX-ACCESS   not-accessible
           STATUS       current
           DESCRIPTION
                "Status and parameter values for CDC device"
           INDEX { usbCDCIndex, usbCDCIfIndex }
           ::= { usbCDCTable 1 }

   UsbCDCEntry ::=
           SEQUENCE {
                usbCDCIndex
                        Integer32,
                usbCDCIfIndex
                        InterfaceIndexOrZero,
                   usbCDCSubclass
                        INTEGER,
                   usbCDCVersion
                        OCTET STRING,
                   usbCDCDataTransferType
                        INTEGER,
                   usbCDCDataEndpoints
                        Integer32,
                   usbCDCStalls
                        Counter32
           }

   usbCDCIndex OBJECT-TYPE
           SYNTAX       Integer32 (1..65535)
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "The index is identical to usbPortIndex for the
                 correspondent USB port"
           ::= { usbCDCEntry 1 }

   usbCDCIfIndex OBJECT-TYPE
           SYNTAX       InterfaceIndexOrZero
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "The variable uniquely identifies the interface index
                 which this CDC device is representing"
           ::= { usbCDCEntry 2 }

   usbCDCSubclass OBJECT-TYPE
           SYNTAX       INTEGER {
               other(0),
               directLine(1),
               acm(2),
               telephony(3),
               multichannel(4),
               capi(5),
               ethernet(6),
               atm(7)
           }
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "Subclass used in data transfer in Communication Device
                 Class"
           REFERENCE 
                "USB Class definitions for Communication Devices ver
                 1.1, p.28 "
           ::= { usbCDCEntry 3 }

   usbCDCVersion OBJECT-TYPE
           SYNTAX OCTET STRING  (SIZE (2))
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "String that describes the version of Communication
                 Device Class in HEX format (Major, Minor) "
           ::= { usbCDCEntry 4 }

   usbCDCDataTransferType OBJECT-TYPE
           SYNTAX INTEGER {
               synchronous(1),
               asynchronous(2)
           }
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "Type of data transfer for Data Class Interface used by
                 the Communication Device. Isochronious mode is used
                 for synchronous(1) and bulk transfer mode is used for
                 asynchronous(2)"
           ::= { usbCDCEntry 5 }



   usbCDCDataEndpoints OBJECT-TYPE
           SYNTAX Integer32 (0..16)
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                 "Number of the data endpoints (IN and OUT) used by the
                  Communication Device. If the networking device is in
                  default interface setting, there are are no data
                  endpoints and no traffic is exchanged. Under the
                  normal operation there should be 2 Data Endpoints
                  (one IN and one OUT) for the networking device.
                  For the multichannel model this number could be
                  larger then 2"
           ::= { usbCDCEntry 6 }

   usbCDCStalls OBJECT-TYPE
           SYNTAX       Counter32
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "Total number of times USB Data interface recovered
                 from stall since re-initialization and while the port
                 state was 'up' or 'test'."
           ::= { usbCDCEntry 7 }

   --
   -- Table of the CDC Ethernet-type interface or interface that uses
   -- Remote NDIS over Abstract Control Model
   --

   usbCDCEtherTable OBJECT-TYPE
           SYNTAX SEQUENCE OF UsbCDCEtherEntry
           MAX-ACCESS   not-accessible
           STATUS       current
           DESCRIPTION
               "A list of Communication Device Class (CDC) USB devices
                that support Ethernet Networking Control Model."
           ::= { usbMibObjects 5 }

   usbCDCEtherEntry OBJECT-TYPE
           SYNTAX       UsbCDCEtherEntry
           MAX-ACCESS   not-accessible
           STATUS       current
           DESCRIPTION
               "Status and parameter values for CDC devices that
                support Ethernet Networking Control Model"
           INDEX { usbCDCEtherIndex, usbCDCEtherIfIndex }
           ::= { usbCDCEtherTable 1 }


   UsbCDCEtherEntry ::=
           SEQUENCE {
                usbCDCEtherIndex
                        Integer32,
                usbCDCEtherIfIndex
                        InterfaceIndexOrZero,
                usbCDCEtherMacAddress
                        MacAddress,
                   usbCDCEtherPacketFilter
                        BITS,
                usbCDCEtherDataStatisticsCapabilities
                        BITS,
                usbCDCEtherDataCheckErrs
                        Counter32
           }

   usbCDCEtherIndex OBJECT-TYPE
           SYNTAX       Integer32 (1..65535)
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "The index is identical to usbPortIndex for the
                 correspondent USB port"
           ::= { usbCDCEtherEntry 1 }

   usbCDCEtherIfIndex OBJECT-TYPE
           SYNTAX       InterfaceIndexOrZero
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "The variable uniquely identifies the interface index
                 to which this CDC device is connected "
           ::= { usbCDCEtherEntry 2 }

   usbCDCEtherMacAddress OBJECT-TYPE
           SYNTAX       MacAddress
           MAX-ACCESS   read-only
           STATUS       current
           DESCRIPTION
                "The 48bit MAC address that is provided by USB CDC
                 device to the host. This address will be used as the
                 source address of Ethernet frames sent by the host
                 over the particular CDC interface."
           ::= { usbCDCEtherEntry 3}

   usbCDCEtherPacketFilter OBJECT-TYPE
         SYNTAX      BITS {
                packetPromiscuous(0),
                packetAllMulticast(1),
                packetDirected(2),
                packetBroadcast(3),
                packetMulticast(4)
           }
           MAX-ACCESS  read-only
           STATUS current
           DESCRIPTION
                "Bitmap indicates the host requirements to the USB
                 device to perform Ethernet packet filtering of the
                 particular type frames directed to the host"
           REFERENCE 
                "USB Class definitions for Communication Devices ver
                 1.1, p.66 Table 62"
           ::= { usbCDCEtherEntry 4 }

   usbCDCEtherDataStatisticsCapabilities OBJECT-TYPE
         SYNTAX      BITS {
                  frameXmitOk(0),
                  frameRcvOk(1),
                  frameXmitErr(2),
                  frameRcvErr(3),
                  frameRcvNoBuff(4),
                  bytesXmitDirectOk(5),
                  framesXmitDirectOk(6),
                  bytesXmitMulticastOk(7),
                  framesXmitMulticastOk(8),
                  bytesXmitBroadcastOk(9),
                  framesXmitBroadcastOk(10),
                  bytesRcvDirectOk(11),
                  framesRcvDirectOk(12),
                  bytesRcvMulticastOk(13),
                  framesRcvMulticastOk(14),
                  bytesRcvBroadcastOk(15),
                  framesRcvBroadcastOk(16),
                  framesRcvCrcErr(17),
                  xmitQueueLen(18),
                  rcvErrAlignment(19),
                  xmitOneCollision(20),
                  xmitMoreCollisions(21),
                  xmitDeferred(22),
                  xmitMaxCollision(23),
                  rcvOverrun(24),
                  xmitUnderrun(25),
                  xmitHearbeatFailure(26),
                  xmitTimesCrsLost(27),
                  xmitLateCollisions(28)
          }
           MAX-ACCESS  read-only
           STATUS current
           DESCRIPTION
               "Bitmap indicates the ability to collect Ethernet
                statistics of different types as it provided in
                Ethernet Networking Functional Descriptor. If the
                Particular bit is set, the device could provide the
                corresponding statistics counter to the host"
            REFERENCE 
                "USB Class definitions for Communication Devices ver
                 1.1, p.46 Table 42"
           ::= { usbCDCEtherEntry 5 }

   usbCDCEtherDataCheckErrs OBJECT-TYPE
           SYNTAX     Counter32
           MAX-ACCESS read-only
           STATUS     current
           DESCRIPTION
                  "Total number of frames with an invalid frame check
                  sequence, input from the USB Data interface since
                  system re-initialization and while the port state was
                  'up' or 'test'."
           ::= { usbCDCEtherEntry 6 }

   usbCDCEtherXmtAddressTable OBJECT-TYPE
          SYNTAX      SEQUENCE OF UsbCDCEtherXmtAddressEntry
          MAX-ACCESS  not-accessible
          STATUS      current
          DESCRIPTION
                  "This table contains an entry for each multicast
                   address for which the system will transmit
                   packets/frames on a particular USB interface."
          ::= { usbMibObjects 6 }

   usbCDCEtherXmtAddressEntry OBJECT-TYPE
          SYNTAX      UsbCDCEtherXmtAddressEntry
          MAX-ACCESS  not-accessible
          STATUS      current
          DESCRIPTION
                  "A list of objects identifying an address for which
                  the system will send packets/frames on the
                  particular USB interface identified by the index
                  values usbCDCIndex and ifIndex."
          INDEX  {usbCDCEtherIndex, usbCDCEtherIfIndex,
                  ifCDCEtherXmtAddress }
          ::= { usbCDCEtherXmtAddressTable 1 }



    UsbCDCEtherXmtAddressEntry ::=
          SEQUENCE {
              ifCDCEtherXmtAddress MacAddress
                }

    ifCDCEtherXmtAddress OBJECT-TYPE
          SYNTAX MacAddress
          MAX-ACCESS  read-only
          STATUS      current
          DESCRIPTION
                  "An address for which the system will will send
                   packets/frames on the particular USB interface.
                   The address only could be set by the host by using
                   the command for USB interface."
          ::= { usbCDCEtherXmtAddressEntry 1 }
   --
   -- notification group is for future extension.
   --
   usbMibNotification OBJECT IDENTIFIER     ::= { usbMib 2 }
   usbMibConformance  OBJECT IDENTIFIER     ::= { usbMib 3 }
   usbMibCompliances  OBJECT IDENTIFIER     ::= { usbMibConformance 1 }
   usbMibGroups       OBJECT IDENTIFIER     ::= { usbMibConformance 2 }

   -- compliance statements
   usbMibBasicCompliance MODULE-COMPLIANCE
           STATUS      current
           DESCRIPTION
               "The compliance statement for devices that implement
                USB MIB"

   MODULE  -- usbMib

       -- unconditionally mandatory groups
       MANDATORY-GROUPS {
               usbMibBasicGroup
               }

       -- unconditionally mandatory group
       GROUP usbMibBasicGroup
       DESCRIPTION
               "Group of objects that are mandatory to support by
                device implementing this MIB"

       -- conditionally mandatory group
       GROUP usbMibCDCGroup
       DESCRIPTION
               "This group is implemented only in devices having at
                least one CDC interface"

       -- conditionally mandatory group
       GROUP usbMibCDCEtherGroup
       DESCRIPTION
               "This group is implemented only in devices having at
                least one CDC interface that uses Ethernet Networking
                Control Model or remote NDIS"

       -- conditionally mandatory group
       GROUP usbCDCEtherXmtAddressGroup
       DESCRIPTION
               "This group is implemented only for USB CDC interfaces
                that have transmit multicast filtering capabilities."

       ::= {usbMibCompliances 1}

   usbMibBasicGroup OBJECT-GROUP
           OBJECTS {
                usbNumber,
                usbPortIndex,
                usbPortType,
                usbPortRate,
                usbDeviceIndex,
                usbDevicePower,
                usbDeviceVendorID,
                usbDeviceProductID,
                usbDeviceNumberConfigurations,
                usbDeviceActiveClass,
                usbDeviceStatus,
                usbDeviceEnumCounter,
                usbDeviceRemoteWakeup,
                usbDeviceRemoteWakeupOn
           }
           STATUS      current
           DESCRIPTION
               "Group of objects that are mandatory to support by
                device implementing this MIB"
           ::= { usbMibGroups 1 }

   usbMibCDCGroup OBJECT-GROUP
           OBJECTS {
                usbCDCIndex,
                usbCDCIfIndex,
                usbCDCSubclass,
                usbCDCVersion,
                usbCDCDataTransferType,
                usbCDCDataEndpoints,
                usbCDCStalls
           }
           STATUS      current
           DESCRIPTION
               "This group is implemented only in devices having at
                least one CDC interface"
           ::= { usbMibGroups 2 }




   usbMibCDCEtherGroup OBJECT-GROUP
           OBJECTS {
                usbCDCEtherIndex,
                usbCDCEtherIfIndex,
                usbCDCEtherMacAddress,
                usbCDCEtherPacketFilter,
                usbCDCEtherDataStatisticsCapabilities,
                usbCDCEtherDataCheckErrs
           }
           STATUS      current
           DESCRIPTION
               "This group is implemented only in devices having at
                 least one CDC interface that uses Ethernet Networking
                 Control Model or remote NDIS"
           ::= { usbMibGroups 3 }

   usbCDCEtherXmtAddressGroup OBJECT-GROUP
          OBJECTS {
               ifCDCEtherXmtAddress
           }
           STATUS      current
           DESCRIPTION
               "This group is implemented only for USB CDC interfaces
                that have transmit multicast filtering capabilities."
           ::= { usbMibGroups 4 }
   END

-- 
--    "Copyright (C) The Internet Society (2000). All Rights Reserved.
-- 
--    This document and translations of it may be copied and furnished to
--    others, and derivative works that comment on or otherwise explain it
--    or assist in its implementation may be prepared, copied, published
--    and distributed, in whole or in part, without restriction of any
--    kind, provided that the above copyright notice and this paragraph
--    are included on all such copies and derivative works. However, this
--    document itself may not be modified in any way, such as by removing
--    the copyright notice or references to the Internet Society or other
--    Internet organizations, except as needed for the purpose of
--    developing Internet standards in which case the procedures for
--    copyrights defined in the Internet Standards process must be
--    followed, or as required to translate it into languages other then
--    English.
-- 
--    The limited permissions granted above are perpetual and will not be
--    revoked by the Internet Society or its successors or assigns.
-- 
--    This document and the information contained herein is provided on an
--    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
--    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
--    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
--    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
--    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- 
-- B. Dolnik                    Experimental                           20

