-- ==================================================================
-- Copyright (c) 2004-2022 New H3C Tech. Co., Ltd. All rights reserved.
--
-- Description: PIM MIB
-- Reference:
-- Version: V1.0
-- History:
-- V1.0 2021-12-14 Created by Ma Xiaozhong
--      Add Hh3cPimMode, Hh3cPimGroupMappingOriginType,
--      hh3cPimRPMappingChange, hh3cPimGroupMappingOrigin,
--      hh3cPimGroupMappingAddressType, hh3cPimGroupMappingGrpAddress,
--      hh3cPimGroupMappingGrpPrefixLen, hh3cPimGroupMappingRPAddressType,
--      hh3cPimGroupMappingRPAddress, hh3cPimGroupMappingPimMode,
--      hh3cPimGroupMappingPrecedence, hh3cPimInterfaceElection,
--      hh3cPimInterfaceIfIndex, hh3cPimInterfaceAddress,
--      hh3cPimInterfaceIPVersion, hh3cPimInterfaceAddressType,
--      hh3cPimNeighborLoss, hh3cPimNeighborUpTime,
--      hh3cPimNeighborLossReason, hh3cPimNeighborIfName,
--      hh3cPimInterfaceName by jiayunda
-- ==================================================================
--
-- Variables and types be imported
--
-- ==================================================================
HH3C-PIM-STD-MIB DEFINITIONS ::= BEGIN

IMPORTS

    MODULE-IDENTITY,OBJECT-TYPE,NOTIFICATION-TYPE,Unsigned32,
    TimeTicks
        FROM SNMPv2-SMI

    TEXTUAL-CONVENTION,DisplayString
        FROM SNMPv2-TC

    hh3cCommon
        FROM HH3C-OID-MIB

    InetAddressType,InetAddress,InetAddressPrefixLength,InetVersion
        FROM INET-ADDRESS-MIB

    InterfaceIndex
        FROM IF-MIB;

hh3cPimStd MODULE-IDENTITY
    LAST-UPDATED "202207211350Z"
    ORGANIZATION
        "New H3C Tech. Co., Ltd."
    CONTACT-INFO
        "Platform Team New H3C Tech. Co., Ltd.
        Hai-Dian District Beijing P.R. China
        http://www.h3c.com
        Zip:100085
        "
    DESCRIPTION
        "PIM(Protocol Independent Multicast) Management MIB"
    -- Revision history.
    REVISION "202207211350Z"
    DESCRIPTION
       "Add Hh3cPimMode, Hh3cPimGroupMappingOriginType,
        hh3cPimRPMappingChange, hh3cPimGroupMappingOrigin,
        hh3cPimGroupMappingAddressType, hh3cPimGroupMappingGrpAddress,
        hh3cPimGroupMappingGrpPrefixLen, hh3cPimGroupMappingRPAddressType,
        hh3cPimGroupMappingRPAddress, hh3cPimGroupMappingPimMode,
        hh3cPimGroupMappingPrecedence, hh3cPimInterfaceElection,
        hh3cPimInterfaceIfIndex, hh3cPimInterfaceAddress,
        hh3cPimInterfaceIPVersion, hh3cPimInterfaceAddressType,
        hh3cPimNeighborLoss, hh3cPimNeighborUpTime,
        hh3cPimNeighborLossReason, hh3cPimNeighborIfName,
        hh3cPimInterfaceName"
    REVISION "202112141400Z"
    DESCRIPTION
        "The initial version of this MIB file."
    ::= { hh3cCommon 213 }

Hh3cPimMode ::= TEXTUAL-CONVENTION
    STATUS     current
    DESCRIPTION
            "The PIM mode in which a group is operating.
            none:The group is not using PIM, which may be the
                 case if, for example, it is a link-local or
                 unroutable group address.
            ssm:Source-Specific Multicast (SSM) with PIM Sparse Mode.
            asm:Any Source Multicast (ASM) with PIM Spars Mode.
            bidir:Bidirectional PIM.
            dm:PIM Dense Mode.
            other:Any other PIM mode."

    SYNTAX     INTEGER {
                  none(1),
                  ssm(2),
                  asm(3),
                  bidir(4),
                  dm(5),
                  other(6)
                }

Hh3cPimGroupMappingOriginType ::= TEXTUAL-CONVENTION
    STATUS     current
    DESCRIPTION
            "The mechanism by which a PIM group mapping was learned.
            fixed:Link-local or unroutable group mappings.
            configRp:Local static RP configuration.
            configSsm:Local SSM Group configuration.
            bsr:The PIM Bootstrap Router (BSR) mechanism.
            autoRP:Cisco's Auto-RP mechanism.
            embedded:The Embedded-RP mechanism where the RP address
                         is embedded in the multicast group address.
            other:Any other mechanism."
    SYNTAX     INTEGER {
                  fixed(1),
                  configRp(2),
                  configSsm(3),
                  bsr(4),
                  autoRP(5),
                  embedded(6),
                  other(7)
               }

