ELTEX-MES-SWITCH-RATE-LIMITER-MIB DEFINITIONS ::= BEGIN

-- Title:      ELTEX MES Switch Rate Limiter Private
-- Version:    2.1
-- Date:       10 Jul 2017

IMPORTS
    MODULE-IDENTITY,
    OBJECT-TYPE,
    Integer32,
    Gauge32,
    Counter32
        FROM SNMPv2-SMI
    eltMesSwitchRateLimiterMIB
        FROM ELTEX-MES-MNG-MIB
    InterfaceIndex
        FROM IF-MIB
    RowStatus
        FROM SNMPv2-TC;

eltMesSwitchRateLimiterObjects OBJECT IDENTIFIER
    ::= { eltMesSwitchRateLimiterMIB 1 }

eltMesCpuRateLimiterNotifications OBJECT IDENTIFIER 
	::= { eltMesSwitchRateLimiterObjects 0 }    

eltMesSwitchRateLimiterConfig OBJECT IDENTIFIER
    ::= { eltMesSwitchRateLimiterObjects 1 }

eltMesSwitchRateLimiterStatistics OBJECT IDENTIFIER
    ::= { eltMesSwitchRateLimiterObjects 2 }

------------------------
-- Textual Convetions --
------------------------

EltCpuRateLimiterTrafficType ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION    "Traffic types for rate limiting on CPU."
    SYNTAX INTEGER {
        http                  (1),
        telnet                (2),
        ssh                   (3),
        snmp                  (4),
        ip                    (5),
        linkLocal             (6),
        arp                   (7),
        arpInspec             (8),
        stpBpdu               (9),
        otherBpdu            (10),
        ipRouting            (11),
        ipOptions            (12),
        dhcpSnoop            (13),
        igmpSnoop            (14),
        mldSnoop             (15),
        sflow                (16),
        ace                  (17),
        ipErrors             (18),
        other                (19),
        dhcpv6Snoop          (20),
        vrrp                 (21),
        mcRouting            (22),
        mcRpfFailed          (23),
        tcpSyn               (24)
}

EltCpuRateStatisticsTrafficType ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION    "Traffic types for input rates on CPU."
    SYNTAX INTEGER {
        stack                 (1),
        http                  (2),
        telnet                (3),
        ssh                   (4),
        snmp                  (5),
        ip                    (6),
        arp                   (7),
        arpInspec             (8),
        stp                   (9),
        ieee                 (10),
        routeUnknown         (11),
        ipHopByHop           (12),
        mtuExceeded          (13),
        ipv4Multicast        (14),
        ipv6Multicast        (15),
        dhcpSnooping         (16),
        igmpSnooping         (17),
        mldSnooping          (18),
        ttlExceeded          (19),
        ipv4IllegalAddress   (20),
        ipv4HeaderError      (21),
        ipDaMismatch         (22),
        sflow                (23),
        logDenyAces          (24),
        dhcpv6Snooping       (25),
        vrrp                 (26),
        logPermitAces        (27),
        ipv6HeaderError      (28),
        mcRouting            (29),
        mcRpfFailed          (30),
        tcpSyn               (31),
        vpc                  (32)
}

EltCpuRateStatisticsIfTrafficType ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION    "Traffic types for input rates from interface to CPU."
    SYNTAX INTEGER {
        all                   (100)
}

----------------------------
-- CPU Rate Limiter Table --
----------------------------

eltCpuRateLimiterTable OBJECT-TYPE
    SYNTAX          SEQUENCE OF EltCpuRateLimiterEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION     "A list of CPU rate limiters."
    ::= { eltMesSwitchRateLimiterConfig 1 }

eltCpuRateLimiterEntry OBJECT-TYPE
    SYNTAX          EltCpuRateLimiterEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION     "An entry containing the custom CPU
                    rate limiter information for specific
                    traffic type."
    INDEX           { eltCpuRateLimiterIndex }
    ::= { eltCpuRateLimiterTable 1 }

EltCpuRateLimiterEntry ::= SEQUENCE {
        eltCpuRateLimiterIndex          	EltCpuRateLimiterTrafficType,
        eltCpuRateLimiterValue       		Integer32,
        eltCpuRateDefaultLimiterValue       Integer32,
        eltCpuRateLimiterStatus             RowStatus
}

eltCpuRateLimiterIndex OBJECT-TYPE
    SYNTAX          EltCpuRateLimiterTrafficType
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION     "Traffic type"
    ::= { eltCpuRateLimiterEntry 1 }

eltCpuRateLimiterValue OBJECT-TYPE
    SYNTAX          Integer32 (0..65535)
    MAX-ACCESS      read-write
    STATUS          current
    DESCRIPTION     "Value of rate-limiter"
    ::= { eltCpuRateLimiterEntry 2 }
    
