--  *****************************************************************
--  DLINKPRIME-LBD-MIB.mib : Loopback Detection MIB
-- 
--  Copyright (c) 2014 D-Link Corporation, all rights reserved.
--   
--  *****************************************************************

    DLINKPRIME-LBD-MIB DEFINITIONS ::= BEGIN

    IMPORTS
        MODULE-IDENTITY,OBJECT-TYPE,NOTIFICATION-TYPE     
                                        FROM SNMPv2-SMI
        DisplayString,TruthValue        FROM SNMPv2-TC
        MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF
        InterfaceIndex                  FROM IF-MIB
        VlanId                          FROM Q-BRIDGE-MIB
        dlinkPrimeCommon                FROM DLINK-ID-REC-MIB;


    dlinkPrimeLoopbackDetectMIB MODULE-IDENTITY
        LAST-UPDATED "201404260000Z"
        ORGANIZATION "D-Link Corp."
        CONTACT-INFO
            "        D-Link Corporation

             Postal: No. 289, Sinhu 3rd Rd., Neihu District,
                     Taipei City 114, Taiwan, R.O.C
             Tel:     +886-2-66000123
             E-mail: tsd@dlink.com.tw
            "
        DESCRIPTION
            "This MIB module defines objects for loopback detection."            
            
        REVISION "201404260000Z"
        DESCRIPTION 
            "This is the first version of the MIB file for 'loopback
            detection' functionality."    
        ::= { dlinkPrimeCommon 7 }

-- -----------------------------------------------------------------------------
    dpLbdNotifications    OBJECT IDENTIFIER ::= { dlinkPrimeLoopbackDetectMIB 0 }
    dpLbdObjects          OBJECT IDENTIFIER ::= { dlinkPrimeLoopbackDetectMIB 1 }
    dpLbdConformance      OBJECT IDENTIFIER ::= { dlinkPrimeLoopbackDetectMIB 2 }
	
    dpLbdCtrlGlobalEnabled    OBJECT-TYPE
        SYNTAX             TruthValue
        MAX-ACCESS         read-write
        STATUS             current
        DESCRIPTION
            "This object indicates whether the loopback detection is enabled
            globally.    
            "             
        ::= { dpLbdObjects 1 }
		
    dpLbdCtrlInterval    OBJECT-TYPE
        SYNTAX          INTEGER (1..32767)
        UNITS           "seconds"
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
            "This object indicates the interval in seconds at which LBD
            packets are transmitted."
        ::= { dpLbdObjects 2 }	
	
    dpLbdCtrlRecover    OBJECT-TYPE
        SYNTAX          INTEGER (0|60..1000000)
        UNITS           "seconds"
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
            "This object indicates the recover in seconds after which LBD
            interface shutdown."
        ::= { dpLbdObjects 3 }	
	
    dpLbdNotifyEnabled    OBJECT-TYPE
        SYNTAX          TruthValue
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION   
            "Set to 'true' to enable global SNMP notification for loopback detection feature.  
            Setting the object to 'false' will disable SNMP notifications."            
        ::= { dpLbdObjects 4}
                                     
    dpLbdIfCfgTable    OBJECT-TYPE
        SYNTAX        SEQUENCE OF DpLbdIfCfgEntry
        MAX-ACCESS    not-accessible
        STATUS        current
        DESCRIPTION            
            "A list of loopback detection information entries."            
        ::= { dpLbdObjects 5 }

    dpLbdIfCfgEntry    OBJECT-TYPE
        SYNTAX        DpLbdIfCfgEntry
        MAX-ACCESS    not-accessible       
        STATUS        current
        DESCRIPTION            
            "An entry indicates the setting of loopback detection on an
            interface."
        INDEX  { dpLbdIfCfgIndex }
        ::= { dpLbdIfCfgTable 1 }

    DpLbdIfCfgEntry ::= SEQUENCE {
        dpLbdIfCfgIndex      InterfaceIndex,            
        dpLbdIfCfgEnabled      TruthValue,
        dpLbdIfLoopStatus    INTEGER
    }

    dpLbdIfCfgIndex OBJECT-TYPE
        SYNTAX          InterfaceIndex
        MAX-ACCESS      not-accessible
        STATUS          current
        DESCRIPTION
            "This object indicates the ifIndex of the physical port or port
            channel."
        ::= { dpLbdIfCfgEntry 1 }

    dpLbdIfCfgEnabled OBJECT-TYPE
        SYNTAX      TruthValue        
        MAX-ACCESS  read-write
        STATUS          current
        DESCRIPTION
            "This object indicates whether the loopback detection is enabled on 
            the interface.    
            "             
        ::= { dpLbdIfCfgEntry 2 }

    dpLbdIfLoopStatus    OBJECT-TYPE
        SYNTAX        INTEGER {
            normal(1),
            loop(2)
        }
        MAX-ACCESS    read-only
        STATUS        current
        DESCRIPTION
            "This object indicates whether the interface loopback status."
        ::= { dpLbdIfCfgEntry 3 }