hh3cPimNotifications OBJECT IDENTIFIER ::= { hh3cPimStd 0 }
hh3cPimTrapBindObjects OBJECT IDENTIFIER ::= { hh3cPimStd 1 }

hh3cPimInstanceID OBJECT-TYPE
    SYNTAX     Unsigned32
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The ID of the PIM instance."
    ::= { hh3cPimTrapBindObjects 1 }

hh3cPimInstanceName OBJECT-TYPE
    SYNTAX     DisplayString (SIZE (0..255))
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The Name of the PIM instance."
    ::= { hh3cPimTrapBindObjects 2 }

hh3cPimNeighborExpiryTime OBJECT-TYPE
    SYNTAX     TimeTicks
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The minimum time remaining before this PIM neighbor will
             time out.  The value zero indicates that this PIM neighbor
             will never time out."
    ::= { hh3cPimTrapBindObjects 3 }

hh3cPimNotificationLimitType OBJECT-TYPE
    SYNTAX     INTEGER {
                         smStarGroup(1),
                         smSourceGroup(2)
    }
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The entry type:
             The smStarGroup indicates that the current restricted table
              item type is PIM-SM (*,G) table item
             The smSourceGroup indicates that the current restricted table
              item type is PIM-SM (S,G) table item;"
    ::= { hh3cPimTrapBindObjects 4 }

hh3cPimNotificationAddressFamily OBJECT-TYPE
    SYNTAX     InetAddressType
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The address family of PIM."
    ::= { hh3cPimTrapBindObjects 5 }

hh3cPimNotificationEntryCount OBJECT-TYPE
    SYNTAX     Unsigned32
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The current PIM entry count."
    ::= { hh3cPimTrapBindObjects 6 }

hh3cPimNotificationLimitCount OBJECT-TYPE
    SYNTAX     Unsigned32
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The maxmum limit of PIM entry."
    ::= { hh3cPimTrapBindObjects 7 }

hh3cPimNotificationThresholdCnt OBJECT-TYPE
    SYNTAX     Unsigned32
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The Threshold value of PIM table entry."
    ::= { hh3cPimTrapBindObjects 8 }

hh3cPimThresholdReasonType OBJECT-TYPE
    SYNTAX     INTEGER {
                         entryCreated(1),
                         configurationChanged(2)
    }
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
        "Describe the reason for trap sending:
         The smStarGroup indicates that the current restricted table
         item type is PIM-SM (*,G) table item
         The smSourceGroup indicates that the current restricted table
         item type is PIM-SM (S,G) table item;"
    ::= { hh3cPimTrapBindObjects 9 }

hh3cPimRouteEClearReasonType OBJECT-TYPE
    SYNTAX     INTEGER {
                         entryDeleted(1),
                         configurationChanged(2)
    }
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
        "Describe the reason for trap sending:
         The smStarGroup indicates that the current restricted table
         item type is PIM-SM (*,G) table item.
         The smSourceGroup indicates that the current restricted table
         item type is PIM-SM (S,G) table item."
    ::= { hh3cPimTrapBindObjects 10 }

hh3cPimThresholdClearReasonType OBJECT-TYPE
    SYNTAX     INTEGER {
                         entryDeleted(1),
                         configurationChanged(2)
    }
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
        "Describe the reason for trap sending:
         The smStarGroup indicates that the current threshold limit table
         item type is PIM-SM (*,G) table item.
         The smSourceGroup indicates that the current threshold limit
         table item type is PIM-SM (S,G) table item."
    ::= { hh3cPimTrapBindObjects 11 }

hh3cPimNotificationSourceAddress OBJECT-TYPE
    SYNTAX     InetAddress
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The source IP address of the PIM entry."
    ::= { hh3cPimTrapBindObjects 12 }

hh3cPimNotificationGroupAddress OBJECT-TYPE
    SYNTAX     InetAddress
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The group IP address of the PIM entry."
    ::= { hh3cPimTrapBindObjects 13 }

hh3cPimNbrAddressIfIndex OBJECT-TYPE
    SYNTAX     InterfaceIndex
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The value of ifIndex for the interface used to reach this
            PIM neighbor."
    ::= { hh3cPimTrapBindObjects 14 }

hh3cPimNbrAddressType OBJECT-TYPE
    SYNTAX     InetAddressType
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The address type of this PIM neighbor."
    ::= { hh3cPimTrapBindObjects 15}

