-- *****************************************************************
-- QTECH-SNMP-AGENT-MIB.mib:  Qtech Snmp Agent MIB file
--
-- March 2002, Wuzg
--
-- Copyright (c) 2002 by Qtech Networks Co.,Ltd.
-- All rights reserved.
-- 
-- *****************************************************************
--

QTECH-SNMP-AGENT-MIB DEFINITIONS ::= BEGIN

IMPORTS
        MODULE-IDENTITY,
        OBJECT-TYPE,
        Integer32,
        IpAddress
                FROM SNMPv2-SMI
        DisplayString,
        RowStatus,
        TAddress,
        TEXTUAL-CONVENTION
                FROM SNMPv2-TC
        MODULE-COMPLIANCE,
        OBJECT-GROUP
                FROM SNMPv2-CONF
        QtechTrapType       
                FROM QTECH-TC
        EnabledStatus 
                FROM P-BRIDGE-MIB
        InetAddressType,
        InetAddress
                FROM INET-ADDRESS-MIB
        qtechMgmt
                FROM QTECH-SMI;

qtechSnmpAgentMIB MODULE-IDENTITY
        LAST-UPDATED "200203200000Z"
        ORGANIZATION "Qtech Networks Co.,Ltd."
        CONTACT-INFO
                " 
                Tel: 4008-111-000 

                E-mail: service@qtech.com.cn"
        DESCRIPTION
                "This module defines qtech SNMP agent mibs."
        REVISION      "200203200000Z"
        DESCRIPTION
                "Initial version of this MIB module."
        ::= { qtechMgmt 5}

qtechSnmpAgentMIBObjects OBJECT IDENTIFIER ::= { qtechSnmpAgentMIB 1 }

qtechSnmpCommunityObjects OBJECT IDENTIFIER ::= { qtechSnmpAgentMIBObjects 1 }

qtechSnmpTrapObjects OBJECT IDENTIFIER ::= { qtechSnmpAgentMIBObjects 2 }

qtechSnmpUdpPortObjects OBJECT IDENTIFIER ::= { qtechSnmpAgentMIBObjects 3 }

qtechSnmpNetObjects OBJECT IDENTIFIER ::= {qtechSnmpAgentMIBObjects 4}

Community ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION
        "community string for the implementation, maximum length of 
        community strings limited to 32 octets."
    SYNTAX DisplayString (SIZE (1..32))

--
--  snmp community
--
qtechCommunityMaxNum OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Number of Max of communities which the SNMP Agent support."
        ::= { qtechSnmpCommunityObjects 1 }

qtechCommunityTable OBJECT-TYPE
        SYNTAX SEQUENCE OF QtechCommunityEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "A list of SNMP Community configurations."
        ::= { qtechSnmpCommunityObjects 2 }
        
qtechCommunityEntry OBJECT-TYPE
        SYNTAX QtechCommunityEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "Obtain information of SNMP Community configuration."
        INDEX { qtechCommunityName }
        ::= { qtechCommunityTable 1 }
        
QtechCommunityEntry ::= 
        SEQUENCE {
           qtechCommunityName  Community,
           qtechCommunityWritable INTEGER,
           qtechCommunityUserIpAddr IpAddress,
           qtechCommunityEnableIpAddrAuthen EnabledStatus,
           qtechCommunityStatus RowStatus
        }
        
qtechCommunityName OBJECT-TYPE
        SYNTAX Community
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Community used by this entry.This value is unique for every entry.
            When this string be used as an index,Value of a sub-identifier equal 
            ASCII value of corresponding character(first sub-identifier corresponds
            first character of string). The number of sub-identifiers of this string
            must be 32,If length of string is less than 32 the sub-identifier(0x0) 
            will be filled in tail."
        ::= { qtechCommunityEntry 1 }
    
qtechCommunityWritable OBJECT-TYPE
        SYNTAX INTEGER {
               readonly(1),
               readwrite(2)
        }
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "Authority of this community"
        DEFVAL{ readonly }
        ::= { qtechCommunityEntry 2 }
        
qtechCommunityUserIpAddr OBJECT-TYPE
        SYNTAX IpAddress
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "IP address use for the authentication of a user, if the associated object
             qtechCommunityEnableIpAddrAuthen status is enable(1), the all messages
             send to the agent will be authened by community and this IP address. messages
             that can't pass the authentication will be discarded."
        ::= { qtechCommunityEntry 3 }
        
qtechCommunityEnableIpAddrAuthen OBJECT-TYPE
        SYNTAX EnabledStatus
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "this object offer the means to enable of disable the IP authentications of 
            SNMP message."
        ::= { qtechCommunityEntry 4 }
            
qtechCommunityStatus OBJECT-TYPE
        SYNTAX RowStatus
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "entry status of this entry. and the means in this enviraments can
            reffer to the text-convention definition of the RowStatus."
        ::= { qtechCommunityEntry 5 }

qtechReadCommunityName OBJECT-TYPE
        SYNTAX DisplayString
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "SNMP read community string."
        ::= { qtechSnmpCommunityObjects 3 }

