-- -----------------------------------------------------------------------------
-- MIB NAME : ERPS Common mib
-- FILE NAME: ERPS.mib
-- DATE     : 2009/11/18
-- VERSION  : 1.04
-- PURPOSE  : To construct the MIB structure of ERPS for proprietary enterprise
-- -----------------------------------------------------------------------------
-- MODIFICTION HISTORY:
-- -----------------------------------------------------------------------------
-- Version, Date, Author
-- Description:
--  [New Object]
--  [Modification]
-- Notes: (Requested by who and which project)
-- -----------------------------------------------------------------------------
-- Version 1.04 2009/11/18, Eli Lin
-- [New Object]
-- 1. Added swERPSMgmtRAPSRPLOwnerOperStatus to display the current operational 
-- value of the RPL owner state. 
-- 2. Added swERPSMgmtRAPSProtectionVlanRangeList1to64, swERPSMgmtRAPSProtectionVlanRangeList65to128, 
-- swERPSMgmtRAPSProtectionVlanRangeList129to192, swERPSMgmtRAPSProtectionVlanRangeList193to256,
-- swERPSMgmtRAPSProtectionVlanRangeList257to320, swERPSMgmtRAPSProtectionVlanRangeList321to384,
-- swERPSMgmtRAPSProtectionVlanRangeList385to448 and swERPSMgmtRAPSProtectionVlanRangeList449to512.
-- [Modification]
-- 1.Rename swERPSMgmtRAPSRPLOwner to swERPSMgmtRAPSRPLOwnerAdminState.
-- -----------------------------------------------------------------------------
-- Version 1.03 2009/11/16, Danbo
-- Description: 
-- [New Object]
-- 1. Added swERPSMgmtRAPSRingAdminState to indicate the administrative state of 
--    the ring.
-- 2. Added swERPSMgmtSubRingCtrlTable. 
-- 3. Added swERPSMgmtSubRingCtrlEntry.
-- 4. Added swERPSMgmtSubRingCtrlRAPSVlanId to indicate the raps vlan id of a ring which 
--    the sub-ring is connected to. 
-- 5. Added swERPSMgmtSubRingCtrlSubRingRAPSVlanId to indicate the raps vlan id of the sub-ring.
-- 6. Added swERPSMgmtSubRingCtrlTCPropagationState to indicate the state of sub-ring 
--    topology change propagation.
-- 7. Added swERPSMgmtSubRingCtrlRowStatus.  
-- [Modification]
-- 1. Changed the value range of swERPSMgmtRAPSWestPort and SwERPSMgmtRAPSEastPort 
-- from "(1..65535)" to "(0|1..65535)".
-- -----------------------------------------------------------------------------
-- Version 1.02, 2009/07/30, Eli Lin
-- [New Object]
-- 1.Added swERPSTrapState to support ERPS trap state control.
-- [Modification]
-- 1.Added value lists "signal-fail(3)" in 
--   swERPSMgmtRAPSWestPortState and swERPSMgmtRAPSEastPortState. 
-- -----------------------------------------------------------------------------
-- Version 1.01, 2009/04/10, Eli Lin
-- Revise the name of swERPSNotificationBindings.
-- -----------------------------------------------------------------------------
-- Version 1.00, 2009/02/03, Jefferson Li
-- This is the first formal version for universal MIB definition.
-- -----------------------------------------------------------------------------

ERPS-MIB DEFINITIONS ::= BEGIN


    IMPORTS
              MODULE-IDENTITY, OBJECT-TYPE
                    FROM SNMPv2-SMI
              RowStatus,MacAddress
                    FROM SNMPv2-TC
              NOTIFICATION-TYPE
                    FROM SNMPv2-SMI
              dlink-common-mgmt 
                    FROM DLINK-ID-REC-MIB
              VlanIdOrNone
              		FROM Q-BRIDGE-MIB;

    swERPSMIB MODULE-IDENTITY
        LAST-UPDATED "0911180000Z"
        ORGANIZATION "D-Link Corp."
        CONTACT-INFO
            "http://support.dlink.com"
        DESCRIPTION
            "The MIB module for managing Ethernet Ring Protection Switching."
        ::= { dlink-common-mgmt 78 }


    VidList ::= OCTET STRING(SIZE (0..127)) 

    swERPSCtrl                OBJECT IDENTIFIER ::= { swERPSMIB 1 }
    swERPSInfo                OBJECT IDENTIFIER ::= { swERPSMIB 2 }
    swERPSMgmt                OBJECT IDENTIFIER ::= { swERPSMIB 3 }
    swERPSNotify              OBJECT IDENTIFIER ::= { swERPSMIB 4 }
    
