-- *****************************************************************
-- BDCOM-IF-THRESHOLD-MIB.my: BDCOM Interface Threshold MIB
--
-- October 2003
--
-- Copyright (c) 2003 by BDCOM, Inc.
-- All rights reserved.
-- *****************************************************************

BDCOM-IF-THRESHOLD-MIB DEFINITIONS ::= BEGIN


IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
    Integer32, Unsigned32                       FROM SNMPv2-SMI
    TEXTUAL-CONVENTION, RowStatus, TimeStamp,
    TruthValue                                  FROM SNMPv2-TC
    MODULE-COMPLIANCE, OBJECT-GROUP,
    NOTIFICATION-GROUP                          FROM SNMPv2-CONF
    SnmpAdminString                             FROM SNMP-FRAMEWORK-MIB
    bdMgmt                                   	FROM BDCOM-SMI
    InterfaceIndex, ifIndex                     FROM IF-MIB;


bdcomIfThresholdMIB MODULE-IDENTITY
	LAST-UPDATED "200310160000Z"
	ORGANIZATION "BDCOM, Inc."
	CONTACT-INFO
		" Tel:   +86-21-50800666  
		 Postal: No.123,Juli RD,Zhangjiang Hitech Park,
			 Shanghai Baud Data Communication Corporation Inc,
			 Shanghai City 201203,
		 	P.R.C "
    DESCRIPTION
        "This MIB module defines the managed objects that support
        monitoring of thresholds on interfaces.  Configuration and
        monitoring of the thresholds is done through threshold
        templates that can be assigned to any subset of interfaces on
        the network element.  More than one threshold template can be
        assigned to a given interface.

        This MIB module should be used when it is desired to apply a
        common set of thresholds to a subset of the available
        interfaces.  If a threshold is to be applied to only one
        interface, then the EVENT-MIB or the RMON-MIB may be used as
        simpler alternatives.  If a threshold is to be applied to all
        available interfaces, then the EVENT-MIB may be used as a
        simpler alternative."
	REVISION        "200310160000Z"
	DESCRIPTION
		"Initial version of this MIB."	
    ::= { bdMgmt 218 }


-- Textual Conventions

BdifthTemplateIndex ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "An arbitrary integer that uniquely identifies a threshold
        template.  The value for each threshold template must remain
        constant at least from one re-initialization of the agent's
        network management system to the next re-initialization.  The
        value may change when the agent's network management system is
        rebooted or re-initialized."
    SYNTAX      Unsigned32 (1..1000)

BdifthTemplateIndexOrZero ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "A value of either '0' or a valid template index. The
        distinguished value '0' indicates no template or no unassigned
        template index values are available."
    SYNTAX      Unsigned32 (0..1000)

BdifthThresholdIndex ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "An arbitrary integer that uniquely identifies a threshold
        within a threshold template.  The value for each threshold must
        remain constant when the agent's network management system is
        rebooted or re-initialized."
    SYNTAX      Unsigned32 (0..63)

BdifthThresholdList ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "A list of thresholds defined in a given template, in which
        each bit represents one threshold.  The bits in the first octet
        represent thresholds identified by bdifthThresholdIndex values 0
        through 7, inclusive.  The bits in the second octet represent
        thresholds identified by integer values 8 through 15,
        inclusive, and so forth.  The least significant bit of an octet
        represents the threshold identified by the lowest integer
        value, and the most significant bit represents the threshold
        identified by the highest integer value.  The figure shown
        below illustrates the format of a threshold list.

         Octet 1             Octet 8

         7 6 5 4 3 2 1 0     7 6 5 4 3 2 1 0
        +-+-+-+-+-+-+-+-+   +-+-+-+-+-+-+-+-+
        |               |...|               |
        +-+-+-+-+-+-+-+-+   +-+-+-+-+-+-+-+-+
         | | | | | | | |     | | | | | | | |
         | | | | | | | |     | | | | | | | +- Threshold 56
         | | | | | | | |     | | | | | | +--- Threshold 57
         | | | | | | | |     | | | | | +----- Threshold 58
         | | | | | | | |     | | | | +------- Threshold 59
         | | | | | | | |     | | | +--------- Threshold 60
         | | | | | | | |     | | +----------- Threshold 61
         | | | | | | | |     | +------------- Threshold 62
         | | | | | | | |     +--------------- Threshold 63
         | | | | | | | |                          :
         | | | | | | | |                          :
         | | | | | | | +--------------------- Threshold 0
         | | | | | | +----------------------- Threshold 1
         | | | | | +------------------------- Threshold 2
         | | | | +--------------------------- Threshold 3
         | | | +----------------------------- Threshold 4
         | | +------------------------------- Threshold 5
         | +--------------------------------- Threshold 6
         +----------------------------------- Threshold 7

        A bit value of '1' indicates that the threshold is being
        exceeded in current operation (i.e., the threshold is fired).
        A bit value of '0' indicates that the threshold is not being
        exceeded in current operation (i.e., the threshold is cleared).

        A threshold list of length N, where N < 8, represents a
        threshold list for which thresholds N*8 through 63 have the
        value of '0'.  A special case is a threshold list having a
        length of '0', which represents a threshold list of all zeros."
    SYNTAX      OCTET STRING (SIZE(0..8))

