-- =============================================================================
-- Copyright (c) 2010-2014 Hewlett-Packard Development Company, L.P.
--
-- Description: Ethernet Virtual Connection MIB
-- Reference:
-- Version: V1.3
-- History:
--   V1.0 2009-08-08 Initial version Created by Jianyong Song
--   V1.1 2011-12-23 Updated by Xuanli Mou
--      Added hpnicfEvcSrvInstEnableInStat in hpnicfEvcSrvInstTable.
--      Added hpnicfEvcSrvInstEnableOutStat in hpnicfEvcSrvInstTable.
--      Added hpnicfEvcSrvInstCarTable.
--      Added hpnicfEvcSrvInstStatInfoTable.
--   V1.2 2012-11-21 Updated by Neng Yan
--      portbased is replaced by default.
--   V1.3 2014-01-03 Updated by Neng Yan
--      Added hpnicfEvcSrvInstCvlanIdListLow, hpnicfEvcSrvInstCvlanIdListHigh
--          in hpnicfEvcSrvInstTable.
--      Added encapSvlanIdCvlanId(6),
--          encapSvlanIdCvlanIdList(7),
--          encapCvlanId(8),
--          encapCvlanIdList(9) for hpnicfEvcSrvInstEncapCapabilities.
--      Added svlanIdCvlanId(6),
--          svlanIdCvlanIdList(7),
--          svlanIdCvlanIdAll(8),
--          cvlanIdList(9) for hpnicfEvcSrvInstEncap.
-- =============================================================================
HPN-ICF-EVC-MIB DEFINITIONS ::= BEGIN
IMPORTS
        RowStatus,
        TruthValue
    FROM SNMPv2-TC
        MODULE-IDENTITY,
        OBJECT-TYPE,
        Integer32,
        Counter64
    FROM SNMPv2-SMI
        ifIndex
    FROM IF-MIB
        hpnicfCommon
    FROM HPN-ICF-OID-MIB;

-- =============================================================================
-- module identity part
-- =============================================================================
hpnicfEvc MODULE-IDENTITY
    LAST-UPDATED
        "200908081000Z"        -- Aug 08, 2009 at 10:00 GMT
    ORGANIZATION
        ""
    CONTACT-INFO
        ""
    DESCRIPTION
        "Ethernet Virtual Connection MIB"
    REVISION
        "200908081000Z"   -- Aug 08, 2009 at 10:00 GMT
    DESCRIPTION
        "The initial version of this MIB."
    ::= { hpnicfCommon 106 }

-- =============================================================================
-- object definition begin
-- =============================================================================

hpnicfEvcObjects      OBJECT IDENTIFIER ::= { hpnicfEvc 1 }

hpnicfEvcScalarGroup OBJECT IDENTIFIER ::= { hpnicfEvcObjects 1 }

hpnicfEvcSrvInstEncapCapabilities    OBJECT-TYPE
    SYNTAX      BITS
    {
        encapDefault(0),
        encapUntagged(1),
        encapTagged(2),
        encapSvlanId(3),
        encapSvlanIdList(4),
        encapSvlanIdOnlyTagged(5),
        encapSvlanIdCvlanId(6),
        encapSvlanIdCvlanIdList(7),
        encapCvlanId(8),
        encapCvlanIdList(9)
    }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object displays the encapsulation capabilities of service
         instance with respect to certain fields.  The following values may be
         supported:
         encapDefault:       Support for matching packets by the default
                             criteria which matches packets that do not match
                             any other service instance.
         encapUntagged:      Support for matching untagged packets.
         encapTagged:        Support for matching all tagged packets.
         encapSvlanId:       Support for matching packets by an SVLAN ID, and
                             the packets may be untagged if PVID of the port is
                             the SVLAN ID when the encapSvlanIdOnlyTagged field
                             is not set.
         encapSvlanIdList:   Support for matching packets by SVLAN ID list, and
                             the packets may be untagged if PVID of the port is
                             in SVLAN ID list when the encapSvlanIdOnlyTagged
                             field is not set.
         encapSvlanIdOnlyTagged:   Support for matching only tagged packets
                                   by an SVLAN ID or a SVLAN ID list.
         encapSvlanIdCvlanId:      Support for matching packets by an SVLAN ID
                                   and a CVLAN ID.
         encapSvlanIdCvlanIdList:  Support for matching packets by an SVLAN ID
                                   and a CVLAN ID list.
         encapCvlanId:       Support for matching packets by a CVLAN ID.
         encapCvlanIdList:   Support for matching packets by a CVLAN ID list."
    ::= { hpnicfEvcScalarGroup 1 }

