MELLANOX-XSTP-MIB DEFINITIONS ::= BEGIN

IMPORTS
	MODULE-IDENTITY, OBJECT-TYPE, Integer32, Unsigned32
        FROM SNMPv2-SMI
    BridgeId
        FROM BRIDGE-MIB
    MODULE-COMPLIANCE, OBJECT-GROUP
        FROM SNMPv2-CONF
	NOTIFICATION-TYPE
		FROM SNMPv2-SMI
	mellanoxXstp
		FROM MELLANOX-SMI-MIB;
		
-- Mellanox XSTP MIB - for MSTP and PVRST+

mellanoxXstpMib MODULE-IDENTITY
	LAST-UPDATED "201707260000Z"
	ORGANIZATION 
		"Mellanox Technologies, Inc."
	CONTACT-INFO 
		"
		Mellanox Technologies, Inc.
		350 Oakmead Parkway, Suite 100
		Sunnyvale, CA 94085
		Tel: 408-970-3400
		Fax: 408-970-3403
		E-mail: info@mellanox.com
		        "
	DESCRIPTION 
		"MIB for MSTP and PVRST+"

	REVISION "201707260000Z"
	DESCRIPTION 
		"Fixed syntax errors"
::= { mellanoxXstp 1 }
		
mellanoxXstpNotifications  OBJECT IDENTIFIER ::= { mellanoxXstpMib 1 }
mellanoxXstpObjects        OBJECT IDENTIFIER ::= { mellanoxXstpMib 2 }

mellanoxXstpTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF MellanoxXstpEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Table of MSTP instances or PVRST+ VLANs"
    ::= { mellanoxXstpObjects 1 }
	
mellanoxXstpEntry OBJECT-TYPE
    SYNTAX      MellanoxXstpEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A MSTP/PVRST+ Table entry."
    INDEX { mellanoxXstpId }
    ::= { mellanoxXstpTable 1 }
	
MellanoxXstpEntry ::= SEQUENCE {
      mellanoxXstpId                       Unsigned32 (1..4094),
      mellanoxXstpBridgeId                 BridgeId,
      mellanoxXstpDesignatedRoot           BridgeId,
      mellanoxXstpRootPathCost             Integer32,
      mellanoxXstpRootPort                 Unsigned32 (1..65535),
      mellanoxXstpBridgePriority           Integer32,
      mellanoxXstpVids0                    OCTET STRING,
      mellanoxXstpVids1                    OCTET STRING,
      mellanoxXstpVids2                    OCTET STRING,
      mellanoxXstpVids3                    OCTET STRING
}

mellanoxXstpId OBJECT-TYPE
    SYNTAX      Unsigned32 (1..4094)
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "MST Instance identifier or VLAN ID in case of PVRST+."
    ::= { mellanoxXstpEntry 1 }

mellanoxXstpBridgeId OBJECT-TYPE
    SYNTAX      BridgeId
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Bridge Identifier for the STI."
    ::= { mellanoxXstpEntry 2 }

mellanoxXstpDesignatedRoot OBJECT-TYPE
    SYNTAX      BridgeId
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Bridge Identifier of the Root Bridge for the STI."
    ::= { mellanoxXstpEntry 3 }

mellanoxXstpRootPathCost OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Root port path cost from the transmitting Bridge to 
		 the Root Bridge for the STI."
    ::= { mellanoxXstpEntry 4 }

mellanoxXstpRootPort OBJECT-TYPE
    SYNTAX      Unsigned32 (1..65535)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Root port for the STI."
    ::= { mellanoxXstpEntry 5 }

mellanoxXstpBridgePriority OBJECT-TYPE
    SYNTAX      Integer32 (0..61440)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Bridge Priority parameter for the STI 
		(the two most significant bytes of the Bridge 
		 Identifier for the STI)"
    ::= { mellanoxXstpEntry 6 }

mellanoxXstpVids0 OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(128))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Only relevant for MSTP.
		 The first 1024 bits of the 4096 bit vector
         indicating which VIDs are assigned to this STID.  The high order
         bit of the first octet corresponds to the first bit of the vector,
         while the low order bit of the last octet corresponds to the last
         bit of this portion of the vector.  A bit that is on (equal to 1)
         indicates that the corresponding VID is assigned to this STID."
    ::= { mellanoxXstpEntry 7 }

mellanoxXstpVids1 OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(128))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Only relevant for MSTP.
		 The second 1024 bits of the 4096 bit vector
         indicating which VIDs are assigned to this STID.  The high order
         bit of the first octet corresponds to the first bit of this
         portion of the vector, while the low order bit of the last octet
         corresponds to the last bit of this portion of the vector.  A bit
         that is on (equal to 1) indicates that the corresponding VID is
         assigned to this STID."
    ::= { mellanoxXstpEntry 8 }

mellanoxXstpVids2 OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(128))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Only relevant for MSTP.
		 The third 1024 bits of the 4096 bit vector
         indicating which VIDs are assigned to this STID.  The high order
         bit of the first octet corresponds to the first bit of this
         portion of the vector, while the low order bit of the last octet
         corresponds to the last bit of this portion of the vector.  A bit
         that is on (equal to 1) indicates that the corresponding VID is
         assigned to this STID."
    ::= { mellanoxXstpEntry 9 }

mellanoxXstpVids3 OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(128))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Only relevant for MSTP.
		 The fourth 1024 bits of the 4096 bit vector
         indicating which VIDs are assigned to this STID.  The high order
         bit of the first octet corresponds to the first bit of this
         portion of the vector, while the low order bit of the last octet
         corresponds to the last bit of this portion of the vector.  A bit
         that is on (equal to 1) indicates that the corresponding VID is
         assigned to this STID."
    ::= { mellanoxXstpEntry 10 }

mellanoxXstpPortTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF MellanoxXstpPortEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "MSTP/PVRST+ Port Table. Each row in the Table represents information
         regarding a specific Port within the Bridge's Bridge Protocol
         Entity, per STI or per VLAN in case of PVRST+."
    ::= { mellanoxXstpObjects 2 }

mellanoxXstpPortEntry OBJECT-TYPE
    SYNTAX      MellanoxXstpPortEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "MSTP/PVRST+ Port Table entry."
    INDEX { mellanoxXstpPortMstId,
            mellanoxXstpPortNum }
    ::= { mellanoxXstpPortTable 1 }
	
MellanoxXstpPortEntry ::= SEQUENCE {
      mellanoxXstpPortMstId             Unsigned32 (1..4094),
      mellanoxXstpPortNum               Unsigned32 (1..65535),
      mellanoxXstpPortState             INTEGER,
      mellanoxXstpPortPriority          Integer32,
      mellanoxXstpPortPathCost          Integer32,
      mellanoxXstpPortRole              INTEGER
}

mellanoxXstpPortMstId OBJECT-TYPE
    SYNTAX      Unsigned32 (1..4094)
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Spanning Tree (or MST) Instance id or VLAN ID in case of PVRST+."
    ::= { mellanoxXstpPortEntry 1 }

mellanoxXstpPortNum OBJECT-TYPE
    SYNTAX      Unsigned32 (1..65535)
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "Number of the Bridge Port"
    ::= { mellanoxXstpPortEntry 2 }

mellanoxXstpPortState OBJECT-TYPE
    SYNTAX      INTEGER {
                    disabled(1),
                    listening(2),
                    learning(3),
                    forwarding(4),
                    blocking(5)
                }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The current state of the Port (i.e., Disabled,
         Listening, Learning, Forwarding, or Blocking), for the STI."
    ::= { mellanoxXstpPortEntry 3 }

mellanoxXstpPortPriority OBJECT-TYPE
    SYNTAX      Integer32 (0..240)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Priority of the port for the STI."
    ::= { mellanoxXstpPortEntry 4 }

mellanoxXstpPortPathCost OBJECT-TYPE
    SYNTAX      Integer32 (1..200000000)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Port path cost for the STI."
    ::= { mellanoxXstpPortEntry 5 }

mellanoxXstpPortRole OBJECT-TYPE
    SYNTAX      INTEGER {
                    root(1),
                    alternate(2),
                    designated(3),
                    backup(4),
					disabled(5)
                }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Current Port Role for the Port (i.e., Root,
         Alternate, Designated, Backup or Disabled which is relevant for PVRST+), for the STI."
    ::= { mellanoxXstpPortEntry 6 }

mellanoxXstpVlanTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF MellanoxXstpVlanEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Table containing VLAN mapping to spanning tree instances (STI). Not relevant for PVRST+."
    ::= { mellanoxXstpObjects 3 }

mellanoxXstpVlanEntry OBJECT-TYPE
    SYNTAX      MellanoxXstpVlanEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "MSTP VLAN table entry."
    INDEX { mellanoxXstpVlanId }
    ::= { mellanoxXstpVlanTable 1 }
	
MellanoxXstpVlanEntry ::= SEQUENCE {
      mellanoxXstpVlanId           Unsigned32 (1..4096),
      mellanoxXstpVlanMstId        Unsigned32 (1..4094)
}

mellanoxXstpVlanId OBJECT-TYPE
    SYNTAX      Unsigned32 (1..4096)
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "VLAN id."
    ::= { mellanoxXstpVlanEntry 1 }

mellanoxXstpVlanMstId OBJECT-TYPE
    SYNTAX      Unsigned32 (1..4094)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "STID corresponding to the VLAN id."
    ::= { mellanoxXstpVlanEntry 2 }

mellanoxXstpRootBridgeChange NOTIFICATION-TYPE
             OBJECTS { mellanoxXstpId }
             STATUS  current
             DESCRIPTION
               "Indicates that the sending agent has become 
			   the new root of a Spanning Tree. 
			   Varbind mellanoxXstpId is either instance ID for MSTP or VLAN Id for PVRST+."
            ::= { mellanoxXstpNotifications 1 }

mellanoxXstpRootPortChange NOTIFICATION-TYPE
             OBJECTS { mellanoxXstpId, mellanoxXstpPortNum}
             STATUS  current
             DESCRIPTION
               "Indicates that the sending agent has changed 
			   the root Port of a Spanning Tree.
			   Varbind mellanoxXstpId is either instance ID for MSTP or VLAN Id for PVRST+."
            ::= { mellanoxXstpNotifications 2 }

mellanoxXstpTopologyChange NOTIFICATION-TYPE
             OBJECTS { mellanoxXstpId, mellanoxXstpPortNum, mellanoxXstpPortState}
             STATUS  current
             DESCRIPTION
               "A mstpTopologyChange trap is sent by a bridge when
               any of its configured ports in any instance transitions 
			   from the Learning state to the Forwarding state,
			   or from the Forwarding state to the Blocking state.  
			   The trap is not sent if a mellanoxXstpRootBridgeChange trap
               is sent for the same transition.
			   Varbind mellanoxXstpId is either instance ID for MSTP or VLAN Id for PVRST+."
            ::= { mellanoxXstpNotifications 3 }
END