qtechWriteCommunityName OBJECT-TYPE
        SYNTAX DisplayString
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "SNMP write community string."
        ::= { qtechSnmpCommunityObjects 4 }

--
--trap destination table
--
 
qtechTrapDstMaxNumber OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Number of destination address table entries."
        ::= { qtechSnmpTrapObjects 1 }
                        
qtechTrapDstTable OBJECT-TYPE
        SYNTAX SEQUENCE OF QtechTrapDstEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "table of destination hosts that the trap will be sent to."
        ::= { qtechSnmpTrapObjects 2 }
    
qtechTrapDstEntry OBJECT-TYPE
        SYNTAX QtechTrapDstEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "list of hosts."
        INDEX { qtechTrapDstAddr }
        ::= { qtechTrapDstTable 1 }
    
QtechTrapDstEntry ::= 
        SEQUENCE {
           qtechTrapDstAddr IpAddress,
           qtechTrapDstCommunity Community,
           qtechTrapDstSendTrapClass INTEGER,
           qtechTrapDstEntryStatus RowStatus
        }
        
qtechTrapDstAddr OBJECT-TYPE
        SYNTAX IpAddress
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "the destination address of a host the trap will be sent to."
        ::= { qtechTrapDstEntry 1 }
                
qtechTrapDstCommunity OBJECT-TYPE
        SYNTAX Community
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "the destination host's SNMP Client wish to receive the community in
            the trap send by agent."
        DEFVAL { "public" }
        ::= { qtechTrapDstEntry 2 }

qtechTrapDstSendTrapClass OBJECT-TYPE
    SYNTAX      INTEGER {
                    snmpv1-Trap(1), 
                    snmpv2c-Trap(2),
                    snmpv3-trap(3)
                }
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
            "Indicates that the SNMP entity will send which kind of trap 
            SNMPv1-Trap and SNMPv2-Trap"
    DEFVAL { snmpv1-Trap }
    ::= { qtechTrapDstEntry 3 }
        
qtechTrapDstEntryStatus OBJECT-TYPE
        SYNTAX RowStatus
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "entry status of this entry. and the means in this enviraments can
            reffer to the text-convention definition of the RowStatus."
        ::= { qtechTrapDstEntry 4 }


qtechTrapActionTable OBJECT-TYPE
        SYNTAX SEQUENCE OF QtechTrapActionEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "This table of the trap's action."
        ::= { qtechSnmpTrapObjects 3 }

qtechTrapActionEntry OBJECT-TYPE
        SYNTAX QtechTrapActionEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "List of of the trap's action."
        INDEX { qtechTrapType }
        ::= { qtechTrapActionTable 1 }
    
QtechTrapActionEntry ::=
        SEQUENCE {
           qtechTrapType QtechTrapType,
           qtechTrapAction INTEGER
        }
        
qtechTrapType OBJECT-TYPE
        SYNTAX QtechTrapType 
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Trap type identifier, every kind of trap which the system support
             will has one entry in this table."
        ::= { qtechTrapActionEntry 1 }
        
qtechTrapAction OBJECT-TYPE
        SYNTAX INTEGER {
            none(1),       -- do nothing
            sendtrap(2)    -- send trap
        }
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "This value decide how to deal with when this type trap has happened."
        ::= { qtechTrapActionEntry 2 }


qtechTrapControlTable OBJECT-TYPE
        SYNTAX SEQUENCE OF QtechTrapControlEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "This table of the trap's control."
        ::= { qtechSnmpTrapObjects 4 }

qtechTrapControlEntry OBJECT-TYPE
        SYNTAX QtechTrapControlEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "List of of the trap's action."
        INDEX { qtechTrapName }
        ::= { qtechTrapControlTable 1 }

QtechTrapControlEntry ::=
        SEQUENCE {
           qtechTrapName         DisplayString,
           qtechTrapDescr        DisplayString,
           qtechTrapOnOff        INTEGER
        }

qtechTrapName OBJECT-TYPE
        SYNTAX DisplayString(SIZE(1..64)) 
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Trap name identifier, represent by standard trap oid, 
             each kind of trap which the system support will has one entry in this table."
        ::= { qtechTrapControlEntry 1 }

qtechTrapDescr OBJECT-TYPE
        SYNTAX DisplayString(SIZE(1..255)) 
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The description of the trap."
        ::= { qtechTrapControlEntry 2 }

qtechTrapOnOff OBJECT-TYPE
        SYNTAX INTEGER {
            off(0),     
            on(1)
        }
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "This value decide how to deal with when this type trap has happened.
             off(0)  forbid send this trap
             on(1)   allow send this trap 
            "
        ::= { qtechTrapControlEntry 3 }


--
--trap destination information table
--

qtechTrapDesTable OBJECT-TYPE
    SYNTAX SEQUENCE OF QtechTrapDesEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "Table of trap destination hosts information that the trap will be sent to."
    ::= { qtechSnmpTrapObjects 5 }

qtechTrapDesEntry OBJECT-TYPE
    SYNTAX QtechTrapDesEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "List of trap destination hosts."
    INDEX { 
        qtechTrapDesIndex
    }
    ::= { qtechTrapDesTable 1 }

