-- ============================================================================
-- Copyright (c) 2004-2013 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
--
-- Description: The EVB MIB module for managing devices that support Ethernet
--              Virtual Bridging (EVB).
-- Reference: IEEE Std 802.1Qbg
-- Version: V1.0
-- History:
-- V1.0 2012-12-21 created by Guo Xiangbin.
-- ============================================================================
H3C-EVB-MIB DEFINITIONS ::= BEGIN

IMPORTS
    Integer32, OBJECT-TYPE, MODULE-IDENTITY, Unsigned32
        FROM SNMPv2-SMI
    RowStatus, TruthValue, MacAddress
        FROM SNMPv2-TC
    h3cCommon
        FROM  HUAWEI-3COM-OID-MIB
    IEEE8021BridgePortNumber
        FROM IEEE8021-TC-MIB
    VlanIndex
        FROM Q-BRIDGE-MIB
    InterfaceIndexOrZero
        FROM IF-MIB;

h3cEvb MODULE-IDENTITY
    LAST-UPDATED "201212211200Z"
    ORGANIZATION
        "Hangzhou H3C Tech. Co., Ltd."
    CONTACT-INFO
        "Platform Team Hangzhou H3C Tech. Co., Ltd.
        Haidian District Beijing P.R. China
        http://www.h3c.com
        Zip:100085
        "
    DESCRIPTION
        "EVB management information base for managing devices that support
         Ethernet Virtual Bridging.  This MIB is an extension of
         IEEE8021-EVB-MIB."
    REVISION "201212211200Z"
    DESCRIPTION
        "Created by Guo Xiangbin."
    ::= { h3cCommon 134 }

-- =============================================================
-- Subtrees in the EVB MIB
-- =============================================================

h3cEvbSysObjects
    OBJECT IDENTIFIER ::= { h3cEvb 1 }

h3cEvbPortObjects
    OBJECT IDENTIFIER ::= { h3cEvb 2 }

h3cFlex10Objects
    OBJECT IDENTIFIER ::= { h3cEvb 3 }

h3cEvbSetResult OBJECT-TYPE
    SYNTAX INTEGER
    {
        unknown(1),
        processing(2),
        success(3),
        failed(4)
    }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "If a set operation on EVB-MIB-tables returns success, this object
         indicates the actual result of this operation.  Otherwise, it is
         meaningless.
         unknown: The set operation on the node has been completed, but the
                  result could only be got from the table which the set
                  operation happended.
         processing: The set operation is in process.  Another set operation
                     cannot be performed at this time.
         success: The set operation has succeeded.
         failed: The set operation has failed."
    ::= { h3cEvbSysObjects 1}

--  =========================
--  VSI default manager table
--  =========================

h3cEvbDefaultManagerTable OBJECT-TYPE
    SYNTAX SEQUENCE OF H3cEvbDefaultManagerEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A table that contains configuration information for the default
         Virtual Station Interface (VSI) manager."
    ::= { h3cEvbSysObjects 2 }

h3cEvbDefaultManagerEntry OBJECT-TYPE
    SYNTAX H3cEvbDefaultManagerEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A list of objects containing information for the default VSI manager."
    INDEX { h3cEvbManagerIndex }
    ::= { h3cEvbDefaultManagerTable 1 }

H3cEvbDefaultManagerEntry ::=
    SEQUENCE
    {
        h3cEvbManagerIndex
            Unsigned32,
        h3cEvbManagerType
            INTEGER,
        h3cEvbManagerID
            OCTET STRING,
        h3cEvbManagerPort
            Unsigned32,
        h3cEvbManagerRowStatus
            RowStatus
    }

h3cEvbManagerIndex OBJECT-TYPE
    SYNTAX Unsigned32
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "Index of the default manager table."
    ::= { h3cEvbDefaultManagerEntry 1 }