BdifthThresholdSeverity ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "The severity of the condition when the threshold is fired.
        A smaller enumerated integer value indicates that the threshold
        exceeded condition is more severe.

        The value 'fail' indicates a hard failure condition where
        no data can be received, or where the data received has a large
        number of errors which makes it impossible to recover most of
        the data.

        The value 'degrade' indicates a soft failure condition in which
        data received on this interface is affected, but a significant
        portion of the data can be recovered.

        The value 'info' is used to raise attention to a condition that
        could possibly be an impending problem or to notify the
        customer of an event that improves operation."
    SYNTAX      INTEGER {
                    fail(1),
                    degrade(2),
                    info(3),
                    other(4)
                }

BdifthThresholdSeverityOrZero ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "A value of either '0' or a valid threshold severity."
    SYNTAX      INTEGER (0..4)


-- MIB Object Definitions

bdIfThresholdMIBObjects OBJECT IDENTIFIER ::= { bdcomIfThresholdMIB 1 }

bdifthTemplateGroup OBJECT IDENTIFIER ::= { bdIfThresholdMIBObjects 1 }

bdifthTemplateIfAssignGroup OBJECT IDENTIFIER
                                     ::= { bdIfThresholdMIBObjects 2 }
bdifthIfThresholdFiredGroup OBJECT IDENTIFIER
                                     ::= { bdIfThresholdMIBObjects 3 }


-- Template Table

bdifthTemplateIndexNext OBJECT-TYPE
    SYNTAX      BdifthTemplateIndexOrZero
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object contains an appropriate value to be used for
        bdifthTemplateIndex when creating entries in the
        bdifthTemplateTable.  The distinguished value 0 indicates that
        no unassigned entries are available.

        To obtain a suggested bdifthTemplateIndex value for a new entry,
        the manager issues a management protocol retrieval operation to
        obtain the current value of this object.  The manager may
        ignore this object and use alternative mechanisms for choosing
        an unused value of bdifthTemplateIndex for a new entry.

        The agent will modify the value to the next unassigned index,
        when a new entry is created in bdifthTemplateTable with the
        current value of this object.  After deletion of an entry in
        bdifthTemplateTable the agent will determine through its local
        policy when its index value will be made available for reuse."
    ::= { bdifthTemplateGroup 1 }

bdifthTemplateLastChange OBJECT-TYPE
    SYNTAX      TimeStamp
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object specifies the value of sysUpTime at the last time
        there was either a change to any object in any entry in
        bdifthTemplateTable, or an entry was created or destroyed in
        bdifthTemplateTable.  If no change to bdifthTemplateTable has
        occurred since the last re-initialization of the local network
        management subsystem, then this object contains a zero value."
    ::= { bdifthTemplateGroup 2 }

bdifthTemplateTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF BdifthTemplateEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table is used to create threshold templates.
        Each template includes one or more thresholds (defined in the
        bdifthThresholdTable), and can be assigned to multiple
        interfaces.  An interface may be associated with more than one
        template.  The assignment of templates to interfaces is done in
        the bdifthTemplateIfAssignTable."
    ::= { bdifthTemplateGroup 3 }

bdifthTemplateEntry OBJECT-TYPE
    SYNTAX      BdifthTemplateEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry describing the general properties of a threshold
        template.

        The template is created using the bdifthTemplateRowStatus
        object.  Prior to creating an entry in the table, the manager
        should obtain a unique value of bdifthTemplateIndex by reading
        the bdifthTemplateIndexNext object.  The values of
        bdifthTemplateName and bdifthTemplateNotifyHoldDownType must be
        provided before activating the entry.

        After creating an entry, thresholds can be defined for the
        template by creating entries with the same value of
        bdifthTemplateIndex in the bdifthThresholdTable.  The template
        can then be assigned to one or more interfaces using the
        bdifthTemplateIfAssignTable.

        Once an entry has been activated, the value of
        bdifthTemplateName cannot be modified.  In order to use a new
        value of bdifthTemplateName, a new template must be defined.
        The values of bdifthTemplateNotifyHoldDownType and
        bdifthTemplateNotifyHoldDownTime may be modified when the entry
        is active.  See the description clause of
        bdifthTemplateNotifyHoldDownType for further caveats on
        modification of that object."
    INDEX       { bdifthTemplateIndex }
    ::= { bdifthTemplateTable 1 }

BdifthTemplateEntry ::=
    SEQUENCE {
        bdifthTemplateIndex                BdifthTemplateIndex,
        bdifthTemplateName                 SnmpAdminString,
        bdifthTemplateNotifyHoldDownType   INTEGER,
        bdifthTemplateNotifyHoldDownTime   Unsigned32,
        bdifthTemplateRowStatus            RowStatus
    }

bdifthTemplateIndex OBJECT-TYPE
    SYNTAX      BdifthTemplateIndex
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An arbitrary integer that uniquely identifies a threshold
        template.  The value for each threshold template must remain
        constant at least from one re-initialization of the agent's
        network management system to the next re-initialization.  The
        value may change when the agent's network management system is
        rebooted or re-initialized."
    ::= { bdifthTemplateEntry 1 }

bdifthTemplateName OBJECT-TYPE
    SYNTAX      SnmpAdminString (SIZE(1..32))
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object specifies a unique name associated with the
        threshold template by the management client, and provides a
        non-volatile 'handle' for the template.  The name must not
        include whitespace characters.

        After this value has been written to the startup configuration,
        the agent must retain the value until a management client
        deletes it.  The level of retention must span reboots and
        re-initializations of the agent, including those that result in
        different assignments to the value of bdifthTemplateIndex
        associated with this template.

        Once an entry has been activated, this value cannot be
        modified.  In order to use a new value of bdifthTemplateName, a
        new template must be defined."
    ::= { bdifthTemplateEntry 2 }