-- -----------------------------------------------------------------------------
-- swERPSCtrl
-- -----------------------------------------------------------------------------
    swERPSAdminState OBJECT-TYPE
        SYNTAX  INTEGER {
               enabled(1),
               disabled(2)
        }
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
            "This object indicates the ERPS state of the bridge."
        ::= { swERPSCtrl 1 }

    swERPSLogState OBJECT-TYPE
        SYNTAX   INTEGER {
               enabled(1),
               disabled(2)
        }
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
            "This object indicates the ERPS log state of the bridge."
        ::= { swERPSCtrl 2 }

    swERPSTrapState OBJECT-TYPE
        SYNTAX   INTEGER {
               enabled(1),
               disabled(2)
        }
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
            "This object indicates the ERPS trap state of the bridge."
        ::= { swERPSCtrl 3 }    

-- -----------------------------------------------------------------------------
-- swERPSInfo
-- -----------------------------------------------------------------------------
    
-- -----------------------------------------------------------------------------
-- swERPSMgmt
-- -----------------------------------------------------------------------------

    swERPSMgmtRAPSVlanTable OBJECT-TYPE
        SYNTAX      SEQUENCE OF SwERPSMgmtRAPSVlanEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "This table contains ERPS ring configuration information."
        ::= { swERPSMgmt 1 }

    swERPSMgmtRAPSVlanEntry OBJECT-TYPE
        SYNTAX      SwERPSMgmtRAPSVlanEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "A list of ERPS ring configuration information."
        INDEX    {swERPSMgmtRAPSVlanId}
        ::= { swERPSMgmtRAPSVlanTable 1 }

    SwERPSMgmtRAPSVlanEntry ::= SEQUENCE {
            swERPSMgmtRAPSVlanId
                INTEGER,
            swERPSMgmtRAPSWestPort
                INTEGER,
            swERPSMgmtRAPSWestPortState
                INTEGER,
            swERPSMgmtRAPSEastPort
                INTEGER,
            swERPSMgmtRAPSEastPortState
                INTEGER,       
            swERPSMgmtRAPSRPLPort
                INTEGER,  
            swERPSMgmtRAPSRPLOwnerAdminState
                INTEGER,
--             swERPSMgmtRAPSProtectionVlan
--                 VidList,
            swERPSMgmtRAPSRingMEL
                INTEGER,
            swERPSMgmtRAPSHoldOffTime
                INTEGER,    
            swERPSMgmtRAPSGuardTime
                INTEGER,
            swERPSMgmtRAPSWTRTime
                INTEGER,
            swERPSMgmtRAPSRingState
                INTEGER,      
--             swERPSMgmtRAPSRingAdminState
--                 INTEGER,
            swERPSMgmtRAPSRPLOwnerOperStatus
                INTEGER,
            swERPSMgmtRAPSProtectionVlanRangeList1to64
                OCTET STRING,
            swERPSMgmtRAPSProtectionVlanRangeList65to128
                OCTET STRING,
            swERPSMgmtRAPSProtectionVlanRangeList129to192
                OCTET STRING,
            swERPSMgmtRAPSProtectionVlanRangeList193to256
                OCTET STRING,
            swERPSMgmtRAPSProtectionVlanRangeList257to320
                OCTET STRING,
            swERPSMgmtRAPSProtectionVlanRangeList321to384
                OCTET STRING,
            swERPSMgmtRAPSProtectionVlanRangeList385to448
                OCTET STRING,
            swERPSMgmtRAPSProtectionVlanRangeList449to512                
                OCTET STRING,
            swERPSMgmtRAPSRowStatus
                RowStatus     
        }

    swERPSMgmtRAPSVlanId  OBJECT-TYPE
        SYNTAX      INTEGER
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The RAPS VLAN is an index of configuration."
        ::= { swERPSMgmtRAPSVlanEntry 1 }
    
    swERPSMgmtRAPSWestPort OBJECT-TYPE
        SYNTAX  INTEGER (0|1..65535)
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
            "This is one of the RPL owner ports.The RPL owner may block this port.
            "
        ::= { swERPSMgmtRAPSVlanEntry 2 }

    swERPSMgmtRAPSWestPortState OBJECT-TYPE
        SYNTAX  INTEGER {
                fowarding(1),
                blocking(2),
                signal-fail(3)
            }
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
            "This is the west port state. It may change sometimes.
           "
        ::= { swERPSMgmtRAPSVlanEntry 3 }

    swERPSMgmtRAPSEastPort OBJECT-TYPE
        SYNTAX  INTEGER (0|1..65535)
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
           "This is the other RPL owner port.The RPL Owner may block this port.
           "
        ::= { swERPSMgmtRAPSVlanEntry 4 }

    swERPSMgmtRAPSEastPortState OBJECT-TYPE
        SYNTAX  INTEGER {
                fowarding(1),
                blocking(2),
                signal-fail(3)
        }
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
            "This is the east port state. It may change sometimes.
           "
        ::= { swERPSMgmtRAPSVlanEntry 5 }

    swERPSMgmtRAPSRPLPort OBJECT-TYPE
        SYNTAX  INTEGER {
                none(1),
                west(2),
                east(3)
        }
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
            "When the port Enable state is enabled, the RPL port's current port role is defined by the application of the ERPS.
           "
        ::= { swERPSMgmtRAPSVlanEntry 6 }

    swERPSMgmtRAPSRPLOwnerAdminState OBJECT-TYPE
        SYNTAX      INTEGER {
                  enabled(1),
                  disabled(2)
                   }
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
            "The administrative value of the RPL owner state. 
             The RPL owner is an Ethernet Ring Node adjacent to the RPL that 
             is responsible for blocking its end of the RPL under normal 
             conditions."
        ::= { swERPSMgmtRAPSVlanEntry 7 }