h3cEvbManagerType OBJECT-TYPE
    SYNTAX INTEGER
    {
        ipv4(1),
        ipv6(2),
        name(3),
        local(4)
    }
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "Type of the default VSI manager.
         ipv4: Specifies the IPv4 address of the default VSI manager.
         ipv6: Specifies the IPv6 address of the default VSI manager.
         name: Specifies the name of the default VSI manager, a
               case-insensitive string of 1 to 127 characters.
         local: Specifies the device as the default VSI manager."
    ::= { h3cEvbDefaultManagerEntry 2 }

h3cEvbManagerID OBJECT-TYPE
    SYNTAX OCTET STRING (SIZE(0..127))
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "Default VSI manager.
         The value is zero-length string when the VSI manager type is 'local'."
    ::= { h3cEvbDefaultManagerEntry 3 }

h3cEvbManagerPort OBJECT-TYPE
    SYNTAX Unsigned32 (0..65535)
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "Port number of the default VSI manager.
         Optional when the VSI manager type is not 'local'.
         If the VSI manager type is 'local', it returns zero."
    DEFVAL { 8080 }
    ::= { h3cEvbDefaultManagerEntry 4 }

h3cEvbManagerRowStatus OBJECT-TYPE
    SYNTAX RowStatus
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "Row status: CreateAndGo, Active, or Destroy."
    ::= { h3cEvbDefaultManagerEntry 5 }

--  =====================
--  EVB bridge port table
--  =====================

h3cEvbPortConfigTable OBJECT-TYPE
    SYNTAX SEQUENCE OF H3cEvbPortConfigEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A table that contains configuration information for the EVB bridge
         port."
    ::= { h3cEvbPortObjects 1 }

h3cEvbPortConfigEntry OBJECT-TYPE
    SYNTAX H3cEvbPortConfigEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A list of objects containing information for the EVB bridge port."
    INDEX { h3cEvbPortNumber }
    ::= { h3cEvbPortConfigTable 1 }

H3cEvbPortConfigEntry ::=
    SEQUENCE
    {
        h3cEvbPortNumber
            IEEE8021BridgePortNumber,
        h3cEvbRWD
            Unsigned32,
        h3cEvbRKA
            Unsigned32
    }

h3cEvbPortNumber OBJECT-TYPE
    SYNTAX IEEE8021BridgePortNumber
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "Port number."
    ::= { h3cEvbPortConfigEntry 1 }

h3cEvbRWD OBJECT-TYPE
    SYNTAX Unsigned32 (15..31)
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "VDP resource wait delay exponent."
    DEFVAL { 20 }
    ::= { h3cEvbPortConfigEntry 2 }

h3cEvbRKA OBJECT-TYPE
    SYNTAX Unsigned32 (14..31)
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "VDP keepalive exponent."
    DEFVAL { 20 }
    ::= { h3cEvbPortConfigEntry 3 }

--  ======================
--  S-channel config table
--  ======================

h3cEvbSchannelConfigTable OBJECT-TYPE
    SYNTAX SEQUENCE OF H3cEvbSchannelConfigEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A table that contains configuration information for the S-channel."
    ::= { h3cEvbPortObjects 2 }

h3cEvbSchannelConfigEntry OBJECT-TYPE
    SYNTAX H3cEvbSchannelConfigEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A list of objects containing information for the S-channel."
    INDEX { h3cEvbPortNumber,
            h3cEvbSchannelID }
    ::= { h3cEvbSchannelConfigTable 1 }

H3cEvbSchannelConfigEntry ::=
    SEQUENCE
    {
        h3cEvbSchannelID
            Unsigned32,
        h3cEvbSchannelSVLAN
            Unsigned32,
        h3cEvbMacLearningStatus
            TruthValue,
        h3cEvbRRStatus
            TruthValue,
        h3cEvbSchannelRowStatus
            RowStatus
    }

h3cEvbSchannelID OBJECT-TYPE
    SYNTAX Unsigned32
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "S-channel ID."
    ::= { h3cEvbSchannelConfigEntry 1 }

h3cEvbSchannelSVLAN OBJECT-TYPE
    SYNTAX Unsigned32 (0..4094)
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "S-VLAN ID. 0 means that the S-channel is not bound to any S-VLAN.
         1 represents the SVID for the default S-channel S-channel 1."
    DEFVAL { 0 }
    ::= { h3cEvbSchannelConfigEntry 2 }