hh3cPimNbrAddress OBJECT-TYPE
    SYNTAX     InetAddress (SIZE (4|8|16|20))
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The IP address of this PIM neighbor. The InetAddressType
            is specified by the hh3cpimNbrAddressType object."
    ::= { hh3cPimTrapBindObjects 16 }

hh3cPimNeighborUpTime OBJECT-TYPE
    SYNTAX     TimeTicks
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The time since the PIM neighbor was created as
             a neighbor of the local router."
    ::= { hh3cPimTrapBindObjects 17 }

hh3cPimGroupMappingOrigin OBJECT-TYPE
    SYNTAX     Hh3cPimGroupMappingOriginType
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The mechanism by which this group mapping was learned."
    ::= { hh3cPimTrapBindObjects 18 }

hh3cPimGroupMappingAddressType OBJECT-TYPE
    SYNTAX     InetAddressType
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The address type of the IP multicast group prefix."
    ::= { hh3cPimTrapBindObjects 19 }

hh3cPimGroupMappingGrpAddress OBJECT-TYPE
    SYNTAX     InetAddress (SIZE (4|8|16|20))
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "This object is represented as an IP multicast group address."
    ::= { hh3cPimTrapBindObjects 20 }

hh3cPimGroupMappingGrpPrefixLen OBJECT-TYPE
    SYNTAX     InetAddressPrefixLength (4..128)
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "This object represents the group address mask length."
    ::= { hh3cPimTrapBindObjects 21 }

hh3cPimGroupMappingRPAddressType OBJECT-TYPE
    SYNTAX     InetAddressType
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "This object represents the address type of an RP"
    ::= { hh3cPimTrapBindObjects 22 }

hh3cPimGroupMappingRPAddress OBJECT-TYPE
    SYNTAX     InetAddress (SIZE (0|4|8|16|20))
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The IP address of the RP to be used for groups within this
            group prefix."
    ::= { hh3cPimTrapBindObjects 23 }

hh3cPimGroupMappingPimMode OBJECT-TYPE
    SYNTAX     Hh3cPimMode
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "This object represents the currently running PIM mode."
    ::= { hh3cPimTrapBindObjects 24 }

hh3cPimGroupMappingPrecedence OBJECT-TYPE
    SYNTAX     Unsigned32
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "This object represents the corresponding priority of different
             RP types. The higher the value, the lower the priority, and
             0 means the highest priority"
    ::= { hh3cPimTrapBindObjects 25 }

hh3cPimInterfaceIfIndex OBJECT-TYPE
    SYNTAX     InterfaceIndex
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The ifIndex value of this PIM interface."
    ::= { hh3cPimTrapBindObjects 26 }

hh3cPimInterfaceIPVersion OBJECT-TYPE
    SYNTAX     InetVersion
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "This object represents the IP version of the PIM interface
             , which can be IPv4 or IPv6"
    ::= { hh3cPimTrapBindObjects 27 }

hh3cPimInterfaceAddressType OBJECT-TYPE
    SYNTAX     InetAddressType
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The address type of this PIM interface."
    ::= { hh3cPimTrapBindObjects 28 }

hh3cPimInterfaceAddress OBJECT-TYPE
    SYNTAX     InetAddress (SIZE (0|4|8|16|20))
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The primary IP address of this router on this PIM
            interface.  The InetAddressType is given by the
            hh3cPimInterfaceAddress object."
    ::= { hh3cPimTrapBindObjects 29 }

hh3cPimNeighborLossReason OBJECT-TYPE
    SYNTAX     INTEGER {
                         holdTimeTimeout(1),
             notReceiveHelloForALongTime(2),
                           interfaceDown(3),
                       receiveHelloAgain(4),
                        neighbourDeleted(5),
                            alarmTimeOut(6),
                      receiveHelloCancel(7),
                        bfdSessionIsDown(8),
                           userOperation(9),
                            alarmClear(100)
    }
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
        "Describe the reason for trap sending:
         holdTimeTimeout:Neighbor's holdtime timer timed out.
         interfaceDown:The interface state of the neighbor changes to down.
         neighbourDeleted:Neighbor deletion.
         receiveHelloCancel:Received a neighbor message with holdtime 0.
         bfdSessionIsDown:Neighbor's BFD session down."
    ::= { hh3cPimTrapBindObjects 30 }

hh3cPimNeighborIfName OBJECT-TYPE
    SYNTAX     DisplayString (SIZE (1..64))
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The name of the PIM neighbor interface."
    ::= { hh3cPimTrapBindObjects 31 }

hh3cPimInterfaceName OBJECT-TYPE
    SYNTAX     DisplayString (SIZE (1..64))
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
            "The name of the PIM interface."
    ::= { hh3cPimTrapBindObjects 32 }