--    swERPSMgmtRAPSProtectionVlan  OBJECT-TYPE
--        SYNTAX      VidList
--        MAX-ACCESS  read-write
--        STATUS      current
--        DESCRIPTION
--            "The protection VLAN has prevented a loop."
--        ::= { swERPSMgmtRAPSVlanEntry 8 }

    swERPSMgmtRAPSRingMEL OBJECT-TYPE
        SYNTAX      INTEGER (0..7)
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
            "The ring MEL is the maintenance entity group (MEG) level providing a communication channel for
                ring automatic protection switching (RAPS) information."
        ::= { swERPSMgmtRAPSVlanEntry 9 }

    swERPSMgmtRAPSHoldOffTime OBJECT-TYPE
        SYNTAX      INTEGER (0..10000)
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
            "In order to coordinate timing of protection switches at multiple layers."
        ::= { swERPSMgmtRAPSVlanEntry 10 }

    swERPSMgmtRAPSGuardTime OBJECT-TYPE
            SYNTAX      INTEGER (10..2000)
            MAX-ACCESS  read-write
            STATUS      current
            DESCRIPTION
                "This is used to prevent ring nodes from receiving outdated RAPS messages."
            ::= { swERPSMgmtRAPSVlanEntry 11 }

    swERPSMgmtRAPSWTRTime OBJECT-TYPE
        SYNTAX      INTEGER (5..12)
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
                "In the revertive mode of operation, to prevent frequent operation of the protection switch due to an
                intermittent defect, a failed working transport entity must become stable in a fault-free state."
        ::= { swERPSMgmtRAPSVlanEntry 12 }

    swERPSMgmtRAPSRingState OBJECT-TYPE
        SYNTAX      INTEGER {
                begin(1),
                init(2),
                idle(3),
                protection(4)
        }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
                "This indicates the state of the ring: begin, init, idle, or protection."
        ::= { swERPSMgmtRAPSVlanEntry 13 }  
        