h3cEvbMacLearningStatus OBJECT-TYPE
    SYNTAX TruthValue
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "The MAC address learning function is enabled or not."
    DEFVAL { true }
    ::= { h3cEvbSchannelConfigEntry 3 }

h3cEvbRRStatus OBJECT-TYPE
    SYNTAX TruthValue
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "The RR mode for the S-channel is enabled or not."
    DEFVAL { false }
    ::= { h3cEvbSchannelConfigEntry 4 }


h3cEvbSchannelRowStatus OBJECT-TYPE
    SYNTAX RowStatus
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "Row status: CreateAndGo, Active, or Destroy."
    ::= { h3cEvbSchannelConfigEntry 5 }

--  ================
--  VSI config table
--  ================

h3cEvbVSIConfigTable OBJECT-TYPE
    SYNTAX SEQUENCE OF H3cEvbVSIConfigEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A table that contains configuration information for the VSI."
    ::= { h3cEvbPortObjects 3 }

h3cEvbVSIConfigEntry OBJECT-TYPE
    SYNTAX H3cEvbVSIConfigEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A list of objects containing information for the VSI."
    INDEX { h3cEvbSBPPortNumber,
            h3cEvbVSILocalID }
    ::= { h3cEvbVSIConfigTable 1 }

H3cEvbVSIConfigEntry ::=
    SEQUENCE
    {
        h3cEvbSBPPortNumber
            IEEE8021BridgePortNumber,
        h3cEvbVSILocalID
            Unsigned32,
        h3cEvbVSICommand
            INTEGER,
        h3cEvbVSIIfIndex
            InterfaceIndexOrZero,
        h3cEvbVSIIsActive
            TruthValue,
        h3cEvbVSIRowStatus
            RowStatus
    }

h3cEvbSBPPortNumber OBJECT-TYPE
    SYNTAX IEEE8021BridgePortNumber
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "The Station-facing Bridge Port (SBP) port number."
    ::= { h3cEvbVSIConfigEntry 1 }

h3cEvbVSILocalID OBJECT-TYPE
    SYNTAX Unsigned32
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "VSI local ID."
    ::= { h3cEvbVSIConfigEntry 2 }

h3cEvbVSICommand OBJECT-TYPE
    SYNTAX INTEGER
    {
        preAssociate (1),
        preAssociateWithRsrcReservation (2),
        associate (3),
        deAssociate (4)
    }
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "This object indicates the association or pre-associate property of the
         VSI."
    ::= { h3cEvbVSIConfigEntry 3 }

h3cEvbVSIIfIndex OBJECT-TYPE
    SYNTAX InterfaceIndexOrZero
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "VSI interface index."
    ::= { h3cEvbVSIConfigEntry 4 }

h3cEvbVSIIsActive OBJECT-TYPE
    SYNTAX TruthValue
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "The VSI is activated or not.  Activate a VSI after configuring a VSI
         filter, and deactivate a VSI before removing a VSI filter."
    DEFVAL { false }
    ::= { h3cEvbVSIConfigEntry 5 }


h3cEvbVSIRowStatus OBJECT-TYPE
    SYNTAX RowStatus
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "Row status: CreateAndGo, Active, or Destroy."
    ::= { h3cEvbVSIConfigEntry 6 }

--  =======================
--  VSI filter config table
--  =======================

h3cEvbVSIFilterConfigTable OBJECT-TYPE
    SYNTAX SEQUENCE OF H3cEvbVSIFilterConfigEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A table that contains configuration information for filters of the
         VSI."
    ::= { h3cEvbPortObjects 4 }

h3cEvbVSIFilterConfigEntry OBJECT-TYPE
    SYNTAX H3cEvbVSIFilterConfigEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A list of objects containing information for filters of the VSI."
    INDEX { h3cEvbSBPPortNumber,
            h3cEvbVSILocalID,
            h3cEvbGroupID,
            h3cEvbVSIMac,
            h3cEvbVSIVlanId }
    ::= { h3cEvbVSIFilterConfigTable 1 }