hpnicfEvcPortMaxSrvInstNum    OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The max service instance number of a port."
    ::= { hpnicfEvcScalarGroup 2 }

-- =============================================================================
-- hpnicfEvcSrvInstTable Definition
-- =============================================================================
hpnicfEvcSrvInstTable  OBJECT-TYPE
    SYNTAX      SEQUENCE OF HpnicfEvcSrvInstEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table for configuring service instance parameter of the port."
    ::= { hpnicfEvcObjects 2 }

hpnicfEvcSrvInstEntry  OBJECT-TYPE
    SYNTAX      HpnicfEvcSrvInstEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry for configuring service instance parameter of the port."
    INDEX
    {
        ifIndex,
        hpnicfEvcSrvInstId
    }
    ::= { hpnicfEvcSrvInstTable 1 }

HpnicfEvcSrvInstEntry ::=
    SEQUENCE
    {
        hpnicfEvcSrvInstId              Integer32,
        hpnicfEvcSrvInstEncap           INTEGER,
        hpnicfEvcSrvInstSvlanIdListLow  OCTET STRING,
        hpnicfEvcSrvInstSvlanIdListHigh OCTET STRING,
        hpnicfEvcSrvInstRowStatus       RowStatus,
        hpnicfEvcSrvInstEnableInStat    TruthValue,
        hpnicfEvcSrvInstEnableOutStat   TruthValue,
        hpnicfEvcSrvInstCvlanIdListLow  OCTET STRING,
        hpnicfEvcSrvInstCvlanIdListHigh OCTET STRING
    }

hpnicfEvcSrvInstId    OBJECT-TYPE
    SYNTAX      Integer32 (1..2147483647)
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Service instance ID.  Its value ranges from 1 to the value of
        hpnicfEvcPortMaxSrvInstNum."
    ::= { hpnicfEvcSrvInstEntry 1 }

hpnicfEvcSrvInstEncap    OBJECT-TYPE
    SYNTAX      INTEGER
    {
        none(0),
        default(1),
        untagged(2),
        tagged(3),
        svlanIdList(4),
        svlanIdListOnlyTagged(5),
        svlanIdCvlanId(6),
        svlanIdCvlanIdList(7),
        svlanIdCvlanIdAll(8),
        cvlanIdList(9)
    }
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "Encapsulation mode of a service instance.
        none : Invalid value.
        default :    Match packets by the default criteria which matches
                     packets that do not match any other service instance.
                     It is supported when the encapDefault field of
                     hpnicfEvcCapabilities is set.
        untagged :   Match untagged packets.  It is supported when the
                     encapUntagged field of hpnicfEvcCapabilities is set.
        tagged :     Match all tagged packets.  It is supported when the
                     encapTagged field of hpnicfEvcCapabilities is set.
        svlanIdList: Match packets by SVLAN ID list and untagged packets if
                     PVID of the port is in SVLAN ID list, the SVLAN ID list is
                     denoted by hpnicfEvcSrvInstSvlanIdListLow and
                     hpnicfEvcSrvInstSvlanIdListHigh.  It is supported when the
                     encapSvlanId or encapSvlanIdList field of
                     hpnicfEvcCapabilities is set.  Only a VLAN ID is supported
                     when the encapSvlanId field of hpnicfEvcCapabilities is set.
        svlanIdListOnlyTagged: Match only tagged packets by an SVLAN ID list,
                               the SVLAN ID is denoted by
                               hpnicfEvcSrvInstSvlanIdListLow and
                               hpnicfEvcSrvInstSvlanIdListLow.  It is
                               supported when the encapSvlanId (or
                               encapSvlanIdList) and encapSvlanIdOnlyTagged
                               fields of hpnicfEvcCapabilities are set.  Only a
                               VLAN ID is supported when the encapSvlanId and
                               encapSvlanIdOnlyTagged field of
                               hpnicfEvcCapabilities are set.
        svlanIdCvlanId: Match packets by an SVLAN ID and a CVLAN ID.
                        The SVLAN ID is denoted by hpnicfEvcSrvInstSvlanIdListLow
                        or hpnicfEvcSrvInstSvlanIdListHigh.  The CVLAN ID is
                        denoted by hpnicfEvcSrvInstCvlanIdListLow or
                        hpnicfEvcSrvInstCvlanIdListHigh.  It is supported when
                        the encapSvlanIdCvlanId field of
                        hpnicfEvcCapabilities is set.
        svlanIdCvlanIdList: Match packets by an SVLAN ID and a CVLAN ID list.
                            The SVLAN ID is denoted by
                            hpnicfEvcSrvInstSvlanIdListLow or
                            hpnicfEvcSrvInstSvlanIdListHigh.  The CVLAN ID list is
                            denoted by hpnicfEvcSrvInstCvlanIdListLow and
                            hpnicfEvcSrvInstCvlanIdListHigh.  It is supported when
                            the encapSvlanIdCvlanIdList field of
                            hpnicfEvcCapabilities is set.
        svlanIdCvlanIdAll:  Match packets by an SVLAN ID and all CVLAN IDs.
                         The SVLAN ID is denoted by hpnicfEvcSrvInstSvlanIdListLow
                         or hpnicfEvcSrvInstSvlanIdListHigh.  The CVLAN ID
                         includes all VLAN IDs.  It is supported when the
                         encapSvlanIdCvlanIdList field of hpnicfEvcCapabilities
                         is set.
        cvlanIdList:  Match packets by CVLAN ID list.  The CVLAN ID list is
                      denoted by hpnicfEvcSrvInstCvlanIdListLow and
                      hpnicfEvcSrvInstCvlanIdListLow.  It is supported when the
                      encapCvlanId or encapCvlanIdList field of
                      hpnicfEvcCapabilities is set."
    ::= { hpnicfEvcSrvInstEntry 2 }

