-- ============================================================================
-- Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
--
-- Description: The purpose of this MIB file is to provide the definition of
--              the MAC Information general configuration.
-- Reference:
-- Version: V1.1
-- History:
-- V1.0 2007-12-28
--   Initial version, created by gejianzhuang
-- V1.1 2009-08-13
--   Add 'h3cMACInformationTrapObjectsExt' by gejianzhuang
-- ============================================================================
A3COM-HUAWEI-MAC-INFORMATION-MIB DEFINITIONS ::= BEGIN

IMPORTS
        h3cCommon
    FROM A3COM-HUAWEI-OID-MIB
        Unsigned32, Counter32, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE
    FROM SNMPv2-SMI
        TEXTUAL-CONVENTION
    FROM SNMPv2-TC
        ifIndex
    FROM IF-MIB;

-- Node definitions
h3cMACInformation MODULE-IDENTITY
    LAST-UPDATED "200712281912Z"        -- DEC 28, 2007 at 19:12 GMT
    ORGANIZATION
        "Hangzhou H3C Technologies Co., Ltd."
    CONTACT-INFO
        "Platform Team H3C Technologies Co., Ltd.
         Hai-Dian District Beijing P.R. China
         http://www.h3c.com
         Zip: 100085"
    DESCRIPTION
        "This MIB file is to provide the definition of the MAC Information
        general configuration.  MAC Information feature is used to
        make that the changed MAC information in the monitored device is
        knowable in remote monitoring device."
    REVISION "200712281912Z"
    DESCRIPTION
        "The initial version of this MIB file."
    ::= { h3cCommon 87 }

H3cMACInfoWorkMode ::=  TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "The working mode of the MAC Information feature."
    SYNTAX      INTEGER
        {
            trap(1),
            syslog(2)
        }

h3cMACInformationObjects OBJECT IDENTIFIER ::= { h3cMACInformation 1 }

h3cMACInformationMibGlobal OBJECT IDENTIFIER  ::= { h3cMACInformationObjects 1 }

h3cMACInformationMIBTableTroop OBJECT IDENTIFIER  ::= { h3cMACInformationObjects 2 }

h3cMACInformationMibTrap OBJECT IDENTIFIER  ::= { h3cMACInformationObjects 3 }

h3cMACInformationMibTrapExt OBJECT IDENTIFIER  ::= { h3cMACInformationObjects 4 }


h3cMACInformationEnabled OBJECT-TYPE
    SYNTAX      INTEGER
        {
            enabled(1),
            disabled(2)
        }
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The value is a global setting.  The feature will not work until the
        value is set to enabled(1).  If the value is set to disabled(2),
        the feature will stop working even there are interfaces that have
        been enabled the feature."
    DEFVAL { disabled }
    ::= { h3cMACInformationMibGlobal 1 }

h3cMACInformationcSendInterval OBJECT-TYPE
    SYNTAX      Unsigned32(1..20000)
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The maximum interval that the device generate syslogs or traps.
        The unit is second."
    DEFVAL { 1 }
    ::= { h3cMACInformationMibGlobal 2 }


h3cMACInformationLearntMACNum OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of MAC addresses that learnt by the device since the
        h3cMACInformationEnabled is set to enabled(1) and h3cMACLearntEnable
        is set to enabled(1) at least on one interface. If the h3cMACInformationEnabled
        is set to disabled(2), the object will always return 0."
    ::= { h3cMACInformationMibGlobal 3 }

h3cMACInformationRemovedMACNum OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of MAC addresses that removed by the device since the
        h3cMACInformationEnabled is set to enabled(1) and h3cMACRemovedEnable
        is set to enabled(1) at least on one interface. If the h3cMACInformationEnabled
        is set to disabled(2), the object will always return 0."
    ::= { h3cMACInformationMibGlobal 4 }

h3cMACInformationTrapSendNum OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of traps that have been generated. This object is valid
        only when the h3cMACInfomationWorkMode is set to trap(1). If the
        h3cMACInfomationWorkMode is set to syslog(2), the object will always return 0."
    ::= { h3cMACInformationMibGlobal 5 }


h3cMACInformationSyslogSendNum OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of syslogs that have been generated. This object is valid only
        when the h3cMACInfomationWorkMode is set to syslog(2). If the
        h3cMACInfomationWorkMode is set to trap(1), the object will always return 0."
    ::= { h3cMACInformationMibGlobal 6 }