H3cEvbVSIFilterConfigEntry ::=
    SEQUENCE
    {
        h3cEvbGroupID
            Unsigned32,
        h3cEvbVSIMac
            MacAddress,
        h3cEvbVSIVlanId
            VlanIndex,
        h3cEvbVSIFilterRowStatus
            RowStatus
    }

h3cEvbGroupID OBJECT-TYPE
    SYNTAX Unsigned32
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "Group ID."
    ::= { h3cEvbVSIFilterConfigEntry 1 }

h3cEvbVSIMac OBJECT-TYPE
    SYNTAX MacAddress
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "The MAC address part of the MAC/VLANs for a VSI."
    ::= { h3cEvbVSIFilterConfigEntry 2 }

h3cEvbVSIVlanId OBJECT-TYPE
    SYNTAX VlanIndex
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "The VLAN ID part of the MAC/VLANs for a VSI."
    ::= { h3cEvbVSIFilterConfigEntry 3 }

h3cEvbVSIFilterRowStatus OBJECT-TYPE
    SYNTAX RowStatus
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "Row status: CreateAndGo, Active, or Destroy."
    ::= { h3cEvbVSIFilterConfigEntry 4 }

--  ========================
--  Flex10 port config table
--  ========================

h3cFlex10PortConfigTable OBJECT-TYPE
    SYNTAX SEQUENCE OF H3cFlex10PortConfigEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A table that contains configuration information for the flex10 bridge
         port."
    ::= { h3cFlex10Objects 1 }

h3cFlex10PortConfigEntry OBJECT-TYPE
    SYNTAX H3cFlex10PortConfigEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A list of objects containing information for the flex10 bridge port."
    INDEX { h3cFlex10PortNumber }
    ::= { h3cFlex10PortConfigTable 1 }

H3cFlex10PortConfigEntry ::=
    SEQUENCE
    {
        h3cFlex10PortNumber
            IEEE8021BridgePortNumber,
        h3cFlex10PortEnableStatus
            TruthValue
    }

h3cFlex10PortNumber OBJECT-TYPE
    SYNTAX IEEE8021BridgePortNumber
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "Port number."
    ::= { h3cFlex10PortConfigEntry 1 }

h3cFlex10PortEnableStatus OBJECT-TYPE
    SYNTAX TruthValue
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "The flex10 function is enabled or not."
    DEFVAL { false }
    ::= { h3cFlex10PortConfigEntry 2 }

--  =============================
--  Flex10 remote S-channel table
--  =============================

h3cFlex10RemoteSchannelTable OBJECT-TYPE
    SYNTAX SEQUENCE OF H3cFlex10RemoteSchannelEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A table that contains remote S-channel details."
    ::= { h3cFlex10Objects 2 }

h3cFlex10RemoteSchannelEntry OBJECT-TYPE
    SYNTAX H3cFlex10RemoteSchannelEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A list of objects describing remote S-channels."
    INDEX { h3cFlex10PortNumber,
            h3cEvbSchannelID }
    ::= { h3cFlex10RemoteSchannelTable 1 }

H3cFlex10RemoteSchannelEntry ::=
    SEQUENCE
    {
        h3cFlex10RemSchDesFormat
            BITS,
        h3cFlex10RemSchTerminationType
            Integer32,
        h3cFlex10RemSchTerminationCap
            BITS,
        h3cFlex10RemSchTrafficClass
            BITS,
        h3cFlex10RemSchCir
            Integer32,
        h3cFlex10RemSchPir
            Integer32,
        h3cFlex10RemSchConnectionID
            OCTET STRING
    }

h3cFlex10RemSchDesFormat OBJECT-TYPE
    SYNTAX BITS
    {
        format0 (0),
        format1 (1)
    }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Description format of the remote S-channel."
    ::= { h3cFlex10RemoteSchannelEntry 1 }

