Subject: JMP> [Fwd: Expression MIB]

From: Randy Turner <[email-masked]>
Date: Fri, 04 Apr 1997 14:29:52 -0800

-- 
Randy Turner
Network Architect
Sharp Laboratories of America
[email-masked]

Subject: Expression MIB
From: Bob Stewart <[email-masked]>
To: Distributed Management WG <[email-masked]>
Date: Wed, 2 Apr 1997 08:16:42 -0500

Internet Draft               Expression MIB                26 March 1997

                             Expression MIB

                             26 March 1997

                 draft-ietf-disman-express-mib-00.txt

                              Bob Stewart
                          Cisco Systems, Inc.
                           [email-masked]

                          Status of this Memo

This document is an Internet-Draft.  Internet-Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas, and
its working groups.  Note that other groups may also distribute working
documents as Internet-Drafts.

Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time.  It is inappropriate to use Internet- Drafts as reference material
or to cite them other than as ``work in progress.''

To learn the current status of any Internet-Draft, please check the
``1id-abstracts.txt'' listing contained in the Internet- Drafts Shadow
Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe),
ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).

Expires 26 March 1997+6 months                                  [Page 1]


Internet Draft               Expression MIB                26 March 1997

1.  Abstract

This memo defines an experimental portion of the Management Information
Base (MIB) for use with network management protocols in the Internet
community.  In particular, it describes managed objects used for
managing expressions of MIB objects.

Expires 26 March 1997+6 months                                  [Page 2]


Internet Draft               Expression MIB                26 March 1997

2.  The SNMP Network Management Framework

They are: The SNMP Network Management Framework presently consists of
three major components.  They are:

  the SMI, described in RFC 1902 [1] - the mechanisms used for
  describing and naming objects for the purpose of management.

  the MIB-II, STD 17, RFC 1213 [2] - the core set of managed objects for
  the Internet suite of protocols.

  the protocol, RFC 1157 [3] and/or RFC 1905 [4], - the protocol for
  accessing managed objects.

The Framework permits new objects to be defined for the purpose of
experimentation and evaluation.

2.1.  Object Definitions

Managed objects are accessed via a virtual information store, termed the
Management Information Base or MIB.  Objects in the MIB are defined
using the subset of Abstract Syntax Notation One (ASN.1) defined in the
SMI.  In particular, each object type is named by an OBJECT IDENTIFIER,
an administratively assigned name.  The object type together with an
object instance serves to uniquely identify a specific instantiation of
the object.  For human convenience, we often use a textual string,
termed the descriptor, to refer to the object type.

Expires 26 March 1997+6 months                                  [Page 3]


Internet Draft               Expression MIB                26 March 1997

3.  Overview

The MIB was designed around the basic premise that an evaluated
expression should result in a MIB object that appears no different from
any other and is thus usable anywhere any other MIB object can be used,
whether by a management application directly or via another MIB.

Note that the operation of this MIB depends on the ability to use OID
fragments, that is, a part of an OID that may be missing the usual
prefix starting with iso. It is the opinion of the author that such a
use is legitimate even if it violates some pure definition of ASN.1,
since SNMP's use of ASN.1 is colloquial, not standard. The more
important test is whether implementations can readily handle such OID
fragments, and I believe they should be able to.

Expires 26 March 1997+6 months                                  [Page 4]


Internet Draft               Expression MIB                26 March 1997

4.  Definitions

EXPRESSION-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE,
    experimental, Integer32, Unsigned32 FROM SNMPv2-SMI
    TEXTUAL-CONVENTION, RowStatus,
    AutonomousType, DisplayString,      FROM SNMPv2-TC
    MODULE-COMPLIANCE, OBJECT-GROUP     FROM SNMPv2-CONF

expressionMIB MODULE-IDENTITY
    LAST-UPDATED "9703141700Z"
    ORGANIZATION "IETF Distributed Management Working Group"
    CONTACT-INFO "Bob Stewart
                  Cisco Systems, Inc.
                  170 West Tasman Drive,
                  San Jose CA 95134-1706.
                  Phone: +1 408 526 4527
                  Email: [email-masked]"
    DESCRIPTION
        "The MIB module for defining expressions of MIB objects
        for network management purposes."
    ::= { experimental xx }

