-- =========================================================================
-- Copyright (c) 2004-2022 New H3C Tech. Co., Ltd.  All rights reserved.
--
-- Description: The MIB file is used for management of
--              microsementation information.
-- Reference:
-- Version: 1.0
-- History:
-- V1.0 Initial version, created by lizhaocheng.
-- ==========================================================================
HH3C-MICROSEGMENT-MIB DEFINITIONS ::= BEGIN

IMPORTS
    hh3cCommon
        FROM HH3C-OID-MIB
    Integer32, IpAddress, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE
        FROM SNMPv2-SMI
    TEXTUAL-CONVENTION
        FROM SNMPv2-TC
    InetAddressPrefixLength
        FROM INET-ADDRESS-MIB;

hh3cMicroSegment MODULE-IDENTITY
    LAST-UPDATED "202211141547Z"        --Nov 14, 2022 at 15:47 GMT
    ORGANIZATION
        "New H3C Technologies Co., Ltd."
    CONTACT-INFO
        "Platform Team New H3C Technologies Co., Ltd.
        Hai-Dian District Beijing P.R. China
        http://www.h3c.com
        Zip:z17576
        "
    DESCRIPTION
        "This MIB contains objects to manage configuration and
         monitor running state for microsegmentation feature.

            *********************************
                    MIB Tables
            **********************************
         This MIB consists of the following tables:
            1 :  hh3cMSegNotifications
            2 :  hh3cMSegObjects
        "
    REVISION "202211141547Z"        --Nov 14, 2022 at 15:47 GMT
    DESCRIPTION
        "Initial revision.
         Add hh3cMSegNotifications.
         Add hh3cMSegObjects."
    ::= { hh3cCommon 258 }

--
-- direction
--
Hh3cMSegDirection ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION
        "Inbound or outbound."
    SYNTAX INTEGER
    {
        inbound(1),
        outbound(2)
    }

--
-- micseg apply type
--
Hh3cMSegApplyObjType ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION
        "Type of apply microsegment."
    SYNTAX INTEGER
    {
        mqc(1),
        pfilter(2),
        pbr(3),
        portal(4),
        telemetryStream(5),
        mod(6),
        netStream(7),
        other(8)
    }

--
-- Top level structure
--

hh3cMSegNotifications  OBJECT IDENTIFIER ::= { hh3cMicroSegment 0 }
hh3cMSegObjects        OBJECT IDENTIFIER ::= { hh3cMicroSegment 1 }

--
-- type definitions
--
-- Notification Objects
--
hh3cMSegNotifyVarObjects OBJECT IDENTIFIER ::= { hh3cMSegObjects 1 }

hh3cMSegNotifyIPAddress OBJECT-TYPE
    SYNTAX IpAddress
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "IPv4 address."
    ::= { hh3cMSegNotifyVarObjects 1 }

hh3cMSegNotifyIPMask OBJECT-TYPE
    SYNTAX IpAddress
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "Mask of IPv4 address."
    ::= { hh3cMSegNotifyVarObjects 2 }

hh3cMSegNotifyVpnInstanceName OBJECT-TYPE
    SYNTAX OCTET STRING (SIZE(1..31))
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "The VPN instance of microsegment member."
    ::= { hh3cMSegNotifyVarObjects 3 }

hh3cMSegNotifySegmentID OBJECT-TYPE
    SYNTAX Integer32 (1..65535)
    MAX-ACCESS accessible-for-notify
    STATUS current

    DESCRIPTION
        "microsegment ID."
    ::= { hh3cMSegNotifyVarObjects 4 }

hh3cMSegNotifySlotID OBJECT-TYPE
    SYNTAX Integer32 (0..65534)
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "The slot number."
    ::= { hh3cMSegNotifyVarObjects 5 }

hh3cMSegNotifyIPv6Address OBJECT-TYPE
    SYNTAX OCTET STRING (SIZE(0..255))
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "IPv6 address."
    ::= { hh3cMSegNotifyVarObjects 6 }

hh3cMSegNotifyIPv6Mask OBJECT-TYPE
    SYNTAX InetAddressPrefixLength
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "The length of the prefix (in bits) associated with
        the IPv6 address of this entry."
    ::= { hh3cMSegNotifyVarObjects 7 }

hh3cMSegNotifyIfName OBJECT-TYPE
    SYNTAX OCTET STRING (SIZE(1..47))
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "The interface name."
    ::= { hh3cMSegNotifyVarObjects 8 }

hh3cMSegNotifyDirection OBJECT-TYPE
    SYNTAX Hh3cMSegDirection
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "Direction."
    ::= { hh3cMSegNotifyVarObjects 9 }

hh3cMSegNotifySrcSegmentID OBJECT-TYPE
    SYNTAX Integer32 (1..65535)
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "source microsegment ID."
    ::= { hh3cMSegNotifyVarObjects 10 }

hh3cMSegNotifyDstSegmentID OBJECT-TYPE
    SYNTAX Integer32 (1..65535)
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "destination microsegment ID."
    ::= { hh3cMSegNotifyVarObjects 11 }

hh3cMSegNotifyProtocol OBJECT-TYPE
    SYNTAX Integer32 (0..255)
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "The protocol index."
    ::= { hh3cMSegNotifyVarObjects 12 }

