-- ============================================================================
-- Copyright (C) 2004-2015 by H3C Technologies. All rights reserved.
--
-- Description: There are three standard MIB definitions, "LLDP-MIB", "LLDP-EXT-
--     DOT1-MIB", "LLDP-EXT-DOT3-MIB", define almost all MIB objects of LLDP.
--     This document defines more MIB objects privately For LLDP implementation.
--      1)LLDP default global status is disabled, a management object needed to
--        enable it.
--      2)LLDP needs to be compliable with CDP (Non standard IEEE link layer di-
--        scovery protocol).  A management object needed to enable or disable
--        compliance.
--      3)For compliance with CDP, port based control management object is need-
--        ed.
--      4)LLDP is able to control the status of a port that connects to a neigh-
--        bor by matching local neighbor identity information with the informat-
--        ion in the received chassis ID TLV and port ID TLV.
-- Reference:
-- Version: V1.1
-- History:
-- V1.0 created by qizhenglin 2009-03-20
-- V1.1 2015-09-01 Updated by zhaixiaoxiang
--      Add h3clldpPortConfigValidationAction and h3clldpPortConfigAgingAction
--       to h3clldpPortConfigTable
--      Add the h3clldpNbIdentityTable, h3clldpPortStatusTable, and h3clldpN-
--      otifications tables.
-- ============================================================================
H3C-LLDP-EXT-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, Integer32, NOTIFICATION-TYPE
        FROM SNMPv2-SMI
    TruthValue, RowStatus
        FROM SNMPv2-TC
    h3cCommon
        FROM  HUAWEI-3COM-OID-MIB
    LldpPortNumber
        FROM LLDP-MIB;

h3clldp MODULE-IDENTITY
    LAST-UPDATED "201509010000Z"
    ORGANIZATION
        "Hangzhou H3C Tech. Co., Ltd."
    CONTACT-INFO
        "Platform Team H3C Technologies Co.,Ltd.
        Hai-Dian District Beijing P.R. China
        http://www.h3c.com
        Zip:100085
        "
    DESCRIPTION
        "LLDP extended management information."
    REVISION  "201509010000Z"
    DESCRIPTION "Update this MIB module."
    REVISION  "200903210000Z"
    DESCRIPTION "The initial revision of this MIB module."
    ::= { h3cCommon 100 }

h3clldpObjects                    OBJECT IDENTIFIER ::= { h3clldp 1 }
h3clldpNotifications              OBJECT IDENTIFIER ::= { h3clldp 2 }
--
-- LLDP extended MIB Objects
--
h3clldpConfiguration              OBJECT IDENTIFIER ::= { h3clldpObjects 1 }

--
-- LLDP extended global configuration
--
h3clldpAdminStatus OBJECT-TYPE
    SYNTAX TruthValue
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The global administratively desired status of the local LLDP agent."
    ::= { h3clldpConfiguration 1 }

h3clldpComplianceCDPStatus OBJECT-TYPE
    SYNTAX TruthValue
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The global administratively desired status of CDP Compliance."
    ::= { h3clldpConfiguration 2 }

--
-- h3clldpPortConfigTable: LLDP configuration on a per port basis
--

h3clldpPortConfigTable   OBJECT-TYPE
    SYNTAX      SEQUENCE OF H3clldpPortConfigEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The port-based table that controls extended functions."
    ::= { h3clldpConfiguration 3 }

h3clldpPortConfigEntry   OBJECT-TYPE
    SYNTAX      H3clldpPortConfigEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "LLDP extended configuration information for a particular port.  This c-
        onfiguration parameter controls compliance with other non-standard link
        layer discovery protocol such as CDP."
    INDEX  { h3clldpPortConfigPortNum }
    ::= { h3clldpPortConfigTable 1 }

H3clldpPortConfigEntry ::= SEQUENCE {
    h3clldpPortConfigPortNum         LldpPortNumber,
    h3clldpPortConfigCDPComplianceStatus        INTEGER,
    h3clldpPortConfigValidationAction           Integer32,
    h3clldpPortConfigAgingAction                Integer32 }

h3clldpPortConfigPortNum   OBJECT-TYPE
    SYNTAX      LldpPortNumber
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The index value used to identify the port component associated with th-
         is entry."
    ::= { h3clldpPortConfigEntry 1 }

h3clldpPortConfigCDPComplianceStatus  OBJECT-TYPE
    SYNTAX INTEGER {
       txAndRx(1),
       disabled(2)
    }
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
        "The administratively desired CDP Compliance status of the local LLDP a-
        gent.  If the associated h3clldpPortConfigCDPComplianceStatus object h-
        as a value of 'txAndRx', then the LLDP agent will receive CDP frames on
        this port, and will transmit CDP frames only after receive a CDP frames.
        If the associated lldpPortConfigAdminStatus object has a value of 'disa-
        bled', LLDP agent will not transmit or receive CDP frames on this port."
    DEFVAL  { disabled }
    ::= { h3clldpPortConfigEntry 2 }

h3clldpPortConfigValidationAction  OBJECT-TYPE
    SYNTAX Integer32
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
        "Action that neighbor validation takes on a port.  Bit 1 indicates the
        block action.  Bit 2 indicates the shutdown action."
    ::= { h3clldpPortConfigEntry 3 }

h3clldpPortConfigAgingAction  OBJECT-TYPE
    SYNTAX Integer32
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
        "Action that neighbor aging takes on a port.  Bit 1 indicates the block
         action.  Bit 2 indicates the shutdown action."
    ::= { h3clldpPortConfigEntry 4 }

--
-- h3clldpNbIdentityTable:
--

