ELTEX-DNS-MIB DEFINITIONS ::= BEGIN

-- Title:                ELTEX MES-DNS
-- Version:              1.0
-- Date:                 14-Jan-2018

IMPORTS
    MODULE-IDENTITY,
    OBJECT-TYPE,
    Integer32,
    Gauge32,
    Counter32
        FROM SNMPv2-SMI
    TruthValue
        FROM SNMPv2-TC
    InetAddress, InetAddressType
        FROM INET-ADDRESS-MIB
    eltexLtd
        FROM ELTEX-SMI-ACTUAL;

eltexDnsMIB MODULE-IDENTITY
    LAST-UPDATED    "201801140000Z"
    ORGANIZATION    "Eltex Enterprise, Ltd."
    CONTACT-INFO    
        "www.eltex.nsk.ru"
    DESCRIPTION
        "Eltex DNS Resolver implementation."
    REVISION        "201801140000Z"
    DESCRIPTION "Initial revision of ELTEX-DNS-MIB."
    ::= { eltexLtd 46 }


eltexDnsObjects OBJECT IDENTIFIER
    ::= { eltexDnsMIB 1 }

eltexDnsServer OBJECT IDENTIFIER
    ::= { eltexDnsObjects 1 }

eltexDnsClient OBJECT IDENTIFIER
    ::= { eltexDnsObjects 2 }

eltexDnsServerGlobals OBJECT IDENTIFIER
    ::= { eltexDnsServer 1 }

eltexDnsServerCounters OBJECT IDENTIFIER
    ::= { eltexDnsServer 2 }

eltexDnsServerCache OBJECT IDENTIFIER
    ::= { eltexDnsServer 3 }


------------------------
-- DNS Server Globals --
------------------------

eltexDnsServerEnable OBJECT-TYPE
    SYNTAX TruthValue
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "Enable or Disable the DNS server."
    ::= { eltexDnsServerGlobals 1 }

eltexDnsServerClearCache OBJECT-TYPE
    SYNTAX TruthValue
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "This value, when set, clears all entries in the cache."
    ::= { eltexDnsServerGlobals 2 }

eltexDnsServerClearCounters OBJECT-TYPE
    SYNTAX TruthValue
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "This value, when set, clears responses and queries counters."
    ::= { eltexDnsServerGlobals 3 }

--------------------------
-- DNS Server Counters  --
--------------------------

eltexDnsServerQueriesCounter OBJECT-TYPE
    SYNTAX Counter32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Queries counter."
    ::= { eltexDnsServerCounters 1 }

eltexDnsServerPendingQueriesCounter OBJECT-TYPE
    SYNTAX Counter32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Pending queries counter."
    ::= { eltexDnsServerCounters 2 }

eltexDnsServerCacheResponsesCounter OBJECT-TYPE
    SYNTAX Counter32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Responses counter."
    ::= { eltexDnsServerCounters 3 }

eltexDnsServerCacheHitCounter OBJECT-TYPE
    SYNTAX Counter32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Cache hit counter."
    ::= { eltexDnsServerCounters 4 }

----------------------
-- DNS Server Cache --
----------------------

------------------------
-- DNS Server Queries --
------------------------

eltexDnsServerQueryTable OBJECT-TYPE
    SYNTAX SEQUENCE OF EltexDnsServerQueryEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "The domain names table."
    ::= { eltexDnsServerCache 1 }

eltexDnsServerQueryEntry OBJECT-TYPE
    SYNTAX EltexDnsServerQueryEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "The domain name entry."
    INDEX    { eltexDnsServerQueryQuestion,
               eltexDnsServerQueryType }
    ::= { eltexDnsServerQueryTable 1 }

EltexDnsServerQueryEntry ::= SEQUENCE {
        eltexDnsServerQueryQuestion                 OCTET STRING,
        eltexDnsServerQueryType                     Integer32,
        eltexDnsServerQueryRemainingTTL             INTEGER,
        eltexDnsServerQuerySourceInetAddressType    InetAddressType,
        eltexDnsServerQuerySourceInetAddress        InetAddress
}

eltexDnsServerQueryQuestion OBJECT-TYPE
    SYNTAX OCTET STRING
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "Query question."
    ::= { eltexDnsServerQueryEntry 1 }

eltexDnsServerQueryType OBJECT-TYPE
    SYNTAX Integer32 (0..65535)
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "Query type."
    ::= { eltexDnsServerQueryEntry 2 }

eltexDnsServerQueryRemainingTTL OBJECT-TYPE
    SYNTAX INTEGER
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Remaining time to live in seconds. When remaining TTL reaches 0, then the record will be considered obsolete."
    ::= { eltexDnsServerQueryEntry 3 }

eltexDnsServerQuerySourceInetAddressType OBJECT-TYPE
    SYNTAX InetAddressType
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The address type of the server."
    ::= { eltexDnsServerQueryEntry 4 }

eltexDnsServerQuerySourceInetAddress OBJECT-TYPE
    SYNTAX InetAddress
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The IP address of the server."
    ::= { eltexDnsServerQueryEntry 5 }

----------------------------------
-- DNS Server Answers to Query  --
----------------------------------


eltexDnsServerAnswerTable OBJECT-TYPE
    SYNTAX SEQUENCE OF EltexDnsServerAnswerEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "RR answers table."
    ::= { eltexDnsServerCache 2 }

eltexDnsServerAnswerEntry OBJECT-TYPE
    SYNTAX EltexDnsServerAnswerEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "Answer entry."
    INDEX    { eltexDnsServerQueryQuestion,
               eltexDnsServerQueryType,
               eltexDnsServerAnswer }
    ::= { eltexDnsServerAnswerTable 1 }

EltexDnsServerAnswerEntry ::= SEQUENCE {
        eltexDnsServerAnswer               OCTET STRING,
        eltexDnsServerAnswerType           Integer32,
        eltexDnsServerAnswerTTL            INTEGER
}

eltexDnsServerAnswer OBJECT-TYPE
    SYNTAX OCTET STRING
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "RR answer."
    ::= { eltexDnsServerAnswerEntry 1 }

eltexDnsServerAnswerType OBJECT-TYPE
    SYNTAX Integer32 (0..65535)
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Answer type."
    ::= { eltexDnsServerAnswerEntry 2 }

eltexDnsServerAnswerTTL OBJECT-TYPE
    SYNTAX INTEGER
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Time to live."
    ::= { eltexDnsServerAnswerEntry 3 }

END