ExpressionName ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "An identification for an expression.  An ExpressionName
        corresponds one-to-one to an ExpressionIndex.

        This is the reliable identification of an expression,
        subject to change only by administrative request."
    SYNTAX      DisplayString (SIZE (1..64))

ExpressionIndex ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "An integer shorthand identification for an expression.
        An ExpressionIndex corresponds one-to-one to an
        ExpressionName.

        A system may change the value of an ExpressionIndex
        when it is reinitialized but must correct all references
        to that ExpressionIndex."

Expires 26 March 1997+6 months                                  [Page 5]


Internet Draft               Expression MIB                26 March 1997

    SYNTAX      Unsigned32 (1..4294967295)

ExpressionIndexOrZero ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "Either an ExpressionIndex or zero.  The meaning of zero
        depends on the DESCRIPTION of the object."
    SYNTAX      Unsigned32 (0..4294967295)

expressionMIBObjects OBJECT IDENTIFIER ::= { expressionMIB 1 }

expCreate       OBJECT IDENTIFIER ::= { expressionMIBObjects 1 }
expDefine       OBJECT IDENTIFIER ::= { expressionMIBObjects 2 }
expValue        OBJECT IDENTIFIER ::= { expressionMIBObjects 3 }

--
-- Creation Table
--

expCreateLastChange OBJECT-TYPE
    SYNTAX      TimeStamp
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The value of sysUpTime the last time an expression was
        created or deleted or had its name changed using
        expExpressionName."
    ::= { expCreate 1 }

expCreateTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF ExpCreateEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table of expression names, for creating and deleting
        expressions."
    ::= { expCreate 2 }

expCreateEntry OBJECT-TYPE
    SYNTAX      ExpCreateEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Information about a single expression. New expressions

Expires 26 March 1997+6 months                                  [Page 6]


Internet Draft               Expression MIB                26 March 1997

        can be created using expCreateStatus.

        To create an expression create the named entry in this
        table and activate it with RowStatus.  Then use
        expExpressionIndex to populate expExpressionTable
        expObjectTable.

        Deleting an entry deletes all related entries in
        expExpressionTable and expObjectTable."
    INDEX       { IMPLIED expExpressionName }
    ::= { expCreateTable 1 }

ExpCreateEntry ::= SEQUENCE {
    expCreateName                 ExpressionName,
    expExpressionIndex            ExpressionIndex,
    expCreateStatus               RowStatus
}

expCreateName OBJECT-TYPE
    SYNTAX      ExpressionName
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The name of the expression.  Choosing names with useful
        lexical ordering supports using GetNext or GetBulk to
        retrieve a useful subset of the table."
    ::= { expCreateEntry 1 }

expExpressionIndex OBJECT-TYPE
    SYNTAX      ExpressionIndex
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The numeric identification of the expression."
    ::= { expCreateEntry 2 }

expCreateStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The control that allows creation/deletion of entries.

        Activate the entry then use expExpressionIndex to
        define the expression in expExpressionTable."

Expires 26 March 1997+6 months                                  [Page 7]


Internet Draft               Expression MIB                26 March 1997

    ::= { expCreateEntry 3 }

--
-- Expression Definition Table
--

expExpressionTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF ExpExpressionEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table of expression definitions."
    ::= { expDefine 1 }

expExpressionEntry OBJECT-TYPE
    SYNTAX      ExpExpressionEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Information about a single expression. An entry appears in
        this table when an expCreateEntry is activated. Deleting the
        matching expCreateEntry deletes this entry and its
        associated expObjectTable entries."
    INDEX       { expExpressionIndex }
    ::= { expExpressionTable 1 }

ExpExpressionEntry ::= SEQUENCE {
    expExpressionName   ExpressionName,
    expExpression              DisplayString,
    expExpressionComment       DisplayString,
    expExpressionPrefix OBJECT IDENIFIER
}

expExpressionName OBJECT-TYPE
    SYNTAX      ExpressionName
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The unique name of the expression, the same as
        expCreateName.

        Use this object to change the expression's name without
        changing its expExpressionIndex."
    ::= { expExpressionEntry 1 }

Expires 26 March 1997+6 months                                  [Page 8]


Internet Draft               Expression MIB                26 March 1997