hh3cMSegNotifySrcPort OBJECT-TYPE
    SYNTAX Integer32 (0..65535)
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "source port."
    ::= { hh3cMSegNotifyVarObjects 13 }

hh3cMSegNotifyDstPort OBJECT-TYPE
    SYNTAX Integer32 (0..65535)
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "destination port."
    ::= { hh3cMSegNotifyVarObjects 14 }

hh3cMSegApplyType OBJECT-TYPE
    SYNTAX Hh3cMSegApplyObjType
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "Direction."
    ::= { hh3cMSegNotifyVarObjects 15 }

--
-- MicoSegment notifications
--
hh3cMSegMemAlarm NOTIFICATION-TYPE
    OBJECTS
    {
        hh3cMSegNotifyIPAddress,
        hh3cMSegNotifyIPMask,
        hh3cMSegNotifyVpnInstanceName,
        hh3cMSegNotifySegmentID,
        hh3cMSegNotifySlotID
    }
    STATUS current
    DESCRIPTION
        "Failed to add microsegment member."
    ::= { hh3cMSegNotifications 1 }

hh3cMSegMemAlarmRecover NOTIFICATION-TYPE
    OBJECTS
    {
        hh3cMSegNotifyIPAddress,
        hh3cMSegNotifyIPMask,
        hh3cMSegNotifyVpnInstanceName,
        hh3cMSegNotifySegmentID,
        hh3cMSegNotifySlotID
    }
    STATUS current
    DESCRIPTION
        "recovered to add microsegment member."
    ::= { hh3cMSegNotifications 2 }

hh3cMSegMemIPv6Alarm NOTIFICATION-TYPE
    OBJECTS
    {
        hh3cMSegNotifyIPv6Address,
        hh3cMSegNotifyIPv6Mask,
        hh3cMSegNotifyVpnInstanceName,
        hh3cMSegNotifySegmentID,
        hh3cMSegNotifySlotID
    }
    STATUS current
    DESCRIPTION
        "Failed to add microsegment ipv6 member."
    ::= { hh3cMSegNotifications 3 }

hh3cMSegMemIPv6AlarmRecover NOTIFICATION-TYPE
    OBJECTS
    {
        hh3cMSegNotifyIPv6Address,
        hh3cMSegNotifyIPv6Mask,
        hh3cMSegNotifyVpnInstanceName,
        hh3cMSegNotifySegmentID,
        hh3cMSegNotifySlotID
    }
    STATUS current
    DESCRIPTION
        "recovered to add microsegment ipv6 member."
    ::= { hh3cMSegNotifications 4 }

hh3cMSegEnableAlarm NOTIFICATION-TYPE
    OBJECTS
    {
        hh3cMSegNotifySlotID
    }
    STATUS current
    DESCRIPTION
        "Failed to enable the microsegment."
    ::= { hh3cMSegNotifications 5 }

hh3cMSegEnableAlarmRecover NOTIFICATION-TYPE
    OBJECTS
    {
        hh3cMSegNotifySlotID
    }
    STATUS current
    DESCRIPTION
        "recovered to enable the microsegment."
    ::= { hh3cMSegNotifications 6 }

hh3cMSegCreateAlarm NOTIFICATION-TYPE
    OBJECTS
    {
        hh3cMSegNotifySegmentID,
        hh3cMSegNotifySlotID
    }
    STATUS current
    DESCRIPTION
        "Failed to add microsegment group."
    ::= { hh3cMSegNotifications 7 }

hh3cMSegCreateAlarmRecover NOTIFICATION-TYPE
    OBJECTS
    {
        hh3cMSegNotifySegmentID,
        hh3cMSegNotifySlotID
    }
    STATUS current
    DESCRIPTION
        "recovered to add microsegment group."
    ::= { hh3cMSegNotifications 8 }

hh3cMSegPolicyAlarm NOTIFICATION-TYPE
    OBJECTS
    {
        hh3cMSegNotifyIfName,
        hh3cMSegNotifyDirection,
        hh3cMSegNotifySrcSegmentID,
        hh3cMSegNotifyDstSegmentID,
        hh3cMSegNotifyProtocol,
        hh3cMSegNotifySrcPort,
        hh3cMSegNotifyDstPort,
        hh3cMSegNotifySlotID,
        hh3cMSegApplyType
    }
    STATUS current
    DESCRIPTION
        "recovered to apply the microsegment group."
    ::= { hh3cMSegNotifications 9 }

hh3cMSegPolicyAlarmRecover NOTIFICATION-TYPE
    OBJECTS
    {
        hh3cMSegNotifyIfName,
        hh3cMSegNotifyDirection,
        hh3cMSegNotifySrcSegmentID,
        hh3cMSegNotifyDstSegmentID,
        hh3cMSegNotifyProtocol,
        hh3cMSegNotifySrcPort,
        hh3cMSegNotifyDstPort,
        hh3cMSegNotifySlotID,
        hh3cMSegApplyType
    }
    STATUS current
    DESCRIPTION
        "recovered to apply the microsegment group."
    ::= { hh3cMSegNotifications 10 }
END