hpnicfEvcSrvInstSvlanIdListLow OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(0..256))
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object contains the first 2048 bits of the 4096-bit vector,
        indicating which SVLAN IDs are assigned to this service instance.  The
        lowest order bit of the first octet corresponds to SVLAN 1, while the
        highest order bit of the last octet corresponds to SVLAN 2048.  A bit
        that is on (equal to 1) indicates that the corresponding SVLAN ID is
        assigned to this service instance."
    ::= { hpnicfEvcSrvInstEntry 3 }

hpnicfEvcSrvInstSvlanIdListHigh OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(0..256))
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object contains the second 2048 bits of the 4096-bit vector,
        indicating which SVLAN IDs are assigned to this service instance.  The
        lowest order bit of the first octet corresponds to SVLAN 2049, while
        the third highest order bit of the last octet corresponds to SVLAN
        4094.  A bit that is on (equal to 1) indicates that the corresponding
        SVLAN ID is assigned to this service instance."
    ::= { hpnicfEvcSrvInstEntry 4 }

hpnicfEvcSrvInstRowStatus  OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "Operation status of this table entry.  When a row in this
         table is in active state, no objects in that row
         can be modified by the agent."
    ::= { hpnicfEvcSrvInstEntry 5 }

hpnicfEvcSrvInstEnableInStat OBJECT-TYPE
    SYNTAX      TruthValue
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The object is used to configure inbound statistics function
        to this service instance."
    DEFVAL { false }
    ::= { hpnicfEvcSrvInstEntry 6 }

hpnicfEvcSrvInstEnableOutStat OBJECT-TYPE
    SYNTAX      TruthValue
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The object is used to configure outbound statistics function
        to this service instance."
    DEFVAL { false }
    ::= { hpnicfEvcSrvInstEntry 7 }

hpnicfEvcSrvInstCvlanIdListLow OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(0..256))
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object contains the first 2048 bits of the 4096-bit vector,
        indicating which CVLAN IDs are assigned to this service instance.  The
        lowest order bit of the first octet corresponds to CVLAN 1, while the
        highest order bit of the last octet corresponds to CVLAN 2048.  A bit
        that is on (equal to 1) indicates that the corresponding CVLAN ID is
        assigned to this service instance."
    DEFVAL { ''h }
    ::= { hpnicfEvcSrvInstEntry 8 }

hpnicfEvcSrvInstCvlanIdListHigh OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(0..256))
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object contains the second 2048 bits of the 4096-bit vector,
        indicating which CVLAN IDs are assigned to this service instance.  The
        lowest order bit of the first octet corresponds to CVLAN 2049, while
        the third highest order bit of the last octet corresponds to CVLAN
        4094.  A bit that is on (equal to 1) indicates that the corresponding
        CVLAN ID is assigned to this service instance."
    DEFVAL { ''h }
    ::= { hpnicfEvcSrvInstEntry 9 }