bdifthTemplateNotifyHoldDownType OBJECT-TYPE
    SYNTAX      INTEGER {
                    other(1),
                    holdDownTimer(2),
                    fireAndClearThresholds(3)   -- hysteresis
                }
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object specifies the method used to prevent an excess of
        notifications from being generated when operation fluctuates
        around a threshold level.

        The value 'holdDownTimer' indicates that notifications for a
        given threshold and interface are suppressed for a short amount
        of time after each notification.  The time value is specified
        in bdifthTemplateNotifyHoldDownTime, which is instantiated only
        when this object is set to 'holdDownTimer'.  After a
        notification is received for a given threshold and interface,
        the next notification for that threshold and interface will be
        generated after at least bdifthTemplateNotifyHoldDownTime amount
        of time has passed, only when the threshold is next fired or
        cleared.

        The value 'fireAndClearThresholds' indicates that hysteresis
        is used.  The management client configures two values for each
        threshold:  one for asserting that the threshold has been
        exceeded (see bdifthThresholdFiredValue), and a second value for
        asserting that the threshold is no longer being exceeded (see
        bdifthThresholdClearedValue, which is instantiated only when
        this object is set to 'fireAndClearThresholds').

        When this entry in bdifthTemplateTable is active, this object
        may only be modified if there are no active entries in
        bdifthThresholdTable with the same value of bdifthTemplateIndex."
    ::= { bdifthTemplateEntry 3 }

bdifthTemplateNotifyHoldDownTime OBJECT-TYPE
    SYNTAX      Unsigned32 (1..3600)
    UNITS       "seconds"
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The minimum amount of time between successive
        bdifthIfThresholdFired or bdifthIfThresholdCleared notifications
        for a given interface and template.

        This object is instantiated only when
        bdifthTemplateNotifyHoldDownType is set to 'holdDownTimer'."
    DEFVAL { 5 }
    ::= { bdifthTemplateEntry 4 }

bdifthTemplateRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object is used to create and delete threshold templates.

        The values of bdifthTemplateName and
        bdifthTemplateNotifyHoldDownType must be provided before
        activating the entry.

        An entry can only be deleted when there are no active entries
        in the bdifthTemplateIfAssignTable with the same value of
        bdifthTemplateIndex.

        When an entry is deleted, all associated entries in the
        bdifthThresholdTable are also deleted.

        After the entry has been activated, this object cannot be set
        to any value other than 'destroy'.  The row status never
        changes to 'notInService' after reaching the value 'active'."
    ::= { bdifthTemplateEntry 5 }


-- Threshold Table

bdifthThresholdLastChange OBJECT-TYPE
    SYNTAX      TimeStamp
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object specifies the value of sysUpTime at the last time
        there was either a change to any object in any entry in
        bdifthThresholdTable, or an entry was created or destroyed in
        bdifthThresholdTable.  If no change to bdifthThresholdTable has
        occurred since the last re-initialization of the local network
        management subsystem, then this object contains a zero value."
    ::= { bdifthTemplateGroup 4 }

bdifthThresholdTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF BdifthThresholdEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table specifies the interface thresholds used in each
        template."
    ::= { bdifthTemplateGroup 5 }

bdifthThresholdEntry OBJECT-TYPE
    SYNTAX      BdifthThresholdEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry specifying an interface threshold used in a threshold
        template.

        The entry is created using the bdifthThresholdRowStatus object.
        The values of bdifthThresholdObject, bdifthThresholdSeverity,
        bdifthThresholdType, and bdifthThresholdFiredValue must be
        provided before activating the entry.  If the value of
        bdifthTemplateNotifyHoldDownType in the bdifthTemplateEntry with
        the same value of bdifthTemplateIndex is
        'fireAndClearThresholds', then the value of
        bdifthThresholdClearedValue must also be provided before
        activating the entry.  If the value of bdifthThresholdType is
        other than 'rateOfIncreaseExponentXIfSpeed', then the value of
        bdifthThresholdSampleInterval must also be provided before
        activating the entry.

        The agent should not allow creation of two entries in the table
        with the same values of bdifthTemplateIndex,
        bdifthThresholdObject, bdifthThresholdSeverity, and
        bdifthThresholdDirection.

        Once an entry has been activated, the values of
        bdifthThresholdObject, bdifthThresholdSeverity,
        bdifthThresholdType, and bdifthThresholdDirection cannot be
        modified.  In order to use new values of these objects, a new
        threshold must be defined.  The values of bdifthThresholdDescr,
        bdifthThresholdFiredValue, bdifthThresholdClearedValue,
        bdifthThresholdSampleInterval, and bdifthThresholdApsSwitchover
        may be modified when the entry is active."
    INDEX { bdifthTemplateIndex, bdifthThresholdIndex }
    ::= { bdifthThresholdTable 1 }

BdifthThresholdEntry ::=
    SEQUENCE {
        bdifthThresholdIndex                     BdifthThresholdIndex,
        bdifthThresholdDescr                     SnmpAdminString,
        bdifthThresholdObject                    OBJECT IDENTIFIER,
        bdifthThresholdSeverity                  BdifthThresholdSeverity,
        bdifthThresholdType                      INTEGER,
        bdifthThresholdDirection                 INTEGER,
        bdifthThresholdFiredValue                Integer32,
        bdifthThresholdClearedValue              Integer32,
        bdifthThresholdSampleInterval            Unsigned32,
        bdifthThresholdApsSwitchover             TruthValue,
        bdifthThresholdRowStatus                 RowStatus
    }

