-- ====================================================================
-- Copyright (c) 2011 by Qtech Networks Co.,Ltd. All rights reserved.
--
-- Description: The MIB is designed to trap L2TP tunnel create or destroy information.
-- Reference: rujie Enterprise MIB
-- =====================================================================
QTECH-L2TP-MIB DEFINITIONS ::= BEGIN

    IMPORTS
        DisplayString,TEXTUAL-CONVENTION, TimeStamp
            FROM SNMPv2-TC
        IpAddress, Integer32, Counter32, Counter64, OBJECT-TYPE,
        MODULE-IDENTITY, Gauge32, NOTIFICATION-TYPE, Unsigned32
            FROM SNMPv2-SMI
        MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
            FROM SNMPv2-CONF
        qtechMgmt
            FROM QTECH-SMI;

    qtechVPDNMIB MODULE-IDENTITY
        LAST-UPDATED "201102170000Z"            
        ORGANIZATION
            "Qtech Networks Co.,Ltd."
        CONTACT-INFO
            "Tel: 4008-111-000 
             E-mail: service@qtech.com.cn"  
        DESCRIPTION
            "The MIB is designed to get statistic information of
             vpdn tunnels. With this MIB, we can get information of a certain
             tunnel or all tunnels."
        REVISION      "201102170000Z"
        DESCRIPTION
                "Initial version of this MIB module."
        ::= { qtechMgmt 112 }       
        
      qtechL2TPSessionObjects OBJECT IDENTIFIER ::= {qtechVPDNMIB 1}
      qtechVPDNMonitor OBJECT IDENTIFIER ::= {qtechVPDNMIB 2}
 -- ===============================================
-- definition of table.
-- ===============================================
		qtechL2TPSessionTable OBJECT-TYPE
			SYNTAX SEQUENCE OF QtechL2TPSessionEntry
			MAX-ACCESS not-accessible
			STATUS current
			DESCRIPTION
				"The l2tp session Table. There is one
				entry in this table for each active l2tp Session."
			::= { qtechL2TPSessionObjects 1 }

		
		qtechL2TPSessionEntry OBJECT-TYPE
			SYNTAX QtechL2TPSessionEntry
			MAX-ACCESS not-accessible
			STATUS current
			DESCRIPTION
				"Information about qtechL2TPSessionTable."
			INDEX { l2tpPrivateSessionIfIndex }
			::= { qtechL2TPSessionTable 1 }
                  
		QtechL2TPSessionEntry ::=
			SEQUENCE {  
			    l2tpPrivateSessionIfIndex
					Integer32,
				l2tpPrivateLocalTunnelID
					Integer32,
				l2tpPrivateSessionLocalIpAdd
					IpAddress,
				l2tpPrivateSessionRemoteIpAdd
					IpAddress,
				l2tpPrivateSessionVrfId
					Integer32,
				l2tpPrivateSessionExistTime
					Integer32,
				l2tpPrivateSessionStatus
					INTEGER
			 }
        l2tpPrivateSessionIfIndex OBJECT-TYPE
			SYNTAX Integer32 (1..2147483647)
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"The session va index."
			::= { qtechL2TPSessionEntry 1 } 
        
		l2tpPrivateLocalTunnelID OBJECT-TYPE
			SYNTAX Integer32 (1..2147483647)
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"The tunnel ID index."
			::= { qtechL2TPSessionEntry 2 }

		l2tpPrivateSessionLocalIpAdd OBJECT-TYPE
			SYNTAX IpAddress
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"The tunnel other side IP."
			::= { qtechL2TPSessionEntry 3 }
					
	    l2tpPrivateSessionRemoteIpAdd OBJECT-TYPE
			SYNTAX IpAddress
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"The tunnel other side IP."
			::= { qtechL2TPSessionEntry 4 }
			
	    l2tpPrivateSessionVrfId OBJECT-TYPE
			SYNTAX Integer32 (1..2147483647)
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"The tunnel Session index."
			::= { qtechL2TPSessionEntry 5 } 
			
	    l2tpPrivateSessionExistTime OBJECT-TYPE
			SYNTAX Integer32 (1..2147483647)
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"The tunnel Session index."
			::= { qtechL2TPSessionEntry 6 }  

            -- 1.3.6.1.4.1.27514.1.1.10.2.112.1.1.1.7
            l2tpPrivateSessionStatus OBJECT-TYPE
                        SYNTAX	INTEGER {
                            sessionIdle(1),
                            sessionConnecting(2),
                            sessionEstablished(3),
                            sessionDisconnecting(4)
                        }
			MAX-ACCESS read-write
			STATUS current
			DESCRIPTION
				"Description."
			::= { qtechL2TPSessionEntry 7 }

		
-- ===============================================
-- definition of traps.
-- ===============================================
    qtechVPDNMonitorTRAP OBJECT IDENTIFIER ::= { qtechVPDNMonitor 1 }
    qtechVPDNNotifications OBJECT IDENTIFIER ::= { qtechVPDNMonitorTRAP 1 }

    qtechVPDNStart NOTIFICATION-TYPE
        OBJECTS { 
                  l2tpPrivateSessionIfIndex, 
                  l2tpPrivateLocalTunnelID,
                  l2tpPrivateSessionLocalIpAdd,   
                  l2tpPrivateSessionRemoteIpAdd,   
                  l2tpPrivateSessionVrfId,   
                  l2tpPrivateSessionExistTime
               }
        STATUS     current
        DESCRIPTION
            "This notification is generated when an VPDN is created."
        ::= { qtechVPDNNotifications 1 } 
        
    qtechVPDNStop NOTIFICATION-TYPE
        OBJECTS { 
                  l2tpPrivateSessionIfIndex, 
                  l2tpPrivateLocalTunnelID,
                  l2tpPrivateSessionLocalIpAdd,       		     
                  l2tpPrivateSessionRemoteIpAdd,   
                  l2tpPrivateSessionVrfId,   
                  l2tpPrivateSessionExistTime
               }
        STATUS     current
        DESCRIPTION
            "This notification is generated when an VPDN is destroy."
        ::= { qtechVPDNNotifications 2 }

END   



