-- ============================================================================
-- Copyright (c) 2010-2013 Hewlett-Packard Development Company, L.P.
--
-- Description: The purpose of this MIB file is to provide the definition of
--              the MAC Information general configuration.
-- Reference:
-- Version: V1.2
-- History:
-- V1.0 2007-12-28
--   Initial version, created by gejianzhuang
-- V1.1 2009-08-13
--   Add 'hpnicfMACInformationTrapObjectsExt' by gejianzhuang
-- V1.2 2013-05-02
--   Add 'hpnicfMACInformationMovedTrap' by yangjie
-- ============================================================================
HPN-ICF-MAC-INFORMATION-MIB DEFINITIONS ::= BEGIN

IMPORTS
        hpnicfCommon
    FROM HPN-ICF-OID-MIB
        Unsigned32, Counter32, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE, Integer32
    FROM SNMPv2-SMI
        TEXTUAL-CONVENTION, MacAddress
    FROM SNMPv2-TC
        ifIndex
    FROM IF-MIB;

-- Node definitions
hpnicfMACInformation MODULE-IDENTITY
    LAST-UPDATED "200712281912Z"        -- DEC 28, 2007 at 19:12 GMT
    ORGANIZATION
        ""
    CONTACT-INFO
        ""
    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."
    ::= { hpnicfCommon 87 }

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

hpnicfMACInformationObjects OBJECT IDENTIFIER ::= { hpnicfMACInformation 1 }

hpnicfMACInformationMibGlobal OBJECT IDENTIFIER  ::= { hpnicfMACInformationObjects 1 }

hpnicfMACInformationMIBTableTroop OBJECT IDENTIFIER  ::= { hpnicfMACInformationObjects 2 }

hpnicfMACInformationMibTrap OBJECT IDENTIFIER  ::= { hpnicfMACInformationObjects 3 }

hpnicfMACInformationMibTrapExt OBJECT IDENTIFIER  ::= { hpnicfMACInformationObjects 4 }


hpnicfMACInformationEnabled 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 }
    ::= { hpnicfMACInformationMibGlobal 1 }

hpnicfMACInformationcSendInterval 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 }
    ::= { hpnicfMACInformationMibGlobal 2 }


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

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

hpnicfMACInformationTrapSendNum 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 hpnicfMACInfomationWorkMode is set to trap(1). If the
        hpnicfMACInfomationWorkMode is set to syslog(2), the object will always return 0."
    ::= { hpnicfMACInformationMibGlobal 5 }


hpnicfMACInformationSyslogSendNum 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 hpnicfMACInfomationWorkMode is set to syslog(2). If the
        hpnicfMACInfomationWorkMode is set to trap(1), the object will always return 0."
    ::= { hpnicfMACInformationMibGlobal 6 }


hpnicfMACInformationCacheLen 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 }
    ::= { hpnicfMACInformationMibGlobal 7 }

hpnicfMACInfomationWorkMode OBJECT-TYPE
    SYNTAX      HpnicfMACInfoWorkMode
    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."
    ::= { hpnicfMACInformationMibGlobal 8}


--hpnicfMACInfomationIfTable

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

hpnicfMACInfomationIfEntry OBJECT-TYPE
    SYNTAX      HpnicfMACInfomationIfEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The entry of hpnicfMACInfomationIfTable."
    INDEX
        {
            ifIndex
        }
    ::= { hpnicfMACInfomationIfTable 1 }

HpnicfMACInfomationIfEntry ::= SEQUENCE
    {
        hpnicfMACLearntEnable     INTEGER,
        hpnicfMACRemovedEnable    INTEGER
    }

hpnicfMACLearntEnable 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 }
    ::= { hpnicfMACInfomationIfEntry 1 }

hpnicfMACRemovedEnable 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 }
    ::= { hpnicfMACInfomationIfEntry 2 }


-- hpnicfMACNotificationTrap

hpnicfMACInformationTraps OBJECT IDENTIFIER ::= { hpnicfMACInformationMibTrap 0 }