h3cFlex10RemSchTerminationType OBJECT-TYPE
    SYNTAX Integer32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Termination type of the remote S-channel.
         0: PCI Physical Function (Primary).
         1: SRIOV Virtual Function.
         2: PCI Physical Function (Secondary).
         3: Virtual Switch Port.
         4: NCSI Port.
         2147483647: This value means a Description TLV with format 0 has not
                     been received.
         other: Unknown termination type."
    ::= { h3cFlex10RemoteSchannelEntry 2 }

h3cFlex10RemSchTerminationCap OBJECT-TYPE
    SYNTAX BITS
    {
        ethernet (0),
        fCOE (1),
        iSCSI (2),
        roCEE (3)
    }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Termination capabilities of the remote S-channel.  If a Description
         TLV with format 0 has not been received, it returns all zeros."
    ::= { h3cFlex10RemoteSchannelEntry 3 }

h3cFlex10RemSchTrafficClass OBJECT-TYPE
    SYNTAX BITS
    {
        class0 (0),
        class1 (1),
        class2 (2),
        class3 (3),
        class4 (4),
        class5 (5),
        class6 (6),
        class7 (7)
    }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Traffic classes of the remote S-channel.  If a Description TLV with
         format 0 has not been received, it returns all zeros."
    ::= { h3cFlex10RemoteSchannelEntry 4 }

h3cFlex10RemSchCir OBJECT-TYPE
    SYNTAX Integer32
    UNITS  "mbps"
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Committed Information Rate (CIR) of the remote S-channel.  If a
         Description TLV with format 0 has not been received, it returns 0."
    ::= { h3cFlex10RemoteSchannelEntry 5 }

h3cFlex10RemSchPir OBJECT-TYPE
    SYNTAX Integer32
    UNITS  "mbps"
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Peak Information Rate (PIR) of the remote S-channel.  If a Description
         TLV with format 0 has not been received, it returns 0."
    ::= { h3cFlex10RemoteSchannelEntry 6 }

h3cFlex10RemSchConnectionID OBJECT-TYPE
    SYNTAX OCTET STRING (SIZE (0..16))
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Connection instance ID of the remote S-channel.
         The value is a zero-length string if a Description TLV with format 1
         has not been received.  Otherwise it returns a string with length 16."
    ::= { h3cFlex10RemoteSchannelEntry 7 }

--  ===================================
--  Flex10 S-channel link control table
--  ===================================

h3cFlex10SchannelLinkCtlTable OBJECT-TYPE
    SYNTAX SEQUENCE OF H3cFlex10SchannelLinkCtlEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A table that contains link status information for the S-channel."
    ::= { h3cFlex10Objects 3 }

h3cFlex10SchannelLinkCtlEntry OBJECT-TYPE
    SYNTAX H3cFlex10SchannelLinkCtlEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "A list of objects containing information for the S-channel."
    INDEX { h3cFlex10PortNumber,
            h3cEvbSchannelID }
    ::= { h3cFlex10SchannelLinkCtlTable 1 }

H3cFlex10SchannelLinkCtlEntry ::=
    SEQUENCE
    {
        h3cFlex10SchannelSVID
            VlanIndex,
        h3cFlex10SchannelLocalStatus
            INTEGER,
        h3cFlex10SchannelRemoteStatus
            INTEGER
    }

h3cFlex10SchannelSVID OBJECT-TYPE
    SYNTAX VlanIndex
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "S-VLAN ID for the S-channel."
    ::= { h3cFlex10SchannelLinkCtlEntry 1 }

h3cFlex10SchannelLocalStatus OBJECT-TYPE
    SYNTAX INTEGER
    {
        unknown (1),
        disabled (2),
        enabled (3)
    }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Link status of the local S-channel."
    ::= { h3cFlex10SchannelLinkCtlEntry 2 }

h3cFlex10SchannelRemoteStatus OBJECT-TYPE
    SYNTAX INTEGER
    {
        unknown (1),
        disabled (2),
        enabled (3)
    }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Link status of the remote S-channel."
    ::= { h3cFlex10SchannelLinkCtlEntry 3 }

END
