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

QTECH-FILE-MIB DEFINITIONS ::= BEGIN

IMPORTS
        MODULE-IDENTITY,
        OBJECT-TYPE,
        IpAddress,
        Gauge32,
        Integer32
                FROM SNMPv2-SMI
        TruthValue,
        DisplayString,
        RowStatus
                FROM SNMPv2-TC
        MODULE-COMPLIANCE,
        OBJECT-GROUP
                FROM SNMPv2-CONF
        qtechMgmt
                FROM QTECH-SMI;

qtechFileMIB 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 file mibs."
        REVISION      "200203200000Z"
        DESCRIPTION
                "Initial version of this MIB module."
        ::= { qtechMgmt 11}

qtechFileMIBObjects OBJECT IDENTIFIER ::= { qtechFileMIB 1 }

qtechFileTransTable OBJECT-TYPE
        SYNTAX SEQUENCE OF QtechFileTransEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "list of file transfer parameters."
        ::= { qtechFileMIBObjects 1 }
        
qtechFileTransEntry OBJECT-TYPE
        SYNTAX QtechFileTransEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "Entry of file transfer parameters."
        INDEX { qtechFileTransIndex }
        ::= { qtechFileTransTable 1 }
    
QtechFileTransEntry ::=
        SEQUENCE {
        qtechFileTransIndex Integer32,
        qtechFileTransMeans    INTEGER,
        qtechFileTransOperType INTEGER,
        qtechFileTransSrcFileName DisplayString,
        qtechFileTransDescFileName DisplayString,
        qtechFileTransServerAddr IpAddress,
        qtechFileTransResult INTEGER,
        qtechFileTransComplete TruthValue,
        qtechFileTransDataLength Gauge32,
        qtechFileTransEntryStatus RowStatus,
        qtechFileTransServerAddr6 OCTET STRING,
        qtechFileTransUserName DisplayString,
        qtechFileTransPassWord DisplayString,
        qtechFileTransFailedReason DisplayString,
        qtechFileTransFileType INTEGER,
        qtechFileTransServerPort Integer32,
        qtechFileTransPortType  INTEGER
        }
    
qtechFileTransIndex OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "A value unique idenify the entry in the file transfer table.
            the index is assigned by agent random."
        ::= { qtechFileTransEntry 1 }
    
qtechFileTransMeans     OBJECT-TYPE
        SYNTAX     INTEGER{
                 tftp(1),
                 xmodem(2),
                 other(3)
        }
        MAX-ACCESS read-create
        STATUS     current
        DESCRIPTION
                "The way to be used for any copy. Transport file by xmodem work in 
                 only in outband.other(3) mean transfer file by a way other than tftp(1) 
                 and xmodem(2)"
        DEFVAL  { tftp }
        ::= { qtechFileTransEntry 2 }
    
qtechFileTransOperType OBJECT-TYPE
        SYNTAX INTEGER {
            upload(1),      -- upload a file to the board
            download(2),    -- download file frome the board
            synchronize(3)  -- synchronize file 
        }
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "This object can be used for specifying the file transfer
            operation type, upload or download. using tftp service 
            file transfer can implemente between the station and agent.
            in current agent,if synchronizing file,this object has no weight."
        ::= { qtechFileTransEntry 3 }
    
qtechFileTransSrcFileName OBJECT-TYPE
        SYNTAX DisplayString
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "This object tell the tftp client to know the file name
            required to be received in tftp transfer mode;and send the file name list 
            which separate with '\t' to synchronizing server."
        ::= { qtechFileTransEntry 4 }
        
qtechFileTransDescFileName OBJECT-TYPE
        SYNTAX DisplayString
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "File name the file will save as. The object has no weight to file synchronizing."
        ::= { qtechFileTransEntry 5 }        
    
qtechFileTransServerAddr OBJECT-TYPE
        SYNTAX IpAddress
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "This object tell the address of transfer destination
            when required for file transmittion. "
        ::= { qtechFileTransEntry 6 }
    
qtechFileTransResult OBJECT-TYPE
        SYNTAX INTEGER {
            success(1),
            failure(2),
            parametersIllegel(3),
            timeout(4)
        }
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "While the status of this entry is completed, this field of this
            entry is valid, and carry the operation result of file transfer."
        ::= { qtechFileTransEntry 7 }
        
qtechFileTransComplete OBJECT-TYPE
        SYNTAX TruthValue
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "while the file transfer of use parameters stored by this entry is
            completed the value of this field will be true(1), and if not completed
            false(2)."
        ::= { qtechFileTransEntry 8 }

qtechFileTransDataLength OBJECT-TYPE
        SYNTAX Gauge32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "the file length transferred, after the transfer is complete, this
            value is come to valid -- the valude of field qtechFileTransComplete
            is true(1)."
        ::= { qtechFileTransEntry 9 }
    
