-- ============================================================================

--
-- Extreme Trap-based polling objects
--

EXTREME-TRAPPOLL-MIB DEFINITIONS ::= BEGIN

        IMPORTS
                MODULE-IDENTITY         FROM SNMPv2-SMI
		OBJECT-TYPE             FROM SNMPv2-SMI
		RowStatus               FROM SNMPv2-TC
                Integer32, TimeTicks    FROM SNMPv2-SMI
		trapDestIndex           FROM RMON2-MIB
                extremeAgent            FROM EXTREME-BASE-MIB;

        extremeTrapPoll MODULE-IDENTITY
                LAST-UPDATED "9801090000Z"
                ORGANIZATION "Extreme Networks, Inc."
                CONTACT-INFO "www.extremenetworks.com"
                DESCRIPTION "Extreme SmartTraps trap-based-polling objects"
        ::= { extremeAgent 6 }


        extremeSmartTrapRulesTable OBJECT-TYPE
        	SYNTAX	SEQUENCE OF ExtremeSmartTrapRulesEntry
        	MAX-ACCESS 	not-accessible
        	STATUS	current
        	DESCRIPTION	
			"A table of rules that are used to 
                        generate extremeSmartTraps."	
	::= { extremeTrapPoll 1 } 

        extremeSmartTrapRulesEntry OBJECT-TYPE
        	SYNTAX	ExtremeSmartTrapRulesEntry
        	MAX-ACCESS 	not-accessible
        	STATUS	current
        	DESCRIPTION	
			"Each row in the table represents a rule."
        	INDEX	{ extremeSmartTrapRulesIndex } 
	::= { extremeSmartTrapRulesTable 1 } 

        ExtremeSmartTrapRulesEntry ::= SEQUENCE {
		extremeSmartTrapRulesIndex		INTEGER,
		extremeSmartTrapRulesRowStatus		RowStatus,
		extremeSmartTrapRulesDesiredOID	        OBJECT IDENTIFIER,
		extremeSmartTrapRulesSupportedOID	OBJECT IDENTIFIER,
		extremeSmartTrapRulesOperation		INTEGER,
		extremeSmartTrapRulesTrapDestIndex      Integer32
	}

        extremeSmartTrapRulesIndex 	OBJECT-TYPE
        	SYNTAX	INTEGER
        	MAX-ACCESS 	read-only
        	STATUS	current
        	DESCRIPTION	
			"An index into the extremeSmartTraps rules table. "
	::= { extremeSmartTrapRulesEntry 1 }

        extremeSmartTrapRulesRowStatus 	OBJECT-TYPE
        	SYNTAX	RowStatus
        	MAX-ACCESS 	read-create
        	STATUS	current
        	DESCRIPTION	
			"Indicates the status of row. "
	::= { extremeSmartTrapRulesEntry 2 }

        extremeSmartTrapRulesDesiredOID	OBJECT-TYPE
        	SYNTAX	OBJECT IDENTIFIER
        	MAX-ACCESS 	read-create
        	STATUS	current
        	DESCRIPTION	
                "The OID for which the rule is desired. When the OID 
                specified by this object undergoes an operation 
                specified by extremeSmartTrapRulesOperation, then 
                an entry in the extremeSmartTrapInstanceTable is created."
	::= { extremeSmartTrapRulesEntry 3 }

        extremeSmartTrapRulesSupportedOID	OBJECT-TYPE
        	SYNTAX	OBJECT IDENTIFIER
        	MAX-ACCESS 	read-only
        	STATUS	current
        	DESCRIPTION	
                "The OID for which this entry is created. This is 
                based on the granularity supported by the agent 
                corresponding to the extremeSmartTrapRulesDesiredOID 
                that the management station desires. This object has a 
                value that is a prefix of, or is equal to the value of 
                ExtremeSmartTrapRulesDesiredOID. The agent specifes 
                this value before setting the extremeSmartTrapRulesRowStatus 
                to active."
	::= { extremeSmartTrapRulesEntry 4 }

        extremeSmartTrapRulesOperation	OBJECT-TYPE
        	SYNTAX	INTEGER {
			add(1),
			delete(2),
			modify(3),
			any(4)
		}
        	MAX-ACCESS 	read-create
        	STATUS	current
        	DESCRIPTION	
                "The write operations on extremeSmartTrapRulesDesiredOID 
                for which extremeSmartTrapsInstanceEntry should be created."
	::= { extremeSmartTrapRulesEntry 5 }

        extremeSmartTrapRulesTrapDestIndex OBJECT-TYPE
        	SYNTAX	Integer32
        	MAX-ACCESS 	read-create
        	STATUS	current
        	DESCRIPTION	
                "A pointer to a row in RMON2's trapDestTable that was
                created by the management station that defined 
                this rule. Any extremeSmartTraps generated by this agent due
                to this rule will be sent to the trapDestCommunity/
                trapDestAddress and will include trapDestOwner specified by 
                this trapDestTable entry.

                This also allows a manager to identify if the rule was defined 
                by itself, or by another (possibly older) instance of the 
                management server process. The manager should initiate a 
                poll only for traps received which indicate its own rules. 

                Subprocesses within a single manager might also uniquely 
                create their own entries within trapDestTable using 
                different trapDestOwner strings: when a trap is received, 
                the manager can authenticate if the trap was generated due 
                to one of its rules and route the notification to the
                appropriate subprocess."
	::= { extremeSmartTrapRulesEntry 6 }