--         swERPSMgmtRAPSRingAdminState OBJECT-TYPE
-- 	    SYNTAX      INTEGER {
-- 					enabled(1),
--                 	disabled(2)
-- 					}
-- 	    MAX-ACCESS  read-write
-- 	    STATUS      current
-- 	    DESCRIPTION
--                 "This indicates the administrative state of the ring."
-- 	    ::= { swERPSMgmtRAPSVlanEntry 14 }	    

    swERPSMgmtRAPSRPLOwnerOperStatus OBJECT-TYPE
        SYNTAX      INTEGER {
					active(1),
					inactive(2),
					disabled(3)
                   }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The current operational value of the RPL owner state. The value 'active' 
             is used to indicate that the RPL owner administrative state is enabled 
             and the device is operated as the active RPL owner. The value 'inactive' 
             is used to indicate that the RPL owner administrative state is enabled, 
             but the device is operated as the inactive RPL owner. The value 
             'disabled' is used to indicate that the RPL owner administrative 
             state of the device is disabled."
        ::= { swERPSMgmtRAPSVlanEntry 15 }

    swERPSMgmtRAPSProtectionVlanRangeList1to64 OBJECT-TYPE
		SYNTAX     OCTET STRING (SIZE (64))
		MAX-ACCESS  read-write
		STATUS      current
		DESCRIPTION
			"This object indicates the VLAN range (1-512)
			 that belongs to the protection VLANs."
        ::= { swERPSMgmtRAPSVlanEntry 16 }

    swERPSMgmtRAPSProtectionVlanRangeList65to128 OBJECT-TYPE
		SYNTAX      OCTET STRING (SIZE (64))
		MAX-ACCESS  read-write
		STATUS      current
		DESCRIPTION
			"This object indicates the VLAN range (513-1024)
			 that belongs to the protection VLANs."
        ::= { swERPSMgmtRAPSVlanEntry 17 }

    swERPSMgmtRAPSProtectionVlanRangeList129to192 OBJECT-TYPE
		SYNTAX      OCTET STRING (SIZE (64))
		MAX-ACCESS  read-write
		STATUS      current
		DESCRIPTION
			"This object indicates the VLAN range (1025-1536)
			 that belongs to the protection VLANs."
        ::= { swERPSMgmtRAPSVlanEntry 18 }

    swERPSMgmtRAPSProtectionVlanRangeList193to256 OBJECT-TYPE
		SYNTAX      OCTET STRING (SIZE (64))
		MAX-ACCESS  read-write
		STATUS      current
		DESCRIPTION
			"This object indicates the VLAN range (1537-2048)
			 that belongs to the protection VLANs."
        ::= { swERPSMgmtRAPSVlanEntry 19 }

    swERPSMgmtRAPSProtectionVlanRangeList257to320 OBJECT-TYPE
		SYNTAX      OCTET STRING (SIZE (64))
		MAX-ACCESS  read-write
		STATUS      current
		DESCRIPTION
			"This object indicates the VLAN range (2049-2560)
			 that belongs to the protection VLANs."
        ::= { swERPSMgmtRAPSVlanEntry 20 }

    swERPSMgmtRAPSProtectionVlanRangeList321to384 OBJECT-TYPE
		SYNTAX      OCTET STRING (SIZE (64))
		MAX-ACCESS  read-write
		STATUS      current
		DESCRIPTION
			"This object indicates the VLAN range (2561-3072)
			 that belongs to the protection VLANs."
        ::= { swERPSMgmtRAPSVlanEntry 21 }

    swERPSMgmtRAPSProtectionVlanRangeList385to448 OBJECT-TYPE
		SYNTAX      OCTET STRING (SIZE (64))
		MAX-ACCESS  read-write
		STATUS      current
		DESCRIPTION
			"This object indicates the VLAN range (3073-3584)
			 that belongs to the protection VLANs."
        ::= { swERPSMgmtRAPSVlanEntry 22 }

    swERPSMgmtRAPSProtectionVlanRangeList449to512 OBJECT-TYPE
		SYNTAX      OCTET STRING (SIZE (64))
		MAX-ACCESS  read-write
		STATUS      current
		DESCRIPTION
			"This object indicates the VLAN range (3585-4096)
			 that belongs to the protection VLANs."
        ::= { swERPSMgmtRAPSVlanEntry 23 }

     swERPSMgmtRAPSRowStatus OBJECT-TYPE
        SYNTAX      RowStatus
        MAX-ACCESS  read-create
        STATUS      current
        DESCRIPTION
            "This object indicates the RowStatus of this entry."
        ::= { swERPSMgmtRAPSVlanEntry 100 }