bdifthThresholdIndex OBJECT-TYPE
    SYNTAX      BdifthThresholdIndex
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An arbitrary integer that uniquely identifies a threshold in
        a threshold template.  The value for each threshold must remain
        constant when the agent's network management system is rebooted
        or re-initialized."
    ::= { bdifthThresholdEntry 1 }

bdifthThresholdDescr OBJECT-TYPE
    SYNTAX      SnmpAdminString (SIZE(0..255))
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "A description of the threshold's function and use.  The
        description must not include carriage returns."
    DEFVAL { "" }
    ::= { bdifthThresholdEntry 2 }

bdifthThresholdObject OBJECT-TYPE
    SYNTAX      OBJECT IDENTIFIER
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The object to be compared against the threshold values.
        The object must be defined in a table indexed only by ifIndex.
        All of the instance portion of the object identifier is
        truncated, since the instance(s) to be compared against
        the threshold are identified using the
        bdifthTemplateIfAssignTable.

        If the object has syntax 'Integer32', 'Unsigned32', or
        'Gauge32', then bdifthThresholdType should be set to
        'absoluteValue'.  If the object has syntax 'Counter32' or
        'Counter64', then bdifthThresholdType should be set to
        'deltaValue' or 'rateOfIncreaseExponentXIfSpeed'."
    ::= { bdifthThresholdEntry 3 }

bdifthThresholdSeverity OBJECT-TYPE
    SYNTAX      BdifthThresholdSeverity
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object specifies the severity associated with the
        condition when the threshold is exceeded."
    ::= { bdifthThresholdEntry 4 }

bdifthThresholdType OBJECT-TYPE
    SYNTAX      INTEGER {
                    absoluteValue(1),
                    deltaValue(2),
                    rateOfIncreaseExponentXIfSpeed(3)
                }
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The manner in which to compare bdifthThresholdObject to
        bdifthThresholdFiredValue and bdifthThresholdClearedValue.

        The value 'absoluteValue' indicates that the value of
        bdifthThresholdObject is to be compared directly to
        bdifthThresholdFiredValue or bdifthThresholdClearedValue.
        
        The value 'deltaValue' indicates that the difference between
        two successive samples of bdifthThresholdObject is to be
        compared to bdifthThresholdFiredValue or
        bdifthThresholdClearedValue.  The polling interval between
        successive samples is defined in bdifthThresholdSampleInterval.
        
        The value 'rateOfIncreaseExponentXIfSpeed' indicates that the
        rate of increase of bdifthThresholdObject is to be compared to
        the negated value of bdifthThresholdFiredValue used as the
        exponent of 10, times the value of ifSpeed (if the value of
        ifSpeed is less than the maximum value) or ifHighSpeed
        (otherwise).  For example, a value of bdifthThresholdFiredValue
        of 5 on a gigabit ethernet interface indicates a threshold of
        10^-5 times the interface speed, which is equal to 10,000 per
        second.  When the value of this object is
        'rateOfIncreaseExponentXIfSpeed', the polling interval between
        successive samples is determined automatically by the agent.

        When the object identified by bdifthThresholdObject is a
        counter, a threshold type of 'deltaValue' or
        'rateOfIncreaseExponentXIfSpeed' should be used.  When the
        object identified by bdifthThresholdObject is not a counter, a
        threshold type of 'absoluteValue' should be used."
    ::= { bdifthThresholdEntry 5 }

bdifthThresholdDirection OBJECT-TYPE
    SYNTAX      INTEGER {
                    rising(1),
                    falling(2)
                }
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object indicates which direction of movement causes the
        threshold to fire.

        The value 'rising' indicates that the threshold is fired when
        the current sampled value is numerically greater than or equal
        to the value of bdifthThresholdFiredValue, and the threshold was
        considered to be cleared at the last sampling interval.  If the
        value of the corresponding bdifthTemplateNotifyHoldDownType
        object is 'fireAndClearThresholds', the threshold is cleared
        when the current sampled value is less than the value of
        bdifthThresholdClearedValue, and the threshold was considered to
        be fired at the last sampling interval.  If the value of the
        corresponding bdifthTemplateNotifyHoldDownType object is other
        than 'fireAndClearThresholds', the threshold is cleared when
        the current sampled value is less than the value of
        bdifthThresholdFiredValue, and the threshold was considered to
        be fired at the last sampling interval.

        The value 'falling' indicates that the threshold is fired when
        the current sampled value is numerically less than or equal to
        the value of bdifthThresholdFiredValue, and the threshold was
        considered to be cleared at the last sampling interval.  If the
        value of the corresponding bdifthTemplateNotifyHoldDownType
        object is 'fireAndClearThresholds', the threshold is cleared
        when the current sampled value is greater than the value of
        bdifthThresholdClearedValue, and the threshold was considered to
        be fired at the last sampling interval.  If the value of the
        corresponding bdifthTemplateNotifyHoldDownType object is other
        than 'fireAndClearThresholds', the threshold is cleared when
        the current sampled value is greater than the value of
        bdifthThresholdFiredValue, and the threshold was considered to
        be fired at the last sampling interval."
    DEFVAL { rising }
    ::= { bdifthThresholdEntry 6 }

bdifthThresholdFiredValue OBJECT-TYPE
    SYNTAX      Integer32 (-2147483648..2147483647)
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "A threshold value to check against the object identified in
        bdifthThresholdObject.  If the value of bdifthThresholdDirection
        is 'rising', then the threshold is fired when the current
        sampled value (absolute, delta, or rate of increase, depending
        on the value of bdifthThresholdType) of the object identified in
        bdifthThresholdObject is greater than or equal to this value.
        If the value of bdifthThresholdDirection is 'falling', then the
        threshold is fired when the current sampled value (absolute,
        delta, or rate of increase, depending on the value of
        bdifthThresholdType) of the object identified in
        bdifthThresholdObject is less than or equal to this value."
    ::= { bdifthThresholdEntry 7 }

bdifthThresholdClearedValue OBJECT-TYPE
    SYNTAX      Integer32 (-2147483648..2147483647)
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "A threshold value to check against the object identified in
        bdifthThresholdObject.  If the value of bdifthThresholdDirection
        is 'rising', then the threshold is cleared when the current
        sampled value (absolute, delta, or rate of increase, depending
        on the value of bdifthThresholdType) of the object identified in
        bdifthThresholdObject is less than this value.  If the value of
        bdifthThresholdDirection is 'falling', then the threshold is
        cleared when the current sampled value (absolute, delta, or
        rate of increase, depending on the value of bdifthThresholdType)
        of the object identified in bdifthThresholdObject is greater
        than this value.

        This object is instantiated only when the value of
        bdifthTemplateNotifyHoldDownType in the bdifthTemplateEntry with
        the same value of bdifthTemplateIndex is
        'fireAndClearThresholds'."
    ::= { bdifthThresholdEntry 8 }

bdifthThresholdSampleInterval OBJECT-TYPE
    SYNTAX      Unsigned32 (5..900000)
    UNITS       "milliseconds"
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The number of milliseconds to wait between samples of the
        object identified in bdifthThresholdObject.  To encourage
        consistency in sampling, the interval is measured from the
        beginning of one check to the beginning of the next and the
        timer is restarted immediately when it expires, not when the
        check completes.

        This object is not instantiated when the value of
        bdifthThresholdType is 'rateOfIncreaseExponentXIfSpeed'."
    ::= { bdifthThresholdEntry 9 }

bdifthThresholdApsSwitchover OBJECT-TYPE
    SYNTAX      TruthValue
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object indicates whether automatic protection switching
        (APS) switchover should be triggered, if applicable, when the
        threshold is fired.  The value of this object takes effect when
        the template identified by bdifthTemplateIndex is assigned to an
        interface that is part of an APS group.  One way to configure
        an interface in an APS group is using the cApsChanConfigTable
        in the BDCOM-APS-MIB."
    DEFVAL { false }
    ::= { bdifthThresholdEntry 10 }

bdifthThresholdRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object is used to create and delete thresholds in
        templates.

        A new entry can only be created when there is an active entry
        in the bdifthTemplateTable with the same value of
        bdifthTemplateIndex.  The values of bdifthThresholdObject,
        bdifthThresholdSeverity, bdifthThresholdType, and
        bdifthThresholdFiredValue must be provided before activating the
        entry.  If the value of bdifthTemplateNotifyHoldDownType in the
        bdifthTemplateEntry with the same value of bdifthTemplateIndex is
        'fireAndClearThresholds', then the value of
        bdifthThresholdClearedValue must also be provided before
        activating the entry.  If the value of bdifthThresholdType is
        other than 'rateOfIncreaseExponentXIfSpeed', then the value of
        bdifthThresholdSampleInterval must also be provided before
        activating the entry.

        When an entry is activated, if there are any entries in
        bdifthTemplateIfAssignTable with the same value of
        bdifthTemplateIndex, then the threshold is activated on all
        interfaces identified in those entries that have instances of
        the object identified by bdifthThresholdObject.

        When an entry is destroyed, if there are any entries in
        bdifthTemplateIfAssignTable with the same value of
        bdifthTemplateIndex, then the threshold is de-activated on the
        interfaces identified in those entries.  If there are any
        entries in bdifthIfThresholdFiredTable with
        bdifthIfThresholdFiredTemplate value equal to this value of
        bdifthTemplateIndex, then the bit in bdifthIfThresholdsFired
        corresponding to this threshold is cleared in all such entries.

        After the entry has been activated, this object cannot be set
        to any value other than 'destroy'.  The row status never
        changes to 'notInService' after reaching the value 'active'."
    ::= { bdifthThresholdEntry 11 }


-- Interface Assignment Table

bdifthTemplateIfLastChange OBJECT-TYPE
    SYNTAX      TimeStamp
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object specifies the value of sysUpTime at the last time
        there was either a change to any object in any entry in
        bdifthTemplateIfAssignTable, or an entry was created or
        destroyed in bdifthTemplateIfAssignTable.  If no change to
        bdifthTemplateIfAssignTable has occurred since the last
        re-initialization of the local network management subsystem,
        then this object contains a zero value."
    ::= { bdifthTemplateIfAssignGroup 1 }

bdifthTemplateIfAssignTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF BdifthTemplateIfAssignEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table specifies the assignment of threshold templates to
        specific interfaces.  Each threshold template may be assigned
        to multiple interfaces.  Each interface may have multiple
        threshold templates assigned to it."
    ::= { bdifthTemplateIfAssignGroup 2 }

bdifthTemplateIfAssignEntry OBJECT-TYPE
    SYNTAX      BdifthTemplateIfAssignEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry describing the assignment of a particular threshold
        template to a particular interface.  The entry is created using
        the bdifthTemplateIfAssignRowStatus object."
    INDEX { bdifthTemplateIndex, bdifthTemplateIfAssignInterface }
    ::= { bdifthTemplateIfAssignTable 1 }

BdifthTemplateIfAssignEntry ::=
    SEQUENCE {
        bdifthTemplateIfAssignInterface          InterfaceIndex,
        bdifthTemplateIfAssignOperStatus         INTEGER,
        bdifthTemplateIfAssignRowStatus          RowStatus
    }

bdifthTemplateIfAssignInterface OBJECT-TYPE
    SYNTAX      InterfaceIndex
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This object identifies an interface to which the template
        is assigned."
    ::= { bdifthTemplateIfAssignEntry 1 }

bdifthTemplateIfAssignOperStatus OBJECT-TYPE
    SYNTAX      INTEGER {
                    up(1),
                    down(2)
                }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object indicates whether the threshold template
        identified by bdifthTemplateIndex is operational on the
        interface identified by bdifthTemplateIfAssignInterface.

        When the value of this object is 'up', this indicates that
        the thresholds in this template (identified by
        bdifthTemplateIndex) are activated on this interface, with the
        following exception:  If a threshold is defined on an object
        that does not have an instance for this interface, then the
        threshold is not activated on this interface.  If any of the
        thresholds are being exceeded, then a corresponding entry
        exists in the bdifthIfThresholdFiredTable.

        When the value of this object is 'down', this indicates that
        all thresholds in the template are de-activated on this
        interface and there is no corresponding entry in the
        bdifthIfThresholdFiredTable, regardless of whether any of the
        thresholds in the template are being exceeded on this
        interface.

        One reason for a template not to be operational on an
        interface to which it is assigned is when the interface has two
        (or more) templates assigned to it that contain thresholds on
        the same object with the same severity and direction, i.e.,
        thresholds with the same values of bdifthThresholdObject,
        bdifthThresholdSeverity, and bdifthThresholdDirection.  This may
        occur when a template is assigned to the interface, or when a
        threshold is added to a template that is already active on the
        interface.  When this occurs, the implementation may operate on
        both (or all) threshold values, or it may take down one (or
        more) of the templates on this interface, which is indicated by
        changing the value of this object from 'up' to 'down'."
    ::= { bdifthTemplateIfAssignEntry 2 }

bdifthTemplateIfAssignRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object is used to create and delete entries in the table,
        assigning templates to interfaces and removing templates from
        interfaces, respectively.

        A new entry can only be created when there is an active entry
        in the bdifthTemplateTable with the same value of
        bdifthTemplateIndex.

        When an entry is activated, the thresholds in this template
        (identified by bdifthTemplateIndex) are activated on this
        interface, with the following exception:  If a threshold is
        defined on an object that does not have an instance for this
        interface, then the threshold is not activated on this
        interface.

        When an entry is destroyed, all thresholds in the template are
        de-activated on this interface and the corresponding entry in
        the bdifthIfThresholdFiredTable is deleted, if it exists.

        After the entry has been activated, this object cannot be set
        to any value other than 'destroy'.  The row status never
        changes to 'notInService' after reaching the value 'active'."
    ::= { bdifthTemplateIfAssignEntry 3 }


-- Interface Threshold Fired Group

bdifthThresholdFiredNotifyEnable OBJECT-TYPE
    SYNTAX      BdifthThresholdSeverityOrZero
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "This object specifies the minimum severity threshold governing
        the generation of bdifthIfThresholdFired and
        bdifthIfThresholdCleared notifications.  For example, if the
        value of this object is set to 'degrade', then the agent
        generates these notifications if and only if the severity of
        the threshold being exceeded is 'degrade' or 'fail'.  When the
        value is other than '0', the generation of
        bdifthTemplateIfStatusChange notifications is also enabled.  The
        value of '0' disables the generation of all notifications.  By
        default, the value of this object is set to '0'."
    ::= { bdifthIfThresholdFiredGroup 1 }

bdifthThresholdFiredLastChange OBJECT-TYPE
    SYNTAX      TimeStamp
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object specifies the value of sysUpTime at the last time
        there was either a change to any object in any entry in
        bdifthIfThresholdFiredTable, or an entry was added or deleted in
        bdifthIfThresholdFiredTable.  If no change to
        bdifthIfThresholdFiredTable has occurred since the last
        re-initialization of the local network management subsystem,
        then this object contains a zero value."
    ::= { bdifthIfThresholdFiredGroup 2 }

bdifthIfThresholdFiredTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF BdifthIfThresholdFiredEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table indicates the interfaces that currently have
        threshold fired conditions."
    ::= { bdifthIfThresholdFiredGroup 3 }

bdifthIfThresholdFiredEntry OBJECT-TYPE
    SYNTAX      BdifthIfThresholdFiredEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry indicating an interface that currently has one or
        more threshold fired conditions based on one template."
    INDEX { ifIndex, bdifthIfThresholdFiredTemplate }
    ::= { bdifthIfThresholdFiredTable 1 }

BdifthIfThresholdFiredEntry ::=
    SEQUENCE {
        bdifthIfThresholdFiredTemplate           BdifthTemplateIndex,
        bdifthIfThresholdsFired                  BdifthThresholdList,
        bdifthIfLastThresholdFired               BdifthThresholdIndex,
        bdifthIfThresholdFiredLstChange          TimeStamp,
        bdifthIfThresholdFiredLstSeverity        BdifthThresholdSeverity,
        bdifthIfThresholdFiredMaxSeverity        BdifthThresholdSeverity
    }

bdifthIfThresholdFiredTemplate OBJECT-TYPE
    SYNTAX      BdifthTemplateIndex
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This object specifies a template for which one or more of the
        thresholds are fired on this interface."
    ::= { bdifthIfThresholdFiredEntry 1 }

bdifthIfThresholdsFired OBJECT-TYPE
    SYNTAX      BdifthThresholdList
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object specifies those thresholds that are currently
        being exceeded on this interface.

        If a threshold is currently being exceeded (i.e., the threshold
        is fired) on the interface, then the corresponding bit in the
        threshold list is set to one.  Otherwise, the bit will be set
        to zero, or the bit will not be present.  Only the first N
        octets are present in the threshold list, such that the highest
        octet present has at least one bit set to '1'.  All higher
        octets with value '0' are truncated."
    ::= { bdifthIfThresholdFiredEntry 2 }

bdifthIfLastThresholdFired OBJECT-TYPE
    SYNTAX      BdifthThresholdIndex
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object specifies the last threshold fired or cleared on
        the interface."
    ::= { bdifthIfThresholdFiredEntry 3 }

bdifthIfThresholdFiredLstChange OBJECT-TYPE
    SYNTAX      TimeStamp
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object specifies the value of sysUpTime at the last time
        a threshold was fired or cleared on the interface."
    ::= { bdifthIfThresholdFiredEntry 4 }

bdifthIfThresholdFiredLstSeverity OBJECT-TYPE
    SYNTAX      BdifthThresholdSeverity
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object specifies the severity of the threshold that was
        last fired or cleared on the interface."
    ::= { bdifthIfThresholdFiredEntry 5 }

bdifthIfThresholdFiredMaxSeverity OBJECT-TYPE
    SYNTAX      BdifthThresholdSeverity
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object specifies the highest severity among the
        thresholds that are currently being exceeded on this
        interface."
    ::= { bdifthIfThresholdFiredEntry 6 }


-- Notifications

bdIfThresholdMIBNotifications OBJECT IDENTIFIER
                                ::= { bdcomIfThresholdMIB 2 }
bdifthMIBNotificationsPrefix OBJECT IDENTIFIER
                                ::= { bdIfThresholdMIBNotifications 0 }

bdifthIfThresholdFired NOTIFICATION-TYPE
    OBJECTS {
        bdifthIfLastThresholdFired,
        bdifthIfThresholdFiredLstChange,
        bdifthIfThresholdFiredLstSeverity
    }
    STATUS      current
    DESCRIPTION
        "The agent generates this notification when a threshold defined
        in a template is asserted on an interface.

        If a threshold is asserted for a given interface and template,
        bdifthTemplateNotifyHoldDownTime is set to 'holdDownTimer' for
        that template, and this notification has recently been sent for
        the same threshold on the same interface, then this
        notification may be suppressed."
    ::= { bdifthMIBNotificationsPrefix 1 }

bdifthIfThresholdCleared NOTIFICATION-TYPE
    OBJECTS {
        bdifthIfLastThresholdFired,
        bdifthIfThresholdFiredLstChange,
        bdifthIfThresholdFiredLstSeverity
    }
    STATUS      current
    DESCRIPTION
        "The agent generates this notification when a threshold, that
        has previously fired, is cleared on an interface.

        If a threshold is cleared for a given interface and template,
        bdifthTemplateNotifyHoldDownTime is set to 'holdDownTimer' for
        that template, and this notification has recently been sent for
        the same threshold on the same interface, then this
        notification may be suppressed."
    ::= { bdifthMIBNotificationsPrefix 2 }

bdifthTemplateIfStatusChange NOTIFICATION-TYPE
    OBJECTS {
        bdifthTemplateIfAssignOperStatus
    }
    STATUS      current
    DESCRIPTION
        "The agent generates this notification when a template comes up
        or goes down on an interface to which it is assigned, i.e.,
        when the value of bdifthTemplateIfAssignOperStatus changes.  If
        a template becomes operationally down on an interface upon
        activation of a new entry in the bdifthTemplateIfAssignTable,
        the agent generates this notification.  The agent need not
        generate this notification when a new entry in the
        bdifthTemplateIfAssignTable is activated, if the template
        becomes operational on the interface.  The agent need not
        generate this notification when an entry in the
        bdifthTemplateIfAssignTable is destroyed."
    ::= { bdifthMIBNotificationsPrefix 3 }


-- Conformance Information

bdIfThresholdMIBConformance OBJECT IDENTIFIER
                                ::= { bdcomIfThresholdMIB 3 }
bdIfThresholdMIBCompliances OBJECT IDENTIFIER
                                ::= { bdIfThresholdMIBConformance 1 }
bdIfThresholdMIBGroups OBJECT IDENTIFIER
                                ::= { bdIfThresholdMIBConformance 2 }

-- Compliance Statement

bdIfThresholdMIBCompliance MODULE-COMPLIANCE
    STATUS      current
    DESCRIPTION
        "The compliance statement for entities that implement the BDCOM
        Interface Threshold MIB."
    MODULE   -- this module
        MANDATORY-GROUPS {
            bdIfThresholdTemplateGroup,
            bdIfThresholdFiredGroup,
            bdIfThresholdNotifsGroup
        }

        OBJECT      bdifthTemplateNotifyHoldDownType
        DESCRIPTION
            "At least one of the codepoints 'holdDownTimer' and
            'fireAndClearThresholds' must be supported."

        GROUP       bdifthHoldDownTimerGroup
        DESCRIPTION
            "This group is required only for entities that support
            suppression of excess notifications in a short time
            interval based on a timer, i.e., systems that support the
            bdifthTemplateNotifyHoldDownType value 'holdDownTimer'. At
            least one of this group and
            bdifthHoldDownHysteresisGroup must be supported."

        GROUP       bdifthHoldDownHysteresisGroup
        DESCRIPTION
            "This group is required only for entities that prevent
            excess notifications in a short time interval by using
            hysteresis, i.e., systems that support the
            bdifthTemplateNotifyHoldDownType value
            'fireAndClearThresholds'. At least one of this group and
            bdifthHoldDownTimerGroup must be supported."

        OBJECT      bdifthThresholdType
        DESCRIPTION
            "At least one of the codepoints 'deltaValue' and
            'rateOfIncreaseExponentXIfSpeed' must be supported."

        GROUP       bdifthApsGroup
        DESCRIPTION
            "This group is required only for entities that support the
            BDCOM Interface Threshold MIB and support triggering of
            automatic protection switching (APS) based on thresholds of
            interface counters."

        GROUP       bdifthTemplateIfNotifsGroup
        DESCRIPTION
            "This group is required only for entities that do not allow
            multiple threshold values (in different threshold
            templates) of the same severity and direction on the same
            object to be applied on one interface."

    ::= { bdIfThresholdMIBCompliances 1 }


-- Units of Conformance

bdIfThresholdTemplateGroup OBJECT-GROUP
    OBJECTS {
        bdifthTemplateIndexNext,
        bdifthTemplateLastChange,
        bdifthTemplateName,
        bdifthTemplateNotifyHoldDownType,
        bdifthTemplateRowStatus,
        bdifthThresholdLastChange,
        bdifthThresholdDescr,
        bdifthThresholdObject,
        bdifthThresholdSeverity,
        bdifthThresholdType,
        bdifthThresholdDirection,
        bdifthThresholdFiredValue,
        bdifthThresholdSampleInterval,
        bdifthThresholdRowStatus,
        bdifthTemplateIfLastChange,
        bdifthTemplateIfAssignOperStatus,
        bdifthTemplateIfAssignRowStatus
    }
    STATUS      current
    DESCRIPTION
        "A collection of mandatory managed objects for configuration of
        threshold templates."
    ::= { bdIfThresholdMIBGroups 1 }

bdIfThresholdFiredGroup OBJECT-GROUP
    OBJECTS {
        bdifthThresholdFiredNotifyEnable,
        bdifthThresholdFiredLastChange,
        bdifthIfThresholdsFired,
        bdifthIfLastThresholdFired,
        bdifthIfThresholdFiredLstChange,
        bdifthIfThresholdFiredLstSeverity,
        bdifthIfThresholdFiredMaxSeverity 
    }
    STATUS      current
    DESCRIPTION
        "A collection of mandatory managed objects for monitoring
        interfaces where thresholds have been exceeded."
    ::= { bdIfThresholdMIBGroups 2 }

bdifthHoldDownTimerGroup OBJECT-GROUP
    OBJECTS {
        bdifthTemplateNotifyHoldDownTime
    }
    STATUS      current
    DESCRIPTION
        "A collection of managed objects for configuration of
        a timer-based mechanism for suppression of excess notifications
        in a short time interval."
    ::= { bdIfThresholdMIBGroups 3 }

bdifthHoldDownHysteresisGroup OBJECT-GROUP
    OBJECTS {
        bdifthThresholdClearedValue
    }
    STATUS      current
    DESCRIPTION
        "A collection of managed objects for configuration of
        threshold values used to assert that the threshold is no longer
        being exceeded. These objects are part of the hysteresis
        mechanism used to prevent excess notifications in a short time
        interval."
    ::= { bdIfThresholdMIBGroups 4 }

bdifthApsGroup OBJECT-GROUP
    OBJECTS {
        bdifthThresholdApsSwitchover
    }
    STATUS      current
    DESCRIPTION
        "A collection of managed objects for configuration of APS
        switchover triggers based on interface thresholds."
    ::= { bdIfThresholdMIBGroups 5 }

bdIfThresholdNotifsGroup NOTIFICATION-GROUP
    NOTIFICATIONS {
        bdifthIfThresholdFired,
        bdifthIfThresholdCleared
    }
    STATUS      current
    DESCRIPTION
        "A collection of notifications generated when an interface has
        a threshold fired or a threshold cleared condition."
   ::= { bdIfThresholdMIBGroups 6 }

bdifthTemplateIfNotifsGroup NOTIFICATION-GROUP
    NOTIFICATIONS {
        bdifthTemplateIfStatusChange
    }
    STATUS      current
    DESCRIPTION
        "A collection of notifications related to the assignment of
        templates to interfaces."
   ::= { bdIfThresholdMIBGroups 7 }


END