-- =============================================================================
-- End of hpnicfEvcSrvInstTable Definition
-- =============================================================================

-- =============================================================================
-- hpnicfEvcSrvInstCarTable Definition
-- =============================================================================
hpnicfEvcSrvInstCarTable  OBJECT-TYPE
    SYNTAX      SEQUENCE OF HpnicfEvcSrvInstCarEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table of configuring CAR for the service instance."
    ::= { hpnicfEvcObjects 3 }

hpnicfEvcSrvInstCarEntry  OBJECT-TYPE
    SYNTAX      HpnicfEvcSrvInstCarEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry in the table containing CAR configuration on
         the service instance.  If the following entries are not supported
         by the service instance, or not configured to the service instance,
         they are zero."
    INDEX
    {
        ifIndex,
        hpnicfEvcSrvInstId
    }
    ::= { hpnicfEvcSrvInstCarTable 1 }

HpnicfEvcSrvInstCarEntry ::=
    SEQUENCE
    {
        hpnicfEvcSrvInstInCarIndex          Integer32,
        hpnicfEvcSrvInstOutCarIndex         Integer32
    }

hpnicfEvcSrvInstInCarIndex OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The object is used to configure inbound CAR function
        to this service instance.
        The CAR index is defined in hpnicfIfQoSAggregativeCarIndex
        at HPN-ICF-IFQOS2-MIB.  The default value is 0."
    ::= { hpnicfEvcSrvInstCarEntry 1 }

hpnicfEvcSrvInstOutCarIndex OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The object is used to configure outbound CAR function
        to this service instance.
        The CAR index is defined in hpnicfIfQoSAggregativeCarIndex
        at HPN-ICF-IFQOS2-MIB.  The default value is 0."
    ::= { hpnicfEvcSrvInstCarEntry 2 }
-- =============================================================================
-- End of hpnicfEvcSrvInstTable Definition
-- =============================================================================

-- =============================================================================
-- hpnicfEvcSrvInstStatInfoTable Definition
-- =============================================================================
hpnicfEvcSrvInstStatInfoTable  OBJECT-TYPE
    SYNTAX      SEQUENCE OF HpnicfEvcSrvInstStatInfoEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table for displaying statistics information of service instance."
    ::= { hpnicfEvcObjects 4 }

hpnicfEvcSrvInstStatInfoEntry  OBJECT-TYPE
    SYNTAX      HpnicfEvcSrvInstStatInfoEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Table entry of the service instance.
         If the statistics function is not supported
         by the service instance, or not configured to the service instance,
         following entries will be zero."
    INDEX
    {
        ifIndex,
        hpnicfEvcSrvInstId
    }
    ::= { hpnicfEvcSrvInstStatInfoTable 1 }

HpnicfEvcSrvInstStatInfoEntry ::=
    SEQUENCE
    {
        hpnicfEvcSrvInstInPackets       Counter64,
        hpnicfEvcSrvInstInBytes         Counter64,
        hpnicfEvcSrvInstOutPackets      Counter64,
        hpnicfEvcSrvInstOutBytes        Counter64
    }

hpnicfEvcSrvInstInPackets    OBJECT-TYPE
    SYNTAX      Counter64
    UNITS       "packets"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Number of inbound packets received on this service instance."
    ::= { hpnicfEvcSrvInstStatInfoEntry 1 }

hpnicfEvcSrvInstInBytes    OBJECT-TYPE
    SYNTAX      Counter64
    UNITS       "bytes"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Byte counts of inbound packets received on this service instance."
    ::= { hpnicfEvcSrvInstStatInfoEntry 2 }

hpnicfEvcSrvInstOutPackets    OBJECT-TYPE
    SYNTAX      Counter64
    UNITS       "packets"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Number of outbound packets transmitted on this service instance."
    ::= { hpnicfEvcSrvInstStatInfoEntry 3 }

hpnicfEvcSrvInstOutBytes    OBJECT-TYPE
    SYNTAX      Counter64
    UNITS       "bytes"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Byte counts of outbound packets transmitted on this service instance."
    ::= { hpnicfEvcSrvInstStatInfoEntry 4 }
-- =============================================================================
-- End of hpnicfEvcSrvInstStatInfoTable Definition
-- =============================================================================

END