qtechFileTransEntryStatus 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."
        ::= { qtechFileTransEntry 10 }

qtechFileTransServerAddr6 OBJECT-TYPE
        SYNTAX OCTET STRING (SIZE (16))
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "This object tell the ipv6 address of transfer destination
            when required for file transmittion. "
        ::= { qtechFileTransEntry 11 }

qtechFileTransUserName OBJECT-TYPE
        SYNTAX DisplayString
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "UserName"
        ::= { qtechFileTransEntry 12 }

qtechFileTransPassWord OBJECT-TYPE
        SYNTAX DisplayString
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "password"
        ::= { qtechFileTransEntry 13 }

qtechFileTransFailedReason OBJECT-TYPE
        SYNTAX DisplayString
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "while upgrade failed, this fill tell the user why is failed"
        ::= { qtechFileTransEntry 14 }

qtechFileTransFileType OBJECT-TYPE
        SYNTAX INTEGER {
            software-version-file(1),
            config-file(2),
            log-file(3)
        }
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "FileType
             1 software-version-file,
             2 config-file
             3 log-file "
        ::= { qtechFileTransEntry 15 }

qtechFileTransServerPort OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "This object tell the port of transfer destination
             when required for file transmittion."
        ::= { qtechFileTransEntry 16 }
        
qtechFileTransPortType	OBJECT-TYPE
        SYNTAX INTEGER{
                       byInterfacePort(1), --transfer files by Interface Port.	
                       byMgmtPort(2)     --transfer files by MGMT Port.			
                      }
        MAX-ACCESS read-write
        STATUS 	   current
        DESCRIPTION
              "This object tell the port type of transfer destination
                when required for file transmittion."
        ::= { qtechFileTransEntry 17 }
			  
--=========================================
-- end qtechFileTransTable 
--=========================================

qtechFileSystemMaxRoom OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "the max room of file system in units of MB."
        ::= { qtechFileMIBObjects 2 }

qtechFileSystemAvailableRoom OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "the available room of file system in units of MB."
        ::= { qtechFileMIBObjects 3 }


-- traps define here
qtechFileMIBTraps       OBJECT IDENTIFIER ::= { qtechFileMIB 0 }

qtechFileSystemUpdateFailTrap  NOTIFICATION-TYPE
        OBJECTS   {qtechFileTransFailedReason}
        STATUS current
        DESCRIPTION
   	    "This trap is generated when the software update failed."
        ::= { qtechFileMIBTraps 1 }


-- conformance information

qtechFileMIBConformance OBJECT IDENTIFIER ::= { qtechFileMIB 2 }
qtechFileMIBCompliances OBJECT IDENTIFIER ::= { qtechFileMIBConformance 1 }
qtechFileMIBGroups      OBJECT IDENTIFIER ::= { qtechFileMIBConformance 2 }


-- compliance statements

qtechFileMIBCompliance MODULE-COMPLIANCE
        STATUS  current
        DESCRIPTION
                "The compliance statement for entities which implement
                the Qtech File MIB"
        MODULE  -- this module
                MANDATORY-GROUPS { qtechFileMIBGroup }
                GROUP       qtechFileTransMeansMIBGroup
                DESCRIPTION
                     "This group is mandatory only for those system which support
                     other transport protocal but tftp."   
        ::= { qtechFileMIBCompliances 1 }
        
        
-- units of conformance

qtechFileMIBGroup OBJECT-GROUP
        OBJECTS {
                qtechFileTransIndex,
                qtechFileTransOperType,
                qtechFileTransSrcFileName,
                qtechFileTransDescFileName,
                qtechFileTransServerAddr,
                qtechFileTransResult,
                qtechFileTransComplete,
                qtechFileTransDataLength,
                qtechFileTransEntryStatus,
                qtechFileTransServerAddr6,
                qtechFileTransUserName,
                qtechFileTransPassWord,
                qtechFileTransFailedReason,
                qtechFileTransFileType,
                qtechFileTransServerPort,
                qtechFileTransPortType,
                qtechFileSystemMaxRoom,
                qtechFileSystemAvailableRoom
        }
        STATUS  current
        DESCRIPTION
                "A collection of objects providing file ability to a
                Qtech agent."
        ::= { qtechFileMIBGroups 1 }      
        
qtechFileTransMeansMIBGroup OBJECT-GROUP
        OBJECTS {
            qtechFileTransMeans
        }
        STATUS  current
        DESCRIPTION
                "A collection of objects providing qtechFileTransMeans to a
                Qtech agent."
        ::= { qtechFileMIBGroups 2 }            
        
END