h3clldpNbIdentityTable   OBJECT-TYPE
    SYNTAX      SEQUENCE OF H3clldpNbIdentityEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table contains the neighbor identity information of a port."
    ::= { h3clldpConfiguration 4 }

h3clldpNbIdentityEntry   OBJECT-TYPE
    SYNTAX      H3clldpNbIdentityEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A list of objects containing the neighbor identity information of a
        port."
    INDEX  { h3clldpNbIdentityPortNum }
    ::= { h3clldpNbIdentityTable 1 }

H3clldpNbIdentityEntry ::= SEQUENCE {
    h3clldpNbIdentityPortNum          LldpPortNumber,
    h3clldpNbIdentityChassisIDSubtype INTEGER,
    h3clldpNbIdentityChassisID        OCTET STRING,
    h3clldpNbIdentityPortIDSubtype    INTEGER,
    h3clldpNbIdentityPortID           OCTET STRING,
    h3clldpNbIdentityRowStatus        RowStatus }

h3clldpNbIdentityPortNum   OBJECT-TYPE
    SYNTAX      LldpPortNumber
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Port number."
    ::= { h3clldpNbIdentityEntry 1 }

h3clldpNbIdentityChassisIDSubtype  OBJECT-TYPE
    SYNTAX INTEGER {
        default(0),
        chassisComponent(1),
        interfaceAlias(2),
        portComponent(3),
        macAddress(4),
        networkAddress(5),
        interfaceName(6),
        local(7)
    }
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
        "Chassis ID subtype.  The value range is 0 to 7, and the default value
        is 0.  The values 1 to 7 represents the chassis component, interface al-
        ias, port component, MAC address, network address, interface name, and
        locally assigned subtypes, respectively."
    ::= { h3clldpNbIdentityEntry 2 }

h3clldpNbIdentityChassisID  OBJECT-TYPE
    SYNTAX OCTET STRING (SIZE(0..255))
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
        "Chassis ID, a case-insensitive string of 1 to 255 characters.
        By default, the string is empty.  If the value of
        h3clldpNbIdentityChassisIDSubtype is 4, the chassis ID must be
        a MAC address in H-H-H format."
    ::= { h3clldpNbIdentityEntry 3 }

h3clldpNbIdentityPortIDSubtype  OBJECT-TYPE
    SYNTAX INTEGER {
        default(0),
        interfaceAlias(1),
        portComponent(2),
        macAddress(3),
        networkAddress(4),
        interfaceName(5),
        agentCircuitId(6),
        local(7)
    }
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
        "Port ID subtype.  The value range is 0 to 7, and the default
         value is 0.  The values 1 to 7 represents the interface alias, port co-
         mponent, MAC address, network address, interface name, agent circuit
         ID, and locally assigned subtypes, respectively."
    ::= { h3clldpNbIdentityEntry 4 }

h3clldpNbIdentityPortID  OBJECT-TYPE
    SYNTAX OCTET STRING (SIZE(0..255))
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
        "Port ID, a case-insensitive string of 1 to 255 characters.
        By default, the string is empty.  If the value of
        h3clldpNbIdentityPortIDSubtype is 3, the port ID must be
        a MAC address in H-H-H format."
    ::= { h3clldpNbIdentityEntry 5 }

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

---
--- h3clldpPortStatusTable
---

h3clldpPortStatusTable   OBJECT-TYPE
    SYNTAX      SEQUENCE OF H3clldpPortStatusEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table contains the state information of a port."
    ::= { h3clldpConfiguration 5 }

h3clldpPortStatusEntry   OBJECT-TYPE
    SYNTAX      H3clldpPortStatusEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A list of objects containing the state information of a port."
    INDEX  { h3clldpPortStatusPortNum }
    ::= { h3clldpPortStatusTable 1 }

H3clldpPortStatusEntry ::= SEQUENCE {
    h3clldpPortStatusPortNum      LldpPortNumber,
    h3clldpPortValidationStatus   Integer32,
    h3clldpPortAgingStatus        Integer32
    }

h3clldpPortStatusPortNum   OBJECT-TYPE
    SYNTAX      LldpPortNumber
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "Port number."
    ::= { h3clldpPortStatusEntry 1 }

h3clldpPortValidationStatus  OBJECT-TYPE
    SYNTAX Integer32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
        "Neighbor validation protection status of the port.  The default value
         is 0."
    ::= { h3clldpPortStatusEntry 2 }

h3clldpPortAgingStatus  OBJECT-TYPE
    SYNTAX Integer32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
        "Neighbor aging protection status of the port.  The default value is
         0."
    ::= { h3clldpPortStatusEntry 3 }

--
-- ***********************************************************
--
--        L L D P   M I B   N O T I F I C A T I O N S
--
-- ***********************************************************
--

h3clldpPortStatusTrap OBJECT IDENTIFIER ::= { h3clldpNotifications 0 }

h3clldpValidationStatusChange NOTIFICATION-TYPE
    OBJECTS {
        h3clldpPortStatusPortNum,
        h3clldpPortValidationStatus
    }
    STATUS        current
    DESCRIPTION
        "This notification will be sent when the neighbor validation
         protection status of a port is changed."
    ::= { h3clldpPortStatusTrap 1 }

h3clldpAgingStatusChange NOTIFICATION-TYPE
    OBJECTS {
        h3clldpPortStatusPortNum,
        h3clldpPortAgingStatus
    }
    STATUS        current
    DESCRIPTION
        "This notification will be sent when the neighbor aging protection
          status of a port is changed."
    ::= { h3clldpPortStatusTrap 2 }
END