expExpression OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (1..1024))
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The expression to be evaluated.  Except for the variable
        names the expression is in ANSI C syntax.  ANSI C operators
        and functions are allowed only if explicitly listed here.

        Variables are expressed as a dollar sign ('$') and an
        integer that corresponds to an expObjectIndex.  An
        example of a valid expression is:

                ($1-$5)*100

        The only operators and functions allowed are:

                ( )
                + - * /
                & | ^ << >> ~
                ! && || == != > >= < <=

        Integer-typed object are treated as 32- or 64-bit, signed
        or unsigned integers, as appropriate.  The results of
        mixing them are as for ANSI C.

        OCTET STRINGS and OBJECT IDENTIFIERs are treated as arrays of
        unsigned 8-bit integers and unsigned 32-bit integers,
        respectively.

        A short list of array handling functions for comparing and
        masking are to be defined.

        Conditional expressions result in a 32-bit, unsigned integer
        of value 0 for false or 1 for true. When an arbitrary value
        is used in a boolean expression 0 is false and non-zero is
        true."
    DEFVAL      { ''H }
    ::= { expExpressionEntry 2 }

expExpressionComment OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION

Expires 26 March 1997+6 months                                  [Page 9]


Internet Draft               Expression MIB                26 March 1997

        "A comment to explain the use or meaning of the
        expression."
    DEFVAL      { ''H }
    ::= { expExpressionEntry 3 }

expExpressionPrefix OBJECT-TYPE
    SYNTAX      OBJECT IDENTIFIER
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "An object prefix to assist an application in determining
        the instance indexing to use in expValueTable, relieving the
        application of the need to scan the expObjectTable to
        determine such a prefix.

        See expObjectTable for information on wildcarded objects.

        If the expValueInstance portion of the value OID may
        be treated as a scalar (that is, normally, 0) the value of
        expExpressionPrefix is 0.0.

        Otherwise expExpressionPrefix is the value of any wildcarded
        instance of expObjectID for the expression.  This is
        sufficient as the remainder, that is, the instance fragment
        relevant to instancing the values must be the same for all
        wildcarded objects in the expression."
    ::= { expExpressionEntry 4 }

--
-- Object Table
--

expObjectTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF ExpObjectEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table of object definitions for each expExpression.

        Wildcarding instance IDs:

        It is legal to omit all or part of the instance portion for
        some or all of the objects in an expression. (See the
        DESCRIPTION of expObjectID for details. However, note that
        if more than one object in the same expression is wildcarded

Expires 26 March 1997+6 months                                 [Page 10]


Internet Draft               Expression MIB                26 March 1997

        in this way, they all must be objects where that portion of
        the instance is the same. In other words, all objects may be
        in the same SEQUENCE or in different SEQUENCEs but with the
        same semantic index value (e.g., the value of ifIndex)
        for the wildcarded portion."
    ::= { expDefine 2 }

expObjectEntry OBJECT-TYPE
    SYNTAX      ExpObjectEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Information about a object.  An application creates entries
        in this table while creating an expression."
    -- SPARSE-AUGMENTS { expExpressionEntry }
    INDEX       { expExpressionIndex, expObjectIndex }
    ::= { expObjectTable 1 }

ExpObjectEntry ::= SEQUENCE {
    expObjectIndex                  Unsigned32,
    expObjectID                     OBJECT IDENTIFIER,
    expObjectSampleType             INTEGER,
    expObjectDeltaInterval          Integer32,
    expObjectDeltaDiscontinuityID   OBJECT IDENTIFIER,
    expObjectConditional            OBJECT IDENTIFIER,
    expObjectStatus                 RowStatus
}

expObjectIndex OBJECT-TYPE
    SYNTAX      Unsigned32 (1..4294967295)
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A unique, numeric identification for an object.  Prefixed
        with a dollar sign ('$') this is used to reference the
        object in the corresponding expExpression."
    ::= { expObjectEntry 1 }

expObjectID OBJECT-TYPE
    SYNTAX      OBJECT IDENTIFIER
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The OBJECT IDENTIFIER (OID) of this object. Note that this
        can be the OID of a leaf object in a MIB (e.g., ifInOctets.1

Expires 26 March 1997+6 months                                 [Page 11]


Internet Draft               Expression MIB                26 March 1997

        or sysUpTime.0). The OID may be fully qualified, meaning it
        includes an instance identifier part, or it may not be fully
        qualified, meaning it may lack all or part of the instance
        identifier. If the expObjectID is not fully qualified, then
        the value of the expression will be multiple values, as if
        done for a GetNext sweep of the object."
    ::= { expObjectEntry 2 }

expObjectSampleType OBJECT-TYPE
    SYNTAX      INTEGER {
                    absoluteValue(1),
                    deltaValue(2)
                }
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The method of sampling the selected variable."
    DEFVAL      { absoluteValue }
    ::= { expObjectEntry 3 }

expObjectDeltaInterval OBJECT-TYPE
    SYNTAX      Integer32 (0..86400)
    UNITS       "seconds"
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "Sampling interval for objects with expObjectSampleType
        'deltaValue'.

        This object is not instantiated if not applicable.

        A value of 0 indicates no automated sampling.  In this case
        the delta is the difference from the last time the expression
        was evaluated.  Note that this is subject to unpredictable
        delta times in the face of retries or multiple managers.

        A value greater than zero is the number of seconds between
        automated samples.

        Until the delta interval has expired once the delta for the
        object is effectively not instantiated and evaluating
        the expression has results as if the object itself were not
        instantiated.

        Note that delta values potentially consume large amounts of

Expires 26 March 1997+6 months                                 [Page 12]


Internet Draft               Expression MIB                26 March 1997

        system CPU and memory.  Delta state and processing must
        continue constantly even if the expression is not being used.
        For wildcarded objects this can be substantial overhead."
    DEFVAL      { 0 }
    ::= { expObjectEntry 4 }

expObjectDeltaDiscontinuityID OBJECT-TYPE
    SYNTAX      OBJECT IDENTIFIER
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The OBJECT IDENTIFIER (OID) of a TimeTicks object that
        indicates a discontinuity in the value at expObjectID.

        This object is not instantiated if not applicable.

        The OID may be for a leaf object (e.g. sysUpTime.0) or may
        be wildcarded to match expObjectID.
    DEFVAL      { 0 0 }
    ::= { expObjectEntry 5 }

expObjectConditional OBJECT-TYPE
    SYNTAX      OBJECT IDENTIFIER
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The OBJECT IDENTIFIER (OID) of an object that overrides
        whether the instance of expObjectID is to be considered
        usable.  If the value of the object at expObjectConditional
        is 0, the object at expObjectID is treated as if it is not
        instantiated, otherwise it is treated as usual.

        The OID may be for a leaf object (e.g. sysUpTime.0) or may
        be wildcarded to match expObjectID.
    DEFVAL      { 0 0 }
    ::= { expObjectEntry 5 }

expObjectStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The control that allows creation/deletion of entries."
    ::= { expObjectEntry 7 }

Expires 26 March 1997+6 months                                 [Page 13]


Internet Draft               Expression MIB                26 March 1997

--
-- Expression Value Table
--

expValueTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF ExpValueEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table of values from evaluated expressions."
    ::= { expValue 1 }

expValueEntry OBJECT-TYPE
    SYNTAX      ExpValueEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A single value from an evaluated expression.  For a given
        instance, only one "Val" object in the conceptual row will
        be instantiated, that is, the one with the appropriate type
        for the value.  Reading a value from the table causes the
        evaluation of the expression for that value.

        If in the attempt to evaluate the expression one or more
        of the necessary objects is not available, the corresponding
        entry in this table is effectively not instantiated."
    INDEX       { expExpressionIndex,
                  expValueInstance }
    ::= { expValueTable 1 }

ExpValueEntry ::= SEQUENCE {
    expValueInstance          OBJECT IDENTIFIER,
    expValueType              INTEGER,
    expValueUnsigned32Val     Unsigned32,
    expValueInteger32Val      Integer32,
    expValueOctetStringVal    OCTET STRING,
    expValueOidVal            OBJECT IDENTIFIER,
    expValueCounter64Val      Counter64
}

expValueInstance OBJECT-TYPE
    SYNTAX      OBJECT IDENTIFIER,
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION

Expires 26 March 1997+6 months                                 [Page 14]


Internet Draft               Expression MIB                26 March 1997

        "The final instance portion of a value's OID according to
        the wildcarding in instances of expObjectID for the
        expression.

        If there is no wildcarding, the value is 0.0.

        If there is wildcarding, the value is 0.0 followed by
        a value that the wildcard can take, thus defining one value
        instance for each real, possible value of the wildcard.
        So, for example, if the wildcard worked out to be an ifIndex,
        there is an expValueInstance for each applicable ifIndex."
    ::= { expValueEntry 1 }

expValueType OBJECT-TYPE
    SYNTAX      INTEGER { counter32(1), unsignedOrGauge32(2),
                          timeTicks(3), integer32(4), ipAddress(5),
                          octetString(6), objectId(7), counter64(8) }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The type of the value. One and only one of the value
        objects that follow will be valid based on this type."
    ::= { expValueEntry 2 }

expValueUnsigned32Val OBJECT-TYPE
    SYNTAX      Unsigned32 -- (0..4294967295)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The value when expValueType is one of 'counter32',
        'unsignedOrGauge32', or 'timeTicks'."
    ::= { expValueEntry 3 }

expValueInteger32Val OBJECT-TYPE
    SYNTAX      Integer32 -- (-2147483648..2147483647)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The value when expValueType is 'integer32'."
    ::= { expValueEntry 4 }

expValueOctetStringVal OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE (0..65536))
    MAX-ACCESS  read-only
    STATUS      current

Expires 26 March 1997+6 months                                 [Page 15]


Internet Draft               Expression MIB                26 March 1997

    DESCRIPTION
        "The value when expValueType is 'ipAddress' or
        'octetString'."
    ::= { expValueEntry 5 }

expValueOidVal OBJECT-TYPE
    SYNTAX      OBJECT IDENTIFIER
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The value when expValueType is 'objectId'."
    ::= { expValueEntry 6 }

expValueCounter64Val OBJECT-TYPE
    SYNTAX      Counter64 -- (0..18446744073709551615)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The value when expValueType is 'counter64'."
    ::= { expValueEntry 7 }

-- The compliance statements have yet to be written.  The intent is
-- that all objects are required.  A proper subset
-- of the MIB may disallow instance wildcards, deltaValues, or
-- expObjectConditionals.

END

Expires 26 March 1997+6 months                                 [Page 16]


Internet Draft               Expression MIB                26 March 1997

5.  Acknowledgements

This MIB contains considerable contributions from the RMON MIB, the
Distributed Management Design Team (Andy Bierman, Maria Greene, Bob
Stewart, and Steve Waldbusser), and colleagues at Cisco.

Expires 26 March 1997+6 months                                 [Page 17]


Internet Draft               Expression MIB                26 March 1997

6.  References

[1]  SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
     S. Waldbusser, "Structure of Management Information for version 2
     of the Simple Network Management Protocol (SNMPv2)", RFC 1902,
     January 1996.

[2]  McCloghrie, K., and M. Rose, Editors, "Management Information Base
     for Network Management of TCP/IP-based internets: MIB-II", STD 17,
     RFC 1213, March 1991.

[3]  Case, J., Fedor, M., Schoffstall, M., and J. Davin, "Simple Network
     Management Protocol", RFC 1157, May 1990.

[4]  SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
     S. Waldbusser, "Protocol Operations for version 2 of the Simple
     Network Management Protocol (SNMPv2)", RFC 1905, January 1996.

Expires 26 March 1997+6 months                                 [Page 18]


Internet Draft               Expression MIB                26 March 1997

7.  Security Considerations

Security issues are not discussed in this memo.

8.  Author's Address

     Bob Stewart
     Cisco Systems, Inc.
     170 West Tasman Drive
     San Jose, CA 95134-1706

     Phone: 408-526-4527
     Email: [email-masked]

Expires 26 March 1997+6 months                                 [Page 19]


Internet Draft               Expression MIB                26 March 1997

Table of Contents

1 Abstract ........................................................    2
2 The SNMP Network Management Framework ...........................    3
2.1 Object Definitions ............................................    3
3 Overview ........................................................    4
4 Definitions .....................................................    5
5 Acknowledgements ................................................   17
6 References ......................................................   18
7 Security Considerations .........................................   19
8 Author's Address ................................................   19

Expires 26 March 1997+6 months                                 [Page 20]