-- *****************************************************************
-- MY-VLAN-MIB.mib:  My VLAN MIB file
--
-- $Copyright$
-- 
-- *****************************************************************
--

MY-VLAN-MIB DEFINITIONS ::= BEGIN

IMPORTS
        MODULE-IDENTITY,
        OBJECT-TYPE,
        NOTIFICATION-TYPE,
        Integer32,
        Counter32,
        IpAddress
                FROM SNMPv2-SMI
        VlanId
                FROM Q-BRIDGE-MIB
        TruthValue,
        DisplayString,
        RowStatus,
        MacAddress
                FROM SNMPv2-TC
        MODULE-COMPLIANCE,
        OBJECT-GROUP,
        NOTIFICATION-GROUP
                FROM SNMPv2-CONF
        ConfigStatus,
        MemberMap,
        IfIndex
                FROM MY-TC
        EnabledStatus 
                FROM P-BRIDGE-MIB
        myMgmt
                FROM MY-SMI;

myVlanMIB MODULE-IDENTITY
        LAST-UPDATED "200203200000Z"
        ORGANIZATION "$Company$"
        CONTACT-INFO
                " 
                Tel: $Telephone$ 

                E-mail: $E-mail$"
        DESCRIPTION
                "This module defines my vlan mibs."
        REVISION      "200203200000Z"
        DESCRIPTION
                "Initial version of this MIB module."
        ::= { myMgmt 9}

myVlanMIBObjects OBJECT IDENTIFIER ::= { myVlanMIB 1 }


myVlanMaxNumber OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Number of MAX vlans this system supported."
        ::= { myVlanMIBObjects 1 }

myVlanCurrentNumber OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Number of current vlans this system have."
        ::= { myVlanMIBObjects 2 }
    
mySystemMaxVID OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Max vlans of VID this system supported."
        ::= { myVlanMIBObjects 3 }    
    
myVlanIfConfigTable OBJECT-TYPE
        SYNTAX SEQUENCE OF MyVlanIfConfigEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "vlan table."
        ::= { myVlanMIBObjects 4 }
    
myVlanIfConfigEntry OBJECT-TYPE
        SYNTAX MyVlanIfConfigEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "list of vlan and it's port group table."
        INDEX { myVlanIfConfigIfIndex}
        ::= { myVlanIfConfigTable 1 }
    
MyVlanIfConfigEntry ::=
        SEQUENCE {
        myVlanIfConfigIfIndex IfIndex,
        myVlanIfAccessVlan   VlanId,
        myVlanIfNativeVlan   VlanId,
        myVlanIfAllowedVlanList OCTET STRING
        }    
    
myVlanIfConfigIfIndex OBJECT-TYPE
        SYNTAX IfIndex
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            " "
        ::= { myVlanIfConfigEntry 1 }  

myVlanIfAccessVlan OBJECT-TYPE
        SYNTAX VlanId
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The value indicate the VID of the vlan which that this port 
             belong to. This field is effective for only access port."
        ::= { myVlanIfConfigEntry 2 }          

myVlanIfNativeVlan OBJECT-TYPE
        SYNTAX VlanId
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The value indicate the VID of the native vlan of that this port .
             This field is effective for only trunk port."
        ::= { myVlanIfConfigEntry 3 }                 
        
myVlanIfAllowedVlanList OBJECT-TYPE
        SYNTAX OCTET STRING(SIZE(512))
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "Each bit in every octet in octet string assigned to a vlan, the value of
             the bit indicates that if the vlan is belong to allowed vlan list of this 
             interface. It indicates that assigned vlan is member of allowed vlan list
             of this interface if value of the bit is 1. The lowest bit of first byte 
             correspond to vlan 1 and the lowest bit of second byte correspond to vlan 9
             vlan. This field is effective for only trunk port."
        ::= { myVlanIfConfigEntry 4 }        
    
    
myVlanTable OBJECT-TYPE
        SYNTAX SEQUENCE OF MyVlanEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "vlan table."
        ::= { myVlanMIBObjects 5 }
    
myVlanEntry OBJECT-TYPE
        SYNTAX MyVlanEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "list of vlan and it's distribution table."
        INDEX { myVlanVID }
        ::= { myVlanTable 1 }
    
MyVlanEntry ::=
        SEQUENCE {
        myVlanVID VlanId,
        myVlanPortMemberAction MemberMap,
        myVlanApMemberAction MemberMap,
        myVlanAlias DisplayString,
        myVlanEntryStatus ConfigStatus
        }
    
