-- Copyright(c) 2008-2010 Shenzhen TP-LINK Technologies Co.Ltd.
--
-- Description: Performance MAC vlan config
-- Reference:
-- Version: V0.1
-- History: Create by weishuifeng, 2102.11.28
-- ==================================================================

TPLINK-MAC-VLAN-MIB DEFINITIONS ::= BEGIN

IMPORTS
	ifIndex
				FROM RFC1213-MIB
    MODULE-IDENTITY, OBJECT-TYPE, Counter32, Integer32, OBJECT-IDENTITY
				FROM SNMPv2-SMI
	TPRowStatus
				FROM TPLINK-TC-MIB
	DisplayString, MacAddress
				FROM SNMPv2-TC 
	tplinkMgmt
				FROM TPLINK-MIB;

tplinkMacVlanMIB MODULE-IDENTITY  
	LAST-UPDATED    "200812160000Z"
	ORGANIZATION    "TPLINK"
	CONTACT-INFO	"www.tplink.com"
	DESCRIPTION
			"Implementation of the macvlan is mandatory for the swtich."
	REVISION        "200908030000Z"
	DESCRIPTION
			"Initial version of this MIB module."
::= { tplinkMgmt 15 }      	      

tplinkMacVlanMIBObjects			OBJECT IDENTIFIER	::= { tplinkMacVlanMIB 1 }
tplinkMacVlanNotifications		OBJECT IDENTIFIER	::= { tplinkMacVlanMIB 2 }          	  	          
		
	macVlanConfig  					OBJECT IDENTIFIER ::= {tplinkMacVlanMIBObjects 1}
    macVlanPort	 					OBJECT IDENTIFIER ::= {tplinkMacVlanMIBObjects 2}
  

macVlanConfigTable OBJECT-TYPE
	SYNTAX  		SEQUENCE OF MACENTRY
	MAX-ACCESS  	not-accessible
	STATUS  		current
	DESCRIPTION
			"MAC VLAN (Virtual Local Area Network) is the way to classify the 
			VLANs based on MAC Address. A MAC address is relative to a single 
			VLAN ID. The untagged packets and the priority-tagged packets coming 
			from the MAC address will be tagged with this VLAN ID."
::= { macVlanConfig 1 }

	macVlanEntry OBJECT-TYPE
		SYNTAX  	MACENTRY
		MAX-ACCESS  not-accessible
		STATUS  	current
		DESCRIPTION
				"An entry contains of the information of a mac vlan."
		INDEX   { macAddr }
	::= { macVlanConfigTable 1 }

	MACENTRY ::=
	SEQUENCE {
		macAddr
			OCTET STRING, 
		macDescription
			OCTET STRING (SIZE (0..32)), 
		macVlanId
			INTEGER,
		macVlanStatus
			TPRowStatus
	}

	macAddr OBJECT-TYPE
		SYNTAX  	OCTET STRING
		MAX-ACCESS  read-only
		STATUS  	current
		DESCRIPTION
				"Display the MAC address."
	::= { macVlanEntry 1 }

	macDescription OBJECT-TYPE
		SYNTAX  	OCTET STRING (SIZE (0..32))  
		MAX-ACCESS  read-create
		STATUS  	current
		DESCRIPTION
				"Give a description to the MAC address for identification,
				1-8 characters."
	::= { macVlanEntry 2 }

	macVlanId OBJECT-TYPE
		SYNTAX  	INTEGER (1..4094)
		MAX-ACCESS  read-create
		STATUS  	current
		DESCRIPTION
				"Enter the ID number of the MAC VLAN. This VLAN should be 
				one of the 802.1Q VLANs the ingress port belongs to, 1-4094"
	::= { macVlanEntry 3 }


	macVlanStatus OBJECT-TYPE
		SYNTAX  	TPRowStatus
		MAX-ACCESS  read-create
		STATUS  	current
		DESCRIPTION
				"the following two values are states:
				these values may be read or written
				active(1),
				the following three values are
				actions: these values may be written,
				but are never read
				createAndGo(4),
				destroy(6)"
	::= { macVlanEntry 4 }
	
	
macVlanPortTable OBJECT-TYPE
	SYNTAX  	SEQUENCE OF MACVLANPORTENTRY
	MAX-ACCESS  not-accessible
	STATUS  	current
	DESCRIPTION
			"Here you can enable the port for the MAC VLAN feature. 
			Only the port is enabled, can the configured MAC VLAN 
			take effect."
::= { macVlanPort 1 }

macVlanPortEntry OBJECT-TYPE
	SYNTAX  	MACVLANPORTENTRY
	MAX-ACCESS  not-accessible
	STATUS  	current
	DESCRIPTION
			"An entry contains of the information of a port."
	INDEX   { ifIndex }
::= { macVlanPortTable 1 }

	MACVLANPORTENTRY ::=
	SEQUENCE {
		macVlanPortNumber
                OCTET STRING,
		macVlanPortEnable
			INTEGER,
		macVlanPortLag
			OCTET STRING (SIZE (0..10))
	}
	
	macVlanPortNumber  OBJECT-TYPE
			     SYNTAX  OCTET STRING (SIZE (0..16))  
			      MAX-ACCESS  read-only
			      STATUS  current
			      DESCRIPTION
			              "The port id."
			      ::= { macVlanPortEntry 1}

	macVlanPortEnable OBJECT-TYPE
		SYNTAX  INTEGER{
			disable(0), 	--Disable
			enable(1)		--Enable
		}
		MAX-ACCESS  read-create
		STATUS  	current
		DESCRIPTION
				"Select your desired port for MAC VLAN feature. All the ports 
				are disabled by default
				0. Disable
				1. Enable"
	::= { macVlanPortEntry 2 }

	macVlanPortLag OBJECT-TYPE
		SYNTAX  	OCTET STRING (SIZE (0..10))
		MAX-ACCESS  read-only
		STATUS  	current
		DESCRIPTION
				"Displays the LAG to which the port belongs"
	::= { macVlanPortEntry 3 }

END	  	         