-- ----------------------------------------------------------------------------
-- swERPSMgmtSubRingCtrlTable
-- ----------------------------------------------------------------------------    
-- 
--     swERPSMgmtSubRingCtrlTable OBJECT-TYPE
--         SYNTAX      SEQUENCE OF SwERPSMgmtSubRingCtrlEntry
--         MAX-ACCESS  not-accessible
--         STATUS      current
--         DESCRIPTION
--             "This table contains ERPS sub-ring configuration information."
--         ::= { swERPSMgmt 2 } 
--      
--     swERPSMgmtSubRingCtrlEntry OBJECT-TYPE
--         SYNTAX      SwERPSMgmtSubRingCtrlEntry
--         MAX-ACCESS  not-accessible
--         STATUS      current
--         DESCRIPTION
--             "A list of ERPS sub-ring configuration information."
--         INDEX    {swERPSMgmtSubRingCtrlRAPSVlanId, swERPSMgmtSubRingCtrlSubRingRAPSVlanId}
--         ::= { swERPSMgmtSubRingCtrlTable 1 }
--            
--     SwERPSMgmtSubRingCtrlEntry ::= SEQUENCE {
--             swERPSMgmtSubRingCtrlRAPSVlanId
--                 INTEGER,
--             swERPSMgmtSubRingCtrlSubRingRAPSVlanId
--             	INTEGER,
--             swERPSMgmtSubRingCtrlTCPropagationState
--                 INTEGER,
--             swERPSMgmtSubRingCtrlRowStatus
--             	RowStatus	    	   
--     }
--     
--     swERPSMgmtSubRingCtrlRAPSVlanId  OBJECT-TYPE
--         SYNTAX      INTEGER
--         MAX-ACCESS  not-accessible
--         STATUS      current
--         DESCRIPTION
--             "The RAPS VLAN is an index of configuration."
--         ::= { swERPSMgmtSubRingCtrlEntry 1 }  
--     
--     swERPSMgmtSubRingCtrlSubRingRAPSVlanId  OBJECT-TYPE
--         SYNTAX      INTEGER
--         MAX-ACCESS  not-accessible
--         STATUS      current
--         DESCRIPTION
--             "This indicates the ring control VLAN-ID of the sub-ring which connects to another ring."
--         ::= { swERPSMgmtSubRingCtrlEntry 2 } 
--         
--     swERPSMgmtSubRingCtrlTCPropagationState  OBJECT-TYPE
--         SYNTAX      INTEGER
--         MAX-ACCESS  read-write
--         STATUS      current
--         DESCRIPTION
--             "This indicates the state of sub-ring topology change propagation."
--         ::= { swERPSMgmtSubRingCtrlEntry 3 } 
--         
--     swERPSMgmtSubRingCtrlRowStatus OBJECT-TYPE
--         SYNTAX      RowStatus
--         MAX-ACCESS  read-create
--         STATUS      current
--         DESCRIPTION
--             "This object indicates the RowStatus of this entry."
--         ::= { swERPSMgmtSubRingCtrlEntry 4 }       

-- -----------------------------------------------------------------------------
-- swERPSNotify
-- -----------------------------------------------------------------------------
    
   swERPSNotifyPrefix       OBJECT IDENTIFIER ::= { swERPSNotify 0 }

    swERPSSFDetectedTrap    NOTIFICATION-TYPE
        OBJECTS     {swERPSNodeId }
        STATUS      current
        DESCRIPTION
            "When the signal fail occurs, a trap will be generated."
        ::= { swERPSNotifyPrefix 1 }

    swERPSSFClearedTrap NOTIFICATION-TYPE
        OBJECTS     {swERPSNodeId }
        STATUS          current
        DESCRIPTION
            "When the signal fail clears, a trap will be generated."
        ::= { swERPSNotifyPrefix 2 }

    swERPSRPLOwnerConflictTrap   NOTIFICATION-TYPE
        OBJECTS     {swERPSNodeId }
        STATUS          current
        DESCRIPTION
            "When a conflict occurs, a trap will be generated."
        ::= { swERPSNotifyPrefix 3 }

    swERPSNotificationBindings   OBJECT IDENTIFIER ::= { swERPSNotify 2 }
    
    swERPSNodeId OBJECT-TYPE
            SYNTAX      MacAddress
            MAX-ACCESS  accessible-for-notify
            STATUS      current
            DESCRIPTION
                "This used trap object means the node MAC."
            ::= { swERPSNotificationBindings 1 }
            
END