hpnicfMACInformationChangedTrap NOTIFICATION-TYPE
    OBJECTS
        {
            hpnicfMACInfoTrapIndex,
            hpnicfMACInfoTrapCount,
            hpnicfMACInfoTrapMsg
        }
    STATUS      current
    DESCRIPTION
        "When the cached number of MAC address information is reached the
        value specified by hpnicfMACInformationCacheLen, 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
        hpnicfMACInformationcSendInterval and there is at least one cached
        MAC address information learnt or removed. The object is valid
        only when hpnicfMACInfomationWorkMode is set to trap(1).  When the
        hpnicfMACInfomationWorkMode is set to syslog(2), No trap will be
        generated even hpnicfMACInformationEnabled is set to enabled(1) and
        the feature is enabled on interface."
    ::= { hpnicfMACInformationTraps 1 }

hpnicfMACInformationTrapObjects OBJECT IDENTIFIER  ::= { hpnicfMACInformationMibTrap 2 }

hpnicfMACInfoTrapIndex 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."
    ::= { hpnicfMACInformationTrapObjects 1 }

hpnicfMACInfoTrapCount 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."
    ::= { hpnicfMACInformationTrapObjects 2 }

hpnicfMACInfoTrapMsg 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 - Reserved

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

-- hpnicfMACNotificationTrapExt

hpnicfMACInformationTrapsExt OBJECT IDENTIFIER ::= { hpnicfMACInformationMibTrapExt 0 }

hpnicfMACInformationChangedTrapExt NOTIFICATION-TYPE
    OBJECTS
        {
            hpnicfMACInfoTrapVerExt,
            hpnicfMACInfoTrapIndexExt,
            hpnicfMACInfoTrapCountExt,
            hpnicfMACInfoTrapMsgExt
        }
    STATUS      current
    DESCRIPTION
        "When the cached number of MAC address information is reached the
        value specified by hpnicfMACInformationCacheLen, 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
        hpnicfMACInformationcSendInterval and there is at least one cached
        MAC address information learnt or removed.  The object is valid
        only when hpnicfMACInfomationWorkMode is set to trap(1).  When the
        hpnicfMACInfomationWorkMode is set to syslog(2), No trap will be
        generated even hpnicfMACInformationEnabled is set to enabled(1) and
        the feature is enabled on interface."
    ::= { hpnicfMACInformationTrapsExt 1 }

hpnicfMACInformationMovedTrap NOTIFICATION-TYPE
    OBJECTS
        {
            hpnicfMACInfoTrapMsgMovedAddress,
            hpnicfMACInfoTrapMsgMovedVlan,
            hpnicfMACInfoTrapMsgMovedFromIf,
            hpnicfMACInfoTrapMsgMovedToIf,
            hpnicfMACInfoTrapMsgMovedCount
        }
    STATUS      current
    DESCRIPTION
        "When the MAC address has been moved to another interface, trap
        is generated and is sent to the remote monitoring device."
    ::= { hpnicfMACInformationTrapsExt 2 }

hpnicfMACInformationTrapObjectsExt OBJECT IDENTIFIER  ::= { hpnicfMACInformationMibTrapExt 2 }

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

hpnicfMACInfoTrapIndexExt 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."
    ::= { hpnicfMACInformationTrapObjectsExt 2 }

hpnicfMACInfoTrapCountExt 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."
    ::= { hpnicfMACInformationTrapObjectsExt 3 }

hpnicfMACInfoTrapMsgExt 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 - Reserved

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

hpnicfMACInfoTrapMsgMovedAddress   OBJECT-TYPE
    SYNTAX  MacAddress
    MAX-ACCESS  accessible-for-notify
    STATUS  current
    DESCRIPTION
        "The MAC address that is moved between interfaces."
        ::= { hpnicfMACInformationTrapObjectsExt  5 }

hpnicfMACInfoTrapMsgMovedVlan OBJECT-TYPE
    SYNTAX      Integer32 (1..4094)
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The VLAN number in which the MAC address is moved."
        ::= { hpnicfMACInformationTrapObjectsExt  6}

hpnicfMACInfoTrapMsgMovedFromIf OBJECT-TYPE
    SYNTAX      Integer32 (1..2147483647)
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The index of the interface from which the MAC address is moved."
        ::= { hpnicfMACInformationTrapObjectsExt  7 }

hpnicfMACInfoTrapMsgMovedToIf OBJECT-TYPE
    SYNTAX      Integer32 (1..2147483647)
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The index of the interface to which the MAC address is moved."
        ::= { hpnicfMACInformationTrapObjectsExt  8 }

hpnicfMACInfoTrapMsgMovedCount OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The times for which the MAC address has been moved between the
        interfaces."
        ::= { hpnicfMACInformationTrapObjectsExt  9 }

END
