-- ==================================================================
-- Copyright (C) 2002 by  HUAWEI TECHNOLOGIES. All rights reserved.
--
-- Description:  HUAWEI Lan Switch Rstp MIB
-- Reference:
-- Version: V1.4
-- History:
--(1) Created by Zhangshilin, 2001.06.29
--(2) Revised by Qi Zhenglin, 2002.01.08
-- V1.1 2004-10-12 updated by gaolong
--      Import TEXTUAL-CONVENTION, OBJECT-IDENTITY, NOTIFICATION-TYPE.
--      Relocate hwLswRstpMib MODULE-IDENTITY clause.
--      Substitute chinese characters with English words.
--      Change MAX-ACCESS clause value of hwdot1dStpClearStatistics and
--      hwdot1dSetStpDefaultPortCost from write-only to read-write.
-- V1.2 2004-11-10 add hwdot1dStpRXTCBPDU by xuboning
-- V1.3 2004-12-21 add hwdot1dStpPortSendingBPDUType, hwdot1dStpOperPortPointToPoint,
--                 change hwdot1dStpPortPointToPoint by zhuchaopeng
-- V1.4 2005-07-04 modify hwdot1dStpPathCostStandard by zhanghaihong
--                 adjust file format by gaolong 
-- ==================================================================
-- ==================================================================
--
-- Varibles and types be imported
--
-- ==================================================================
A3COM-HUAWEI-LswRSTP-MIB DEFINITIONS ::= BEGIN

IMPORTS
     TruthValue, MacAddress, TEXTUAL-CONVENTION
        FROM SNMPv2-TC

    MODULE-IDENTITY,OBJECT-TYPE,Counter32, OBJECT-IDENTITY, NOTIFICATION-TYPE
        FROM SNMPv2-SMI

    dot1dStpPortEntry, dot1dStpPort
        FROM BRIDGE-MIB
    lswCommon
        FROM A3COM-HUAWEI-OID-MIB;

   hwLswRstpMib MODULE-IDENTITY
            LAST-UPDATED "200106290000Z"
            ORGANIZATION ""
            CONTACT-INFO
            ""
            DESCRIPTION
            ""
            REVISION "200106290000Z"
            DESCRIPTION
            ""
            ::= { lswCommon  6 }

    EnabledStatus ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "A simple status value for the object."
    SYNTAX      INTEGER { enabled(1), disabled(2) }