eltCpuRateDefaultLimiterValue OBJECT-TYPE
    SYNTAX          Integer32 (0..65535)
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION     "Default value of rate-limiter"
    ::= { eltCpuRateLimiterEntry 3 }    
    
eltCpuRateLimiterStatus OBJECT-TYPE
    SYNTAX          RowStatus
    MAX-ACCESS      read-write
    STATUS          current
    DESCRIPTION
       "The status of a table entry.
        Only three statuses are aceptable: CreateAndGo to create,
        Active to update, Destroy to delete. All other values cause error."
    ::= { eltCpuRateLimiterEntry 4 }

-------------------------------
-- CPU Rate Statistics Table --
-------------------------------

eltCpuRateStatisticsTable OBJECT-TYPE
    SYNTAX          SEQUENCE OF EltCpuRateStatisticsEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION     "A list of CPU input rates per traffic type."
    ::= { eltMesSwitchRateLimiterStatistics 1 }

eltCpuRateStatisticsEntry OBJECT-TYPE
    SYNTAX          EltCpuRateStatisticsEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION     "An entry containing the CPU input rates
                    for specific traffic type."
    INDEX           { eltCpuRateStatisticsIndex }
    ::= { eltCpuRateStatisticsTable 1 }

EltCpuRateStatisticsEntry ::= SEQUENCE {
        eltCpuRateStatisticsIndex       EltCpuRateStatisticsTrafficType,
        eltCpuRateStatisticsRate        Gauge32,
        eltCpuRateStatisticsCounter     Counter32
}

eltCpuRateStatisticsIndex OBJECT-TYPE
    SYNTAX          EltCpuRateStatisticsTrafficType
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION     "Traffic type"
    ::= { eltCpuRateStatisticsEntry 1 }

eltCpuRateStatisticsRate OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION     "Input rate in packets per second."
    ::= { eltCpuRateStatisticsEntry 2 }

eltCpuRateStatisticsCounter OBJECT-TYPE
    SYNTAX          Counter32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION     "Total counter of packets."
    ::= { eltCpuRateStatisticsEntry 3 }

---------------------------------------------------
--      CPU Rate Statistics Interface Table      --
---------------------------------------------------

eltCpuRateStatisticsIfTable OBJECT-TYPE
    SYNTAX          SEQUENCE OF EltCpuRateStatisticsIfEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION     "A list of CPU input rates per traffic type."
    ::= { eltMesSwitchRateLimiterStatistics 2 }

eltCpuRateStatisticsIfEntry OBJECT-TYPE
    SYNTAX          EltCpuRateStatisticsIfEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION     "An entry containing the CPU input rates
                    for specific traffic type."
    INDEX           { eltCpuRateStatisticsIfIndex,
                      eltCpuRateStatisticsIfTrafficType }
    ::= { eltCpuRateStatisticsIfTable 1 }

EltCpuRateStatisticsIfEntry ::= SEQUENCE {
        eltCpuRateStatisticsIfIndex             InterfaceIndex,
        eltCpuRateStatisticsIfTrafficType       EltCpuRateStatisticsIfTrafficType,
        eltCpuRateStatisticsIfRate              Gauge32,
        eltCpuRateStatisticsIfCounter           Counter32
}

eltCpuRateStatisticsIfIndex OBJECT-TYPE
    SYNTAX          InterfaceIndex
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION     "Incoming interface."
    ::= { eltCpuRateStatisticsIfEntry 1 }

eltCpuRateStatisticsIfTrafficType OBJECT-TYPE
    SYNTAX          EltCpuRateStatisticsIfTrafficType
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION     "Traffic type."
    ::= { eltCpuRateStatisticsIfEntry 2 }

eltCpuRateStatisticsIfRate OBJECT-TYPE
    SYNTAX          Gauge32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION     "Input rate in packets per second."
    ::= { eltCpuRateStatisticsIfEntry 3 }

eltCpuRateStatisticsIfCounter OBJECT-TYPE
    SYNTAX          Counter32
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION     "Total counter of packets."
    ::= { eltCpuRateStatisticsIfEntry 4 }

--
-- Notifications
--

eltCpuRateLimiterTrap NOTIFICATION-TYPE
    OBJECTS   {eltCpuRateLimiterIndex, eltCpuRateLimiterValue}
    STATUS    current
    DESCRIPTION
        "A eltCpuRateLimiterTrap is generated when
         exceeded threshold value of CPU input rate."
    ::= { eltMesCpuRateLimiterNotifications 1 }

END