-- -----------------------------------------------------------------------------
    dpLbdNotifyInfo    OBJECT-IDENTITY 
        STATUS        current
        DESCRIPTION
            "This identifier is a group for variable bindings for traps."
        ::= { dpLbdObjects 8 }

    dpLbdNotifyInfoIfIndex    OBJECT-TYPE
        SYNTAX        InterfaceIndex
        MAX-ACCESS    accessible-for-notify
        STATUS        current
        DESCRIPTION
            "This object indicates the interface id that has detected a loopback."
        ::= { dpLbdNotifyInfo 1 }


-- -----------------------------------------------------------------------------
-- MIB Notifications statements
-- -----------------------------------------------------------------------------
    dpLbdLoopOccurred    NOTIFICATION-TYPE
        OBJECTS    {
            dpLbdNotifyInfoIfIndex
        }
        STATUS        current
        DESCRIPTION
            "This trap is sent when an interface loop occurs."
        ::= { dpLbdNotifications 1 }

    dpLbdLoopRecovery    NOTIFICATION-TYPE
        OBJECTS    {
            dpLbdNotifyInfoIfIndex
        }
        STATUS        current
        DESCRIPTION
            "This trap is sent when an interface loop recovery."
        ::= { dpLbdNotifications 2 }

-- -----------------------------------------------------------------------------
-- MIB Conformance statements
-- -----------------------------------------------------------------------------
    dpLbdMIBCompliances  OBJECT IDENTIFIER
        ::= { dpLbdConformance 1 }

    dpLbdMIBGroups  OBJECT IDENTIFIER
        ::= { dpLbdConformance 2 } 
    
    dpLbdMIBCompliance MODULE-COMPLIANCE
        STATUS          current
        DESCRIPTION
            "The compliance statement for entities which implement the 
            DLINKPRIME-LBD-MIB."
        MODULE          -- this module
        MANDATORY-GROUPS    {   
            dpLbdCfgGroup,
            dpLbdIfCfgGroup
        }

        GROUP dpLbdCtrlModeGroup
        DESCRIPTION
            "This group is mandatory if vlan-based mode is supported."  
                                 
        GROUP dpLbdVlanCtrlGroup
        DESCRIPTION
            "This group is mandatory if vlan-based mode is supported."                   
                        
        ::= { dpLbdMIBCompliances 1 }
-- -----------------------------------------------------------------------------        
    dpLbdCfgGroup OBJECT-GROUP
        OBJECTS { 
            dpLbdCtrlInterval,  
            dpLbdCtrlGlobalEnabled,
            dpLbdNotifyEnabled,
            dpLbdNotifyInfoIfIndex
        }
        STATUS current
        DESCRIPTION 
            "A collection of objects providing management of the loopback 
            detection feature."
        ::= { dpLbdMIBGroups 1 }

    dpLbdIfCfgGroup 	OBJECT-GROUP
        OBJECTS { 
            dpLbdIfCfgEnabled,
            dpLbdIfLoopStatus
        }
        STATUS current
        DESCRIPTION
            "A collection of objects providing the per-interface control of
            loopback detection."
        ::= { dpLbdMIBGroups 2 }	

    dpLbdNotificationGroup    NOTIFICATION-GROUP
        NOTIFICATIONS    {
            dpLbdLoopOccurred,
            dpLbdLoopRecovery
        }
        STATUS current
        DESCRIPTION
            "A collection of notifications used for monitoring the hosts under the 
            control of loopback detection."
        ::= { dpLbdMIBGroups 3 }
   
END