QtechTrapDesEntry ::= 
    SEQUENCE {
        qtechTrapDesIndex         Integer32,
        qtechTrapDesIPAddress     TAddress,
        qtechTrapDesCommunity     Community,
        qtechTrapDesVersion       INTEGER,
        qtechTrapDesStatus        RowStatus
    }

qtechTrapDesIndex OBJECT-TYPE
    SYNTAX Integer32
    MAX-ACCESS read-only           
    STATUS current               
    DESCRIPTION
        "Index of Trap host information"
    ::= { qtechTrapDesEntry 1 }

qtechTrapDesIPAddress OBJECT-TYPE
    SYNTAX TAddress
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "Taddress of Trap hosts."               
    ::= { qtechTrapDesEntry 2 }

qtechTrapDesCommunity OBJECT-TYPE
    SYNTAX Community
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "The destination host's SNMP Client wish to receive the community in the trap send by agent."
    ::= { qtechTrapDesEntry 3 }

qtechTrapDesVersion OBJECT-TYPE
    SYNTAX INTEGER {
        snmpv1-Trap(1), 
        snmpv2c-Trap(2),
        snmpv3-trap(3)
    }
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "Indicates that the SNMP entity will send which kind of trap: SNMPv1-Trap, SNMPv2-Trap, SNMPv3-Trap"
    ::= { qtechTrapDesEntry 4 }

qtechTrapDesStatus OBJECT-TYPE
    SYNTAX RowStatus
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION
        "Entry status of this entry. and the means in this enviraments can
         reffer to the text-convention definition of the RowStatus."
    ::= { qtechTrapDesEntry 5 }


--
-- snmp udp-port information
--

qtechSNMPGetSetPort OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Udp-port of snmp get or set operation."
        ::= { qtechSnmpUdpPortObjects 1 }

qtechSNMPTrapPort OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Udp-port of snmp trap operation."
        ::= { qtechSnmpUdpPortObjects 2 }


--
-- snmp net-id information
--

qtechSysNetID OBJECT-TYPE
       SYNTAX DisplayString
       MAX-ACCESS read-write
       STATUS    current
       DESCRIPTION
           "The system netID tells this network element's information 
            which maybe include province ID,local ID,network element type,network element ID,etc."
       ::= { qtechSnmpNetObjects 1 }

qtechSnmpAgentMIBConformance OBJECT IDENTIFIER ::= { qtechSnmpAgentMIB 2 }
qtechSnmpAgentMIBCompliances OBJECT IDENTIFIER ::= { qtechSnmpAgentMIBConformance 1 }
qtechSnmpAgentMIBGroups      OBJECT IDENTIFIER ::= { qtechSnmpAgentMIBConformance 2 }


-- compliance statements

qtechSnmpAgentMIBCompliance MODULE-COMPLIANCE
        STATUS  current
        DESCRIPTION
                "The compliance statement for entities which implement
                the Qtech SnmpAgent MIB"
        MODULE  -- this module
        MANDATORY-GROUPS { 
           qtechCommunityMIBGroup,
           qtechSnmpTrapMIBGroup,
           qtechSnmpUdpPortMIBGroup
        }
        ::= { qtechSnmpAgentMIBCompliances 1 }

-- units of conformance

qtechCommunityMIBGroup OBJECT-GROUP
        OBJECTS {
           qtechCommunityMaxNum,
           qtechCommunityName,
           qtechCommunityWritable,
           qtechCommunityUserIpAddr,
           qtechCommunityEnableIpAddrAuthen,
           qtechCommunityStatus,
           qtechReadCommunityName,
           qtechWriteCommunityName
        }
        STATUS  current
        DESCRIPTION
                "A collection of objects providing community management to a
                Qtech agent."
        ::= { qtechSnmpAgentMIBGroups 1 }         

qtechSnmpTrapMIBGroup OBJECT-GROUP
        OBJECTS {
           qtechTrapDstSendTrapClass,
           qtechTrapDstMaxNumber,
           qtechTrapDstAddr,
           qtechTrapDstCommunity,
           qtechTrapDstEntryStatus,
           qtechTrapType,
           qtechTrapAction,
           qtechTrapName,
           qtechTrapDescr,
           qtechTrapOnOff,
           qtechTrapDesIndex,
           qtechTrapDesIPAddress,
           qtechTrapDesCommunity,
           qtechTrapDesVersion,
           qtechTrapDesStatus,
           qtechSysNetID
        }
        STATUS  current
        DESCRIPTION
                "A collection of objects providing trap information to a
                Qtech agent."
        ::= { qtechSnmpAgentMIBGroups 2 }                 

qtechSnmpUdpPortMIBGroup OBJECT-GROUP
        OBJECTS {
           qtechSNMPGetSetPort,
           qtechSNMPTrapPort
        }
        STATUS  current
        DESCRIPTION
                "A collection of objects providing udp-port information to a
                Qtech agent."
        ::= { qtechSnmpAgentMIBGroups 3 }  

END