myVlanVID OBJECT-TYPE
        SYNTAX VlanId
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "VID of vlan ."
        ::= { myVlanEntry 1 }
 
myVlanPortMemberAction OBJECT-TYPE
        SYNTAX MemberMap
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Each octet in member map assigned to a physical port, the value of
             the octect indicates the action of a physical port in the
             vlan. Drop(1) indicate that the vlan doesn't include this physical port, 
             Add(2) indicate that the vlan include this physical port."
        ::= { myVlanEntry 2 }
        
myVlanApMemberAction OBJECT-TYPE
        SYNTAX MemberMap
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Each octet in member map assigned to a aggreate port, the value of
             the octect indicates the action of a aggreate port in the
            vlan. Drop(1) indicate that the vlan doesn't include this physical port, 
             Add(2) indicate that the vlan include this physical port."
        ::= { myVlanEntry 3 }        
        
myVlanAlias OBJECT-TYPE
        SYNTAX DisplayString (SIZE (0..32))
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "Vlan's alias ."
        DEFVAL{""}   
        ::= { myVlanEntry 4 }
                
myVlanEntryStatus OBJECT-TYPE
        SYNTAX ConfigStatus
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "Status of this entry, set this object to valid will creat a vlan of this entry,
             and set its value to invalid will delete the vlan of this entry."
        ::= { myVlanEntry 5 }

--myManageVlanVID OBJECT-TYPE
--        SYNTAX Integer32
--        MAX-ACCESS read-write
--        STATUS current
--        DESCRIPTION
--            "Designate VID of system managment vlan. VLAN designated must exist.0 indicate 
--            that there is not managment vlan in system."
--        ::= { myVlanMIBObjects 6 }  


--myPortDefaultVIDTable OBJECT-TYPE
--        SYNTAX SEQUENCE OF MyPortDefaultVIDEntry
--        MAX-ACCESS not-accessible
--        STATUS current
--        DESCRIPTION
--            "port's default vid."
--        ::= { myVlanMIBObjects 6 }
--    
--myPortDefaultVIDEntry OBJECT-TYPE
--        SYNTAX MyPortDefaultVIDEntry
--        MAX-ACCESS not-accessible
--        STATUS current
--        DESCRIPTION
--            "list of port default VID."
--        INDEX { myPortDefaultVIDPortIndex}
--        ::= { myPortDefaultVIDTable 1 }
--    
--MyPortDefaultVIDEntry ::=
--        SEQUENCE {
--        myPortDefaultVIDPortIndex IfIndex,
--        myPortDefaultVID   VlanId
--        }    
--    
--myPortDefaultVIDPortIndex OBJECT-TYPE
--        SYNTAX IfIndex
--        MAX-ACCESS not-accessible
--        STATUS current
--        DESCRIPTION
--            " "
--        ::= { myPortDefaultVIDEntry 1 }  
--
--myPortDefaultVID OBJECT-TYPE
--        SYNTAX VlanId
--        MAX-ACCESS read-write
--        STATUS current
--        DESCRIPTION
--            "Setting a port's default VLAN identifier"
--        ::= { myPortDefaultVIDEntry 2 }          


myVlanMIBConformance OBJECT IDENTIFIER ::= { myVlanMIB 2 }
myVlanMIBCompliances OBJECT IDENTIFIER ::= { myVlanMIBConformance 1 }
myVlanMIBGroups      OBJECT IDENTIFIER ::= { myVlanMIBConformance 2 }


-- compliance statements

myVlanMIBCompliance MODULE-COMPLIANCE
        STATUS  current
        DESCRIPTION
                "The compliance statement for entities which implement
                the My Vlan MIB"
        MODULE  -- this module
                MANDATORY-GROUPS { myVlanMIBGroup
                 }
        ::= { myVlanMIBCompliances 1 }
                
-- units of conformance

myVlanMIBGroup OBJECT-GROUP
        OBJECTS {
           myVlanMaxNumber,
           myVlanCurrentNumber,
           mySystemMaxVID,
           myVlanIfConfigIfIndex,
           myVlanIfAccessVlan,
           myVlanIfNativeVlan,
           myVlanIfAllowedVlanList,
           myVlanVID,
           myVlanApMemberAction,
           myVlanPortMemberAction,
           myVlanAlias,
           myVlanEntryStatus  
--           myManageVlanVID,
--           myPortDefaultVIDPortIndex,
--           myPortDefaultVID          
        }
        STATUS  current
        DESCRIPTION
                "A collection of objects providing vlan configure ."
        ::= { myVlanMIBGroups 1 }         
END