h3cMACInformationCacheLen OBJECT-TYPE
    SYNTAX      Unsigned32(0..1000)
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The maximum queue lenth used to cache the changed MAC addresses information
        in the monitored device. If the value is set to 0, syslog or trap will generate
        as soon as there is a MAC address learnt or removed."
    DEFVAL { 50 }
    ::= { h3cMACInformationMibGlobal 7 }

h3cMACInfomationWorkMode OBJECT-TYPE
    SYNTAX      H3cMACInfoWorkMode
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The working mode of MAC Information feature.  If the object is
        set to trap(1), the device will use trap mode to notify the MAC
        address information and all properties of trap interrelated is
        valid.  If the object is set to syslog(2), the device will use
        syslog mode to notify the MAC address information and all
        properties of trap interrelated is invalid."
    ::= { h3cMACInformationMibGlobal 8}


--h3cMACInfomationIfTable

h3cMACInfomationIfTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF H3cMACInfomationIfEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The table is used to enable or disable the MAC Information feature
        on interfaces."
    ::= { h3cMACInformationMIBTableTroop 1 }

h3cMACInfomationIfEntry OBJECT-TYPE
    SYNTAX      H3cMACInfomationIfEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The entry of h3cMACInfomationIfTable."
    INDEX
        {
            ifIndex
        }
    ::= { h3cMACInfomationIfTable 1 }

H3cMACInfomationIfEntry ::= SEQUENCE
    {
        h3cMACLearntEnable     INTEGER,
        h3cMACRemovedEnable    INTEGER
    }

h3cMACLearntEnable OBJECT-TYPE
    SYNTAX      INTEGER
        {
            enabled(1),
            disabled(2)
        }
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "If the object is set to enabled(1) on interface, the device
        will cache the MAC address information that learnt on the interface."
    DEFVAL { disabled }
    ::= { h3cMACInfomationIfEntry 1 }

h3cMACRemovedEnable OBJECT-TYPE
    SYNTAX      INTEGER
        {
            enabled(1),
            disabled(2)
        }
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "If the object is set to enable(1) on interface, the device
        will cache the MAC address information that removed on the interface."
    DEFVAL { disabled }
    ::= { h3cMACInfomationIfEntry 2 }


-- h3cMACNotificationTrap

h3cMACInformationTraps OBJECT IDENTIFIER ::= { h3cMACInformationMibTrap 0 }

h3cMACInformationChangedTrap NOTIFICATION-TYPE
    OBJECTS
        {
            h3cMACInfoTrapIndex,
            h3cMACInfoTrapCount,
            h3cMACInfoTrapMsg
        }
    STATUS      current
    DESCRIPTION
        "When the cached number of MAC address information is reached the
        value specified by h3cMACInformationCacheLen, trap is generated
        and is sent to the remote monitoring device.  The trap is also
        generated when the amount of time elapsed since the previous
        notification is greater than the interval value specified by
        h3cMACInformationcSendInterval and there is at least one cached
        MAC address information learnt or removed. The object is valid
        only when h3cMACInfomationWorkMode is set to trap(1).  When the
        h3cMACInfomationWorkMode is set to syslog(2), No trap will be
        generated even h3cMACInformationEnabled is set to enabled(1) and
        the feature is enabled on interface."
    ::= { h3cMACInformationTraps 1 }

h3cMACInformationTrapObjects OBJECT IDENTIFIER  ::= { h3cMACInformationMibTrap 2 }

h3cMACInfoTrapIndex OBJECT-TYPE
    SYNTAX      Unsigned32(1..4294967295)
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The sequence number of trap information. When it reaches the
        maximum value, it should be set to 1."
    ::= { h3cMACInformationTrapObjects 1 }

h3cMACInfoTrapCount OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The cell number of the current trap information.  The trap
        message may consists of more than one MAC address information.
        Each of the one MAC address information in one trap is called cell."
    ::= { h3cMACInformationTrapObjects 2 }

h3cMACInfoTrapMsg OBJECT-TYPE
    SYNTAX      OCTET STRING(SIZE(1..254))
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "This object is the MAC information that learnt or removed
        in the monitored device. It can consists of more than
        one MAC information in the object.
        This object is in the format of '<cell1><cell2>...'. Each
        cell consists of 12 octets in the format of
        '<operationType><VLAN><MAC><MACtype><ifIndex>'.

        <operationType> is the reason type of MAC address changed and have
        size of 1 octet. It only supports the following values.
        1 - MAC learnt.
        2 - MAC removed.

        <VLAN> is the vlan number that correspond to the MAC address in
        MAC address table and has size of 2 octet.

        <MAC> is the MAC address and has size of 6 octets.

        <MACtype> is the MAC address type and has size of 1 octet. It only
        supports the following values.
        0 - Unknown
        1 - Learnt
        2 - Config dynamic
        3 - Config static
        4 - Blackhole
        5 - Security
        6 - 802.1x
        7 - MAC authentication
        8 - Voice VLAN
        9 - WAPI

        <ifIndex> is the index of the interface where the MAC
        address is learnt or removed and has size of 2 octets."
    ::= { h3cMACInformationTrapObjects 3 }

-- h3cMACNotificationTrapExt

h3cMACInformationTrapsExt OBJECT IDENTIFIER ::= { h3cMACInformationMibTrapExt 0 }

h3cMACInformationChangedTrapExt NOTIFICATION-TYPE
    OBJECTS
        {
            h3cMACInfoTrapVerExt,
            h3cMACInfoTrapIndexExt,
            h3cMACInfoTrapCountExt,
            h3cMACInfoTrapMsgExt
        }
    STATUS      current
    DESCRIPTION
        "When the cached number of MAC address information is reached the
        value specified by h3cMACInformationCacheLen, trap is generated
        and is sent to the remote monitoring device.  The trap is also
        generated when the amount of time elapsed since the previous
        notification is greater than the interval value specified by
        h3cMACInformationcSendInterval and there is at least one cached
        MAC address information learnt or removed.  The object is valid
        only when h3cMACInfomationWorkMode is set to trap(1).  When the
        h3cMACInfomationWorkMode is set to syslog(2), No trap will be
        generated even h3cMACInformationEnabled is set to enabled(1) and
        the feature is enabled on interface."
    ::= { h3cMACInformationTrapsExt 1 }

h3cMACInformationTrapObjectsExt OBJECT IDENTIFIER  ::= { h3cMACInformationMibTrapExt 2 }

h3cMACInfoTrapVerExt OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The version of trap information."
    ::= { h3cMACInformationTrapObjectsExt 1 }

h3cMACInfoTrapIndexExt OBJECT-TYPE
    SYNTAX      Unsigned32(1..4294967295)
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The sequence number of trap information.  When it reaches the
        maximum value, it should be set to 1."
    ::= { h3cMACInformationTrapObjectsExt 2 }

h3cMACInfoTrapCountExt OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The cell number of the current trap information.  The trap
        message may consists of more than one MAC address information.
        Each of the one MAC address information in one trap is called cell."
    ::= { h3cMACInformationTrapObjectsExt 3 }

h3cMACInfoTrapMsgExt OBJECT-TYPE
    SYNTAX      OCTET STRING(SIZE(1..254))
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "This object is the MAC information that learnt or removed
        in the monitored device.  It can consists of more than
        one MAC information in the object.
        This object is in the format of '<cell1><cell2>...'.  Each
        cell consists of 14 octets in the format of
        '<operationType><VLAN><MAC><MACtype><ifIndex>'.

        <operationType> is the reason type of MAC address changed and have
        size of 1 octet.  It only supports the following values.
        1 - MAC learnt.
        2 - MAC removed.

        <VLAN> is the vlan number that correspond to the MAC address in
        MAC address table and has size of 2 octet.

        <MAC> is the MAC address and has size of 6 octets.

        <MACtype> is the MAC address type and has size of 1 octet.  It only
        supports the following values.
        0 - Unknown
        1 - Learnt
        2 - Config dynamic
        3 - Config static
        4 - Blackhole
        5 - Security
        6 - 802.1x
        7 - MAC authentication
        8 - Voice VLAN
        9 - WAPI

        <ifIndex> is the index of the interface where the MAC
        address is learnt or removed and has size of 4 octets."
    ::= { h3cMACInformationTrapObjectsExt 4 }

END
