  TPLINK-QOS-MIB DEFINITIONS ::= BEGIN

       IMPORTS
          OBJECT-TYPE,MODULE-IDENTITY
        	  	         	FROM SNMPv2-SMI
		  DisplayString 
      						FROM SNMPv2-TC  							
		  ifIndex
							FROM RFC1213-MIB							
		  tplinkMgmt
							FROM TPLINK-MIB;
							
	tplinkQosMIB MODULE-IDENTITY
		LAST-UPDATED    "201212130930Z"
		ORGANIZATION    "TPLINK"
		CONTACT-INFO    "www.tplink.com.cn"
		DESCRIPTION	    "Private MIB for system time configuration."
		REVISION        "201212130930Z"
		DESCRIPTION
				"Initial version of this MIB module."
		::= { tplinkMgmt 22 }
		
	tplinkQosMIBObjects		OBJECT IDENTIFIER	::= { tplinkQosMIB 1 }
	tplinkQosNotifications	OBJECT IDENTIFIER	::= { tplinkQosMIB 2 }
	
		tplinkQosBasicConfig  		OBJECT IDENTIFIER ::= {tplinkQosMIBObjects 1}
        tplinkQosScheduler  		OBJECT IDENTIFIER ::= {tplinkQosMIBObjects 2}
  		tplinkQos8021p				OBJECT IDENTIFIER ::= {tplinkQosMIBObjects 3}
  		tplinkQosDSCP				OBJECT IDENTIFIER ::= {tplinkQosMIBObjects 4}
  			           
        -- the qos basic config
              
         tpQosBasicConfigTable OBJECT-TYPE
            SYNTAX  SEQUENCE OF TpQosBasicConfigEntry
            MAX-ACCESS  not-accessible
            STATUS  current
            DESCRIPTION
                    "A list of qos basic config entries. Here you can configure the port priority."
            ::= { tplinkQosBasicConfig 1 }

        tpQosBasicConfigEntry OBJECT-TYPE
            SYNTAX  TpQosBasicConfigEntry
            MAX-ACCESS  not-accessible
            STATUS  current
            DESCRIPTION
                    "An entry contains of the information of qos basic config."
            INDEX   { ifIndex }
            ::= { tpQosBasicConfigTable 1 }
    
        TpQosBasicConfigEntry ::=
            SEQUENCE {
								tpQosBasicConfigPort
										DisplayString, 
								tpQosBasicConfigPri
										INTEGER,
								tpQosBasicConfigLag
										OCTET STRING (SIZE (1..255))
										
            }
            
        tpQosBasicConfigPort OBJECT-TYPE
            SYNTAX  DisplayString  
            MAX-ACCESS  read-only
            STATUS  current
            DESCRIPTION
                    "The physical port number of the switch. "
            ::= { tpQosBasicConfigEntry 1 }
        
        tpQosBasicConfigPri OBJECT-TYPE
            SYNTAX  INTEGER{
	      		cos0(0), 						
	      		cos1(1),
	      		cos2(2),
	      		cos3(3),
	      		cos4(4),
	      		cos5(5),
	      		cos6(6),		
	      		cos7(7)					
	      		}
            MAX-ACCESS  read-write
            STATUS  current
            DESCRIPTION
                    "0. Cos0
                     1. Cos1
                     2. Cos2
                     3. Cos3
                     4. Cos4
                     5. Cos5
                     6. Cos6
                     7. Cos7
                     Specify the priority for the port."
            ::= { tpQosBasicConfigEntry 2 }
       
      tpQosBasicConfigLag OBJECT-TYPE
            SYNTAX  OCTET STRING (SIZE (1..255))  
            MAX-ACCESS  read-only
            STATUS  current
            DESCRIPTION
                    "The LAG number which the port belongs to. "
            ::= { tpQosBasicConfigEntry 3 }
         
        tpQosSchedulerConfig OBJECT-TYPE
	          SYNTAX  INTEGER{
	      		sp-mode(0), 						
	      		wrr-mode(1),
	      		sp-wrr-mode(2),
	      		equ-mode(3)						
	      		}
	            MAX-ACCESS  read-write
	            STATUS  current
	            DESCRIPTION
	                    "Here you can select the schedule mode for the switch.
	                     0. SP-Mode: Strict-Priority Mode. 
	                        In this mode, the queue with higher priority will occupy the whole bandwidth. 
	                        Packets in the queue with lower priority are sent only when the queue with 
	                        higher priority is empty.  
	                     1. WRR-Mode: Weight Round Robin Mode. 
	                        In this mode, packets in all the queues are sent in order based on the weight 
	                        value for each queue. 
							You can also config the TC queues' weight with values 1-127. 
	                     2. SP+WRR-Mode: Strict-Priority + Weight Round Robin Mode. 
	                        In this mode, this switch provides two scheduling groups, SP group and WRR group. 
	                        Queues in SP group and WRR group are scheduled strictly based on strict-priority mode 
	                        while the queues inside WRR group follow the WRR mode. 
	                        In SP+WRR mode, the largest TC queue is in the SP group and the others belong to the WRR group and 
							You can also config the TC queues' weight with values 0-127, value 0 means this TC queue is in SP group.
	                        In this way, when scheduling queues, the switch allows TC queues in SP group to occupy the whole bandwidth 
	                        following the SP mode and the other TC queues in the WRR group will take up the bandwidth according to their ratio. 
	                     3. Equ-Mode: Equal-Mode. 
	                        In this mode, all the queues occupy the bandwidth equally."
	            ::= { tplinkQosScheduler 1 }
	            
  			-- the qos 8021p config
						
        tpQosSchedulerWeightTable OBJECT-TYPE
			SYNTAX SEQUENCE OF TpQosSchedulerWeightEntry
            MAX-ACCESS  not-accessible
            STATUS  current
            DESCRIPTION
                    "A table of the information of qos scheduler queue weight."
            ::= { tplinkQosScheduler 2 }
			
		tpQosSchedulerWeightEntry OBJECT-TYPE
			SYNTAX TpQosSchedulerWeightEntry
			MAX-ACCESS not-accessible
			STATUS current
			DESCRIPTION
					"An entry contains of the information of qos scheduler queue weight config."
			INDEX   { tpQosSchedulerTc }
			::= { tpQosSchedulerWeightTable 1 }
	
	    TpQosSchedulerWeightEntry ::=
            SEQUENCE {
				tpQosSchedulerTc
							INTEGER,
				tpQosSchedulerWeight
							INTEGER
            }

		tpQosSchedulerTc OBJECT-TYPE
            SYNTAX  INTEGER{
            			tc0(0),
            			tc1(1),
            			tc2(2),
            			tc3(3),
						tc4(4),
						tc5(5),
						tc6(6),
						tc7(7)
            }
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
                    "Indicates the priority level the packets go egress. 
                     The priority levels are labeled as TC."
			::= { tpQosSchedulerWeightEntry 1 }
			
		tpQosSchedulerWeight OBJECT-TYPE
			SYNTAX  INTEGER(0..127)
			MAX-ACCESS read-write
			STATUS current
			DESCRIPTION
					"Indecates the egress queue weight value.
					 The value ranges from 0 to 127."
			::= { tpQosSchedulerWeightEntry 2 }
			
        tpQos8021pTable OBJECT-TYPE
            SYNTAX  SEQUENCE OF TpQos8021pEntry
            MAX-ACCESS  not-accessible
            STATUS  current
            DESCRIPTION
                    "A list of qos 8021p entries.
                     Here you can configure 802.1P Priority."
            ::= { tplinkQos8021p 2 }

        tpQos8021pEntry OBJECT-TYPE
            SYNTAX  TpQos8021pEntry
            MAX-ACCESS  not-accessible
            STATUS  current
            DESCRIPTION
                    "An entry contains of the information of qos 8021p."
            INDEX   { tpQos8021pPriTag }
            ::= { tpQos8021pTable 1 }
    
        TpQos8021pEntry ::=
            SEQUENCE {
                tpQos8021pPriTag
										INTEGER,
                tpQos8021pPriLevel
										INTEGER
            }
            
        tpQos8021pPriTag OBJECT-TYPE
            SYNTAX  INTEGER
            MAX-ACCESS  read-only
            STATUS  current
            DESCRIPTION
                    "Indicates the precedence level defined by IEEE802.1P. "
            ::= { tpQos8021pEntry 1 }
        
        tpQos8021pPriLevel OBJECT-TYPE
            SYNTAX  INTEGER{
            			tc0(0),
            			tc1(1),
            			tc2(2),
            			tc3(3),
						tc4(4),
						tc5(5),
						tc6(6),
						tc7(7)
            }
            MAX-ACCESS  read-write
            STATUS  current
            DESCRIPTION
                    "Indicates the priority level the packets with tag are mapped to. 
                     The priority levels are labeled as TC."
            ::= { tpQos8021pEntry 2 }
        
       -- the qos dscp config
        
        tpQosDSCPEnable OBJECT-TYPE
	          SYNTAX  INTEGER{
	      		disable(0), 						
	      		enable(1)		
	      		}
	            MAX-ACCESS  read-write
	            STATUS  current
	            DESCRIPTION
	                    "0. disable
	                     1. enable
	                     Here you can enable or disable DSCP Priority."
	            ::= { tplinkQosDSCP 1 }	
        
         tpQosDSCPTable OBJECT-TYPE
            SYNTAX  SEQUENCE OF TpQosDSCPEntry
            MAX-ACCESS  not-accessible
            STATUS  current
            DESCRIPTION
                    "A list of qos DSCP entries.
                     Here you can configure DSCP Priority."
            ::= { tplinkQosDSCP 2 }

        tpQosDSCPEntry OBJECT-TYPE
            SYNTAX  TpQosDSCPEntry
            MAX-ACCESS  not-accessible
            STATUS  current
            DESCRIPTION
                    "An entry contains of the information of qos DSCP."
            INDEX   { tpQosDSCPPriTag }
            ::= { tpQosDSCPTable 1 }
    
        TpQosDSCPEntry ::=
            SEQUENCE {
                tpQosDSCPPriTag
										INTEGER,
                tpQosDSCPPriLevel
										INTEGER
            }
            
        tpQosDSCPPriTag OBJECT-TYPE
            SYNTAX  INTEGER
            MAX-ACCESS  read-only
            STATUS  current
            DESCRIPTION
                    "Indicates the priority determined by the DS region of IP datagram. 
                     It ranges from 0 to 63. "
            ::= { tpQosDSCPEntry 1 }
        
        tpQosDSCPPriLevel OBJECT-TYPE
            SYNTAX  INTEGER{
            			cos0(0),
            			cos1(1),
            			cos2(2),
            			cos3(3),
            			cos4(4),
            			cos5(5),
            			cos6(6),
            			cos7(7)
            }
            MAX-ACCESS  read-write
            STATUS  current
            DESCRIPTION
                    "Indicates the priority level the packets with tag are mapped to. 
                     The priority levels are labeled as cos0 - cos7."
            ::= { tpQosDSCPEntry 2 }
END