--
-- trap
--
hh3cPimNeighborAdd NOTIFICATION-TYPE
    OBJECTS { hh3cPimNeighborExpiryTime,
              hh3cPimInstanceID,
              hh3cPimInstanceName,
              hh3cPimNbrAddressType,
              hh3cPimNbrAddressIfIndex,
              hh3cPimNbrAddress
            }
    STATUS     current
    DESCRIPTION
            "A notification sent when PIM add a new neighbor."
    ::= { hh3cPimNotifications 1 }

hh3cPimRouteThresholdExceed NOTIFICATION-TYPE
    OBJECTS { hh3cPimNotificationLimitType,
              hh3cPimNotificationAddressFamily,
              hh3cPimNotificationEntryCount,
              hh3cPimNotificationThresholdCnt,
              hh3cPimThresholdReasonType
            }
    STATUS     current
    DESCRIPTION
            "A notification sent when the number of pim entries
            exceeded the global entry threshold."
    ::= { hh3cPimNotifications 2 }

hh3cPimRouteThresholdExceedClear NOTIFICATION-TYPE
    OBJECTS { hh3cPimNotificationLimitType,
              hh3cPimNotificationAddressFamily,
              hh3cPimNotificationEntryCount,
              hh3cPimNotificationThresholdCnt,
              hh3cPimThresholdClearReasonType
            }
    STATUS     current
    DESCRIPTION
            "A notification sent when the number of pim entries
            fell below the global entry threshold."
    ::= { hh3cPimNotifications 3 }

hh3cPimRouteExceed NOTIFICATION-TYPE
    OBJECTS { hh3cPimNotificationLimitType,
              hh3cPimNotificationAddressFamily,
              hh3cPimNotificationSourceAddress,
              hh3cPimNotificationGroupAddress,
              hh3cPimNotificationEntryCount,
              hh3cPimNotificationLimitCount,
              hh3cPimInstanceName
            }
    STATUS     current
    DESCRIPTION
            "A notification sent when the number of pim entries
            exceeded the global entry limit."
    ::= { hh3cPimNotifications 4 }

hh3cPimRouteExceedClear NOTIFICATION-TYPE
    OBJECTS { hh3cPimNotificationLimitType,
              hh3cPimNotificationAddressFamily,
              hh3cPimNotificationSourceAddress,
              hh3cPimNotificationGroupAddress,
              hh3cPimNotificationEntryCount,
              hh3cPimNotificationLimitCount,
              hh3cPimInstanceName,
              hh3cPimRouteEClearReasonType
            }
    STATUS     current
    DESCRIPTION
            "A notification sent when the number of pim entries
             fell below the global entry threshold."
    ::= { hh3cPimNotifications 5 }

hh3cPimNeighborLoss NOTIFICATION-TYPE
    OBJECTS { hh3cPimNbrAddressIfIndex,
              hh3cPimNbrAddressType,
              hh3cPimNbrAddress,
              hh3cPimNeighborUpTime,
              hh3cPimNeighborIfName,
              hh3cPimInstanceID,
              hh3cPimInstanceName,
              hh3cPimNeighborLossReason
            }
    STATUS     current
    DESCRIPTION
            "The hh3cPimNeighborLoss notification is generated
             when PIM lost a neighbor."
    ::= { hh3cPimNotifications 6 }

hh3cPimRPMappingChange NOTIFICATION-TYPE
    OBJECTS { hh3cPimGroupMappingOrigin,
              hh3cPimGroupMappingAddressType,
              hh3cPimGroupMappingGrpAddress,
              hh3cPimGroupMappingGrpPrefixLen,
              hh3cPimGroupMappingRPAddressType,
              hh3cPimGroupMappingRPAddress,
              hh3cPimGroupMappingPimMode,
              hh3cPimGroupMappingPrecedence,
              hh3cPimInstanceID,
              hh3cPimInstanceName
            }
    STATUS      current
    DESCRIPTION
            "The hh3cPimRPMappingChange notification is generated when
             the active RP mapping on this device is changed"
    ::= { hh3cPimNotifications 7 }

hh3cPimInterfaceElection NOTIFICATION-TYPE
    OBJECTS { hh3cPimInterfaceIfIndex,
              hh3cPimInterfaceName,
              hh3cPimInterfaceIPVersion,
              hh3cPimInterfaceAddressType,
              hh3cPimInterfaceAddress,
              hh3cPimInstanceID,
              hh3cPimInstanceName
            }
    STATUS      current
    DESCRIPTION
            "The hh3cPimInterfaceElection notification is generated when the
             new DR or DF has been elected on a network."
    ::= { hh3cPimNotifications 8 }

END