--
-- Table for storing information about the occurence of changes 
-- according to the rules in extremeSmartTrapRulesTable.
--
-- This is a read-only table maintained by the agent. 

        extremeSmartTrapInstanceTable  OBJECT-TYPE
        	SYNTAX	SEQUENCE OF ExtremeSmartTrapInstanceEntry
        	MAX-ACCESS 	not-accessible
        	STATUS	current
        	DESCRIPTION	
		"A table representing containing information about
                which variables have changed according to the 
                rules defined in extremeSmartTrapRulesTable."
	::= { extremeTrapPoll 2 }
	
        extremeSmartTrapInstanceEntry	 OBJECT-TYPE
        	SYNTAX	ExtremeSmartTrapInstanceEntry
        	MAX-ACCESS 	not-accessible
        	STATUS	current
        	DESCRIPTION	
                "An entry corresponding to a change in value of one of 
                the OIDs defined in extremeSmartTrapRulesTable. Entries
                are indexed by a pointer to the relevant row in 
                RMON2 trapDestTable that a manager created in order to
                receive trap notifications of these events.

                Entries are created in this table whenever the value of 
                one of the OIDs defined by extremeSmartTrapRulesSupportedOID 
                changes. Entries are deleted when a get or get-next operation 
                is performed on that entry. A get operation for a non-existent 
                entry returns a noSuchInstance error."

               	INDEX { trapDestIndex, extremeSmartTrapInstanceSubindex } 
	::= { extremeSmartTrapInstanceTable 1 } 

        ExtremeSmartTrapInstanceEntry ::= SEQUENCE {
		extremeSmartTrapInstanceSubindex	INTEGER,
		extremeSmartTrapInstanceRule		INTEGER,
		extremeSmartTrapInstanceChangedOid	OBJECT IDENTIFIER,
		extremeSmartTrapInstanceActualOperation	INTEGER,
		extremeSmartTrapInstanceChangeTime	TimeTicks
	}

        extremeSmartTrapInstanceSubindex OBJECT-TYPE
        	SYNTAX	INTEGER 
        	MAX-ACCESS 	read-only
        	STATUS	current
        	DESCRIPTION	
                "An additional index into the table of extremeSmartTrap 
                instance data. Each row which has the same OID for the
                same management station (i.e. same cookie) is assigned
                a unique value by the agent in order to differentiate 
                between multiple instances."
	::= { extremeSmartTrapInstanceEntry 1 } 

        extremeSmartTrapInstanceRule OBJECT-TYPE
        	SYNTAX	INTEGER 
        	MAX-ACCESS 	read-only
        	STATUS	current
        	DESCRIPTION	
                "The index of the rule from the 
                extremeSmartTrapRulesTable for which this entry 
                was created."
	::= { extremeSmartTrapInstanceEntry 2 } 

        extremeSmartTrapInstanceChangedOid OBJECT-TYPE
        	SYNTAX	OBJECT IDENTIFIER
        	MAX-ACCESS 	read-only
        	STATUS	current
        	DESCRIPTION	
                "The OID value that has changed."
	::= { extremeSmartTrapInstanceEntry 3 } 

        extremeSmartTrapInstanceActualOperation OBJECT-TYPE
        	SYNTAX	INTEGER {
       			add(1),
			delete(2),
			modify(3)
		}				
        	MAX-ACCESS 	read-only
        	STATUS	current
        	DESCRIPTION	
                "The operation that was recently performed on 
                this extremeSmartTrapInstanceChangedOid."
	::= { extremeSmartTrapInstanceEntry 4 } 

        extremeSmartTrapInstanceChangeTime OBJECT-TYPE
        	SYNTAX	TimeTicks
        	MAX-ACCESS 	read-only
        	STATUS	current
        	DESCRIPTION	
                "The sysUpTime when this entry was created."
	::= { extremeSmartTrapInstanceEntry 5 }
	
--
-- Flush control for Trap table
--
        extremeSmartTrapFlushInstanceTableIndex OBJECT-TYPE
        	SYNTAX	INTEGER 
        	MAX-ACCESS 	read-write
        	STATUS	current
        	DESCRIPTION	
                "When this object is set, the agent will delete all rows
                from the extremeSmartTrapInstanceTable which meet the
                following rules: 
		1. The InstanceTableIndex is equal to the value obtained by 
		taking the two most significant bytes of this integer and
		right-shifting it by two bytes as an unsigned int.
		2. The InstanceTableSubIndex is less than or equal to the
                value obtained by masking this object value with 0x0000FFFF.
                If the value obtained is zero, then all rows with the specified
                InstanceTableIndex should be deleted."
	::= { extremeTrapPoll 3 } 

END