-- -----------------------------------------------------------------------------
-- MIB NAME : Eltex Loopback Detection Extension
-- FILE NAME: eltMesLbdVlanBased.mib
-- DATE     : 2017/06/26
-- VERSION  : 1.01
-- PURPOSE  : MIB extention of LBD feature
-- -----------------------------------------------------------------------------

ELTEX-LBD-MIB DEFINITIONS ::= BEGIN

IMPORTS
    OBJECT-TYPE
        FROM SNMPv2-SMI
    eltMes
        FROM ELTEX-MES
    TruthValue
        FROM SNMPv2-TC
    InterfaceIndex
        FROM IF-MIB
    VlanIndex
        FROM Q-BRIDGE-MIB
    VlanList1, VlanList2, VlanList3, VlanList4
        FROM RADLAN-BRIDGEMIBOBJECTS-MIB;

eltMesLbd      OBJECT IDENTIFIER ::= { eltMes 127 }
eltMesLbdNotif OBJECT IDENTIFIER ::= { eltMesLbd 0 }
eltMesLbdVlanBasedGlobals OBJECT IDENTIFIER ::= { eltMesLbd 5 }
-- -----------------------------------------------------------------------------
-- SCALARS
-- -----------------------------------------------------------------------------

eltMesLbdVlanBased OBJECT-TYPE
    SYNTAX TruthValue
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "Enable/Disable VLAN based loopback detection."
    ::= { eltMesLbd 1 }

eltMesLbdVlanBasedRecoveryTime OBJECT-TYPE
    SYNTAX INTEGER
    UNITS "seconds"
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "VLAN disable period in seconds. Valid only for VLAN based loopback
         detection. Default value of 0 means that VLAN will never be recovered."
    DEFVAL { 0 }
    ::= { eltMesLbd 2 }

eltMesLbdVlanBasedGlobalsId1To1024 OBJECT-TYPE
    SYNTAX      VlanList1
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Each bit represent a VLAN whether LBD enabled in Vlan-Based mode "
 ::= { eltMesLbdVlanBasedGlobals  1 }

eltMesLbdVlanBasedGlobalsId1025To2048 OBJECT-TYPE
    SYNTAX      VlanList2
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Each bit represent a VLAN whether LBD enabled in Vlan-Based mode "
 ::= { eltMesLbdVlanBasedGlobals  2 }
 
eltMesLbdVlanBasedGlobalsId2049To3072 OBJECT-TYPE
    SYNTAX      VlanList3
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Each bit represent a VLAN whether LBD enabled in Vlan-Based mode "
 ::= { eltMesLbdVlanBasedGlobals  3 }
 
eltMesLbdVlanBasedGlobalsId3073To4094 OBJECT-TYPE
    SYNTAX      VlanList4
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Each bit represent a VLAN whether LBD enabled in Vlan-Based mode "
 ::= { eltMesLbdVlanBasedGlobals  4 }

-- -----------------------------------------------------------------------------
-- eltMesLbdVlanBasedPortTable
-- -----------------------------------------------------------------------------

eltMesLbdVlanBasedPortTable OBJECT-TYPE
    SYNTAX SEQUENCE OF EltLbdVlanBasedPortEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "This table contains per port VLAN list for which loopback is detected."
    ::= { eltMesLbd 3 }

eltMesLbdVlanBasedPortEntry OBJECT-TYPE
    SYNTAX EltLbdVlanBasedPortEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "The entry contains per port VLAN list for which loopback is detected."
    INDEX { eltMesLbdVlanBasedPort }
    ::= { eltMesLbdVlanBasedPortTable 1 }

EltLbdVlanBasedPortEntry ::= SEQUENCE {
        eltMesLbdVlanBasedPort               InterfaceIndex,
        eltMesLbdVlanBasedVlanId1To1024      OCTET STRING,
        eltMesLbdVlanBasedVlanId1025To2048   OCTET STRING,
        eltMesLbdVlanBasedVlanId2049To3072   OCTET STRING,
        eltMesLbdVlanBasedVlanId3073To4094   OCTET STRING
    }

eltMesLbdVlanBasedPort OBJECT-TYPE
    SYNTAX  InterfaceIndex
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION
        "The port number."
    ::= { eltMesLbdVlanBasedPortEntry 1 }

eltMesLbdVlanBasedVlanId1To1024 OBJECT-TYPE
    SYNTAX  OCTET STRING (SIZE(0..128))
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION
        "First VlanId List that have detected a loopback."
    ::= { eltMesLbdVlanBasedPortEntry 2 }

eltMesLbdVlanBasedVlanId1025To2048 OBJECT-TYPE
    SYNTAX  OCTET STRING (SIZE(0..128))
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION
        "Second VlanId List that have detected a loopback."
    ::= { eltMesLbdVlanBasedPortEntry 3 }

eltMesLbdVlanBasedVlanId2049To3072 OBJECT-TYPE
    SYNTAX  OCTET STRING (SIZE(0..128))
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION
        "Third VlanId List that have detected a loopback."
    ::= { eltMesLbdVlanBasedPortEntry 4 }

eltMesLbdVlanBasedVlanId3073To4094 OBJECT-TYPE
    SYNTAX  OCTET STRING (SIZE(0..128))
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION
        "Fourth VlanId List that have detected a loopback."
    ::= { eltMesLbdVlanBasedPortEntry 5 }

-- -----------------------------------------------------------------------------
-- eltMesLbdVlanBasedVlanStateTable
-- -----------------------------------------------------------------------------

eltMesLbdVlanBasedVlanStateTable OBJECT-TYPE
    SYNTAX SEQUENCE OF EltLbdVlanBasedVlanStateEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "This table contains per port and VLAN loopback state. Only VLANS in
         which port is tagged or native member are present."
    ::= { eltMesLbd 4 }

eltMesLbdVlanBasedVlanStateEntry OBJECT-TYPE
    SYNTAX EltLbdVlanBasedVlanStateEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "The entry contains per port and VLAN loopback state."
    INDEX { eltMesLbdVlanBasedVlanStatePort, eltMesLbdVlanBasedVlanStateVlan }
    ::= { eltMesLbdVlanBasedVlanStateTable 1 }

EltLbdVlanBasedVlanStateEntry ::= SEQUENCE {
        eltMesLbdVlanBasedVlanStatePort  InterfaceIndex,
        eltMesLbdVlanBasedVlanStateVlan  VlanIndex,
        eltMesLbdVlanBasedVlanState      INTEGER
    }

eltMesLbdVlanBasedVlanStatePort OBJECT-TYPE
    SYNTAX  InterfaceIndex
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION
        "Port number with LBD enabled."
    ::= { eltMesLbdVlanBasedVlanStateEntry 1 }

eltMesLbdVlanBasedVlanStateVlan OBJECT-TYPE
    SYNTAX  VlanIndex
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION
        "ID of VLAN that port belongs to."
    ::= { eltMesLbdVlanBasedVlanStateEntry 2 }

eltMesLbdVlanBasedVlanState OBJECT-TYPE
    SYNTAX  INTEGER {
        active(1),
        blocked(2)
    }
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION
        "The loopback state of port in VLAN."
    ::= { eltMesLbdVlanBasedVlanStateEntry 3 }

-- -----------------------------------------------------------------------------
-- Notifications
-- -----------------------------------------------------------------------------

eltMesLbdVlanBasedVlanNotif NOTIFICATION-TYPE
        OBJECTS {
            eltMesLbdVlanBasedVlanState
        }
        STATUS  current
        DESCRIPTION
                "A eltMesLbdVlanBasedVlanNotif is generated when VLAN with detected
                 loopback is enabled/disabled."
    ::= { eltMesLbdNotif 1 }

END