-- ==================================================================
--
-- ======================= definition begin =========================
--
-- ==================================================================

    hwLswRstpMibObject OBJECT IDENTIFIER ::= {  hwLswRstpMib 1  }



     hwdot1dStpStatus OBJECT-TYPE
          SYNTAX   EnabledStatus
          MAX-ACCESS read-write
          STATUS current
          DESCRIPTION " Bridge STP enabled/disabled state"
          ::= { hwLswRstpMibObject 1 }

     hwdot1dStpForceVersion OBJECT-TYPE
          SYNTAX   INTEGER
          {
              stp(0),
              rstp(2)
          }
          MAX-ACCESS read-write
          STATUS current
          DESCRIPTION " Running mode of the bridge RSTP state machine"
          ::= { hwLswRstpMibObject 2 }

     hwdot1dStpDiameter OBJECT-TYPE
          SYNTAX   INTEGER (1..7)
          MAX-ACCESS read-write
          STATUS current
          DESCRIPTION " Permitted amount of bridges between any two ends on the network."
          ::= { hwLswRstpMibObject 3 }

     hwdot1dStpRootBridgeAddress OBJECT-TYPE
          SYNTAX  MacAddress
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION " MAC address of the root bridge"
          ::= { hwLswRstpMibObject 4 }

     hwDot1dStpBpduGuard  OBJECT-TYPE
          SYNTAX   EnabledStatus
          MAX-ACCESS read-write
          STATUS current
          DESCRIPTION " If BPDU guard enabled. The edge port will discard illegal BPDU when enabled"
          ::= { hwLswRstpMibObject 6 }

     hwDot1dStpRootType  OBJECT-TYPE
          SYNTAX  INTEGER
          {
          normal       (1),
          primary      (2),
          secondary    (3)
          }
          MAX-ACCESS read-write
          STATUS current
          DESCRIPTION " Root type of the bridge"
          ::= { hwLswRstpMibObject 7 }

     hwDot1dTimeOutFactor  OBJECT-TYPE
          SYNTAX   INTEGER (3..7)
          MAX-ACCESS read-write
          STATUS current
          DESCRIPTION " Time Out Factor of the bridge."
          ::= { hwLswRstpMibObject 8 }

     hwDot1dStpPathCostStandard  OBJECT-TYPE
          SYNTAX  INTEGER
          {
          dot1d-1998       (1),
          dot1t      (2),
          legacy     (3)
          }
          MAX-ACCESS read-write
          STATUS current
          DESCRIPTION " Path Cost Standard of the bridge. Value 'dot1d-1998' is
          IEEE 802.1d standard in 1998, value 'dot1t' is IEEE 802.1t standard,
          and value 'legacy' is a private legacy standard."
          ::= { hwLswRstpMibObject 9 }

     hwdot1dStpPortXTable  OBJECT-TYPE
          SYNTAX   SEQUENCE OF HwDot1dStpPortXEntry
          MAX-ACCESS not-accessible
          STATUS   current
          DESCRIPTION "RSTP extended information of the port "
          ::= { hwLswRstpMibObject  5 }


     hwdot1dStpPortXEntry  OBJECT-TYPE
          SYNTAX HwDot1dStpPortXEntry
          MAX-ACCESS  not-accessible
          STATUS   current
          DESCRIPTION " RSTP extended information of the port  "
          AUGMENTS    { dot1dStpPortEntry }
          ::= { hwdot1dStpPortXTable 1 }

    HwDot1dStpPortXEntry    ::=
    SEQUENCE {
        hwdot1dStpPortStatus        EnabledStatus   ,
        hwdot1dStpPortEdgeport      TruthValue  ,
        hwdot1dStpPortPointToPoint  INTEGER ,
        hwdot1dStpMcheck        TruthValue  ,
        hwdot1dStpTransLimit        INTEGER ,
        hwdot1dStpRXStpBPDU     Counter32   ,
        hwdot1dStpTXStpBPDU     Counter32   ,
        hwdot1dStpRXTCNBPDU     Counter32   ,
        hwdot1dStpTXTCNBPDU     Counter32   ,
        hwdot1dStpRXRSTPBPDU        Counter32   ,
        hwdot1dStpTXRSTPBPDU        Counter32  ,
        hwdot1dStpClearStatistics   INTEGER ,
        hwdot1dSetStpDefaultPortCost    INTEGER ,
        hwdot1dStpRootGuard         EnabledStatus ,
        hwdot1dStpLoopGuard         EnabledStatus,
        hwdot1dStpPortBlockedReason     INTEGER  ,
        hwdot1dStpRXTCBPDU              Counter32 ,
        hwdot1dStpPortSendingBPDUType   INTEGER,
        hwdot1dStpOperPortPointToPoint  INTEGER
        }



     hwdot1dStpPortStatus  OBJECT-TYPE
          SYNTAX  EnabledStatus
          MAX-ACCESS read-write
          STATUS current
          DESCRIPTION " RSTP status of the port"
          ::= { hwdot1dStpPortXEntry 1 }


     hwdot1dStpPortEdgeport  OBJECT-TYPE
          SYNTAX  TruthValue
          MAX-ACCESS read-write
          STATUS current
          DESCRIPTION " Whether the port can be an edge port"
          ::= { hwdot1dStpPortXEntry 2 }


     hwdot1dStpPortPointToPoint OBJECT-TYPE
          SYNTAX  INTEGER
          {
          forceTrue (1),
          forceFalse    (2),
          auto      (3)
          }
          MAX-ACCESS read-write
          STATUS current
          DESCRIPTION " It is the administrative value indicates whether the port
          can be connected to a point-to-point link or not.

          If the value is 'auto', the operative value of a point-to-point link state is
          determined by device itself, and can be read from hwdot1dStpOperPortPointToPoint."
          ::= { hwdot1dStpPortXEntry 3 }


     hwdot1dStpMcheck  OBJECT-TYPE
        SYNTAX  TruthValue
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION " Check if the port transfer state machine enters"
        ::= { hwdot1dStpPortXEntry 4 }


     hwdot1dStpTransLimit  OBJECT-TYPE
        SYNTAX  INTEGER(1..255)
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION " Packet transmission limit of the bridge in a duration of Hello Time."
        ::= { hwdot1dStpPortXEntry 5 }


     hwdot1dStpRXStpBPDU  OBJECT-TYPE
        SYNTAX  Counter32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION " Number of STP BPDU received   "
        ::= { hwdot1dStpPortXEntry 6 }


     hwdot1dStpTXStpBPDU  OBJECT-TYPE
        SYNTAX  Counter32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION " Number of STP BPDU transmitted    "
        ::= { hwdot1dStpPortXEntry 7 }


     hwdot1dStpRXTCNBPDU  OBJECT-TYPE
        SYNTAX  Counter32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION " Number of TCN BPDU received    "
        ::= { hwdot1dStpPortXEntry 8 }


     hwdot1dStpTXTCNBPDU  OBJECT-TYPE
        SYNTAX  Counter32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION " Number of TCN BPDU transmitted    "
        ::= { hwdot1dStpPortXEntry 9 }


     hwdot1dStpRXRSTPBPDU  OBJECT-TYPE
        SYNTAX  Counter32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION "Number of RSTP BPDU received"
        ::= { hwdot1dStpPortXEntry 10 }


     hwdot1dStpTXRSTPBPDU  OBJECT-TYPE
        SYNTAX  Counter32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION " Number of RSTP BPDU transmitted    "
        ::= { hwdot1dStpPortXEntry 11 }

      hwdot1dStpClearStatistics  OBJECT-TYPE
        SYNTAX  INTEGER {clear(1)}
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION "Clear RSTP statistics. Read operation not supported. "
        ::= { hwdot1dStpPortXEntry 12 }

      hwdot1dSetStpDefaultPortCost  OBJECT-TYPE
        SYNTAX  INTEGER {enable(1)}
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION "Set PathCost back to the default setting. Read operation not supported."
        ::= { hwdot1dStpPortXEntry 13 }

     hwdot1dStpRootGuard  OBJECT-TYPE
        SYNTAX  EnabledStatus
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION " If the port guard root bridge. Other bridge which want to be root can not become root through this port if enabled. "
        ::= { hwdot1dStpPortXEntry 14 }

     hwdot1dStpLoopGuard  OBJECT-TYPE
        SYNTAX  EnabledStatus
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION " Loop guard function that keep a root port or an alternate port in discarding state while the information on the port is aged out."
        ::= { hwdot1dStpPortXEntry 15 }

     hwdot1dStpPortBlockedReason  OBJECT-TYPE
          SYNTAX  INTEGER
          {
          notBlock       (1),
          blockForProtocol   (2),
          blockForRootGuard  (3),
          blockForBPDUGuard  (4),
          blockForLoopGuard  (5)
          }
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION " Record the block reason of the port.
               notBlock         (1) means that the port is not in block state,.
               blockForProtocol (2) means that the port is blocked by stp protocol to avoid loop.
               blockForRootGuard(3) means that the root guard flag of bridge is set and a better message received from the port,and the port is blocked.
               blockForBPDUGuard(4) means that the port has been configured as an edge port and receive a BPDU and thus blocked.
               blockForLoopGuard(5) means that the port is blocked for loopguarded. "
        ::= { hwdot1dStpPortXEntry 16 }

     hwdot1dStpRXTCBPDU  OBJECT-TYPE
        SYNTAX  Counter32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION " The number of received TC BPDUs "
        ::= { hwdot1dStpPortXEntry 17 }

     hwdot1dStpPortSendingBPDUType  OBJECT-TYPE
        SYNTAX  INTEGER
        {
        stp(0),
        rstp(2)
        }
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION " Type of BPDU which the port is sending. "
        ::= { hwdot1dStpPortXEntry 18 }

     hwdot1dStpOperPortPointToPoint  OBJECT-TYPE
        SYNTAX  INTEGER
        {
        true    (1),
        false   (2)
        }
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION " This object indicates whether the port
          has connected to a point-to-point link or not.

          The administrative value should be read from hwdot1dStpPortPointToPoint. "
        ::= { hwdot1dStpPortXEntry 19 }

     hwRstpEventsV2 OBJECT-IDENTITY
     STATUS      current
     DESCRIPTION "Definition point for RSTP notifications."
     ::= { hwLswRstpMibObject 0 }

     hwRstpBpduGuarded NOTIFICATION-TYPE
     OBJECTS  { dot1dStpPort }
     STATUS   current
     DESCRIPTION
         "The SNMP trap that is generated when an edged port of the BPDU-guard switch recevies BPDU packets."
     ::= { hwRstpEventsV2 1 }

     hwRstpRootGuarded NOTIFICATION-TYPE
     OBJECTS { dot1dStpPort }
     STATUS    current
     DESCRIPTION
         "The SNMP trap that is generated when a root-guard port receives a superior bpdu."
     ::= { hwRstpEventsV2 2 }

     hwRstpBridgeLostRootPrimary NOTIFICATION-TYPE
     STATUS   current
     DESCRIPTION
         "The SNMP trap that is generated when the bridge is no longer the root bridge of the spanning tree.
          Another switch with higher priority has already been the root bridge. "
     ::= { hwRstpEventsV2 3 }

     hwRstpLoopGuarded NOTIFICATION-TYPE
     OBJECTS { dot1dStpPort }
     STATUS    current
     DESCRIPTION
         "The SNMP trap that is generated when a loop-guard port is aged out ."
     ::= { hwRstpEventsV2 4 }

     hwdot1dStpIgnoredVlanTable  OBJECT-TYPE
          SYNTAX   SEQUENCE OF HwDot1dStpIgnoredVlanEntry
          MAX-ACCESS not-accessible
          STATUS   current
          DESCRIPTION "RSTP extended information of vlan "
          ::= { hwLswRstpMibObject  10 }


     hwdot1dStpIgnoredVlanEntry  OBJECT-TYPE
          SYNTAX HwDot1dStpIgnoredVlanEntry
          MAX-ACCESS  not-accessible
          STATUS   current
          DESCRIPTION " RSTP extended information of the vlan  "
          INDEX    { hwdot1dVlan }
          ::= { hwdot1dStpIgnoredVlanTable 1 }

    HwDot1dStpIgnoredVlanEntry  ::=
    SEQUENCE {
        hwdot1dVlan     INTEGER ,
        hwdot1dStpIgnore    INTEGER
        }

     hwdot1dVlan  OBJECT-TYPE
          SYNTAX  INTEGER(1..4094)
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION " Vlan id supported"
          ::= { hwdot1dStpIgnoredVlanEntry 1 }


     hwdot1dStpIgnore  OBJECT-TYPE
          SYNTAX  INTEGER
          {
          enable    (1),
          disable   (2)
          }
          MAX-ACCESS read-write
          STATUS current
          DESCRIPTION " Whether the vlan is stp Ignored"
          ::= { hwdot1dStpIgnoredVlanEntry 2 }

END
