RFC 3780 - SMIng - Next Generation Structure of Management I(5)

时间:2006-10-30 来源: 作者: 点击:
Protocol(SNMP)ManagementFrameworks",STD62,RFC3411, December2002. [IEEE754]InstituteofElectricalandElectronicsEngineers,"IEEE StandardforBinaryFloating-PointArithmetic",ANSI/IEEE Standard754-1985,Augu
  
              Protocol (SNMP) Management Frameworks", STD 62, RFC 3411,
              December 2002.

   [IEEE754]  Institute of Electrical and Electronics Engineers, "IEEE
              Standard for Binary Floating-Point Arithmetic", ANSI/IEEE
              Standard 754-1985, August 1985.

   [RFC3629]  Yergeau, F., "UTF-8, a transformation format of ISO
              10646", STD 63, RFC 3629, November 2003.

   [RFC3084]  Chan, K., Seligson, J., Durham, D., Gai, S., McCloghrie,
              K., Herzog, S., Reichmeyer, F., Yavatkar, R. and A. Smith,
              "COPS Usage for Policy Provisioning", RFC 3084, March
              2001.

Appendix A. NMRG-SMING Module

   Most SMIng modules are built on top of the definitions of some
   commonly used derived types.  The definitions of these derived types
   are contained in the NMRG-SMING module which is defined below.  Its
   derived types are generally applicable for modeling all areas of
   management information.  Among these derived types are counter types,
   string types, and date and time related types.

   This module is derived from RFC 2578 [RFC2578] and RFC 2579
   [RFC2579].

module NMRG-SMING {

    organization    "IRTF Network Management Research Group (NMRG)";

    contact         "IRTF Network Management Research Group (NMRG)
                     http://www.ibr.cs.tu-bs.de/projects/nmrg/

                     Frank Strauss
                     TU Braunschweig
                     Muehlenpfordtstrasse 23
                     38106 Braunschweig
                     Germany
                     Phone: +49 531 391 3266
                     EMail: strauss@ibr.cs.tu-bs.de

                     Juergen Schoenwaelder
                     International University Bremen
                     P.O. Box 750 561
                     28725 Bremen
                     Germany
                     Phone: +49 421 200 3587
                     EMail: j.schoenwaelder@iu-bremen.de";

    description     "Core type definitions for SMIng. Several
                     type definitions are SMIng versions of
                     similar SMIv2 or SPPI definitions.

                     Copyright (C) The Internet Society (2004).
                     All Rights Reserved.
                     This version of this module is part of
                     RFC 3780, see the RFC itself for full
                     legal notices.";

    revision {
        date        "2003-12-16";
        description "Initial revision, published as RFC 3780.";
    };

    typedef Gauge32 {
        type        Unsigned32;
        description
           "The Gauge32 type represents a non-negative integer,
            which may increase or decrease, but shall never
            exceed a maximum value, nor fall below a minimum
            value.  The maximum value can not be greater than
            2^32-1 (4294967295 decimal), and the minimum value
            can not be smaller than 0.  The value of a Gauge32
            has its maximum value whenever the information
            being modeled is greater than or equal to its
            maximum value, and has its minimum value whenever
            the information being modeled is smaller than or
            equal to its minimum value.  If the information
            being modeled subsequently decreases below
            (increases above) the maximum (minimum) value, the
            Gauge32 also decreases (increases).";
        reference
           "RFC 2578, Sections 2. and 7.1.7.";
    };

    typedef Counter32 {
        type        Unsigned32;
        description
           "The Counter32 type represents a non-negative integer
            which monotonically increases until it reaches a
            maximum value of 2^32-1 (4294967295 decimal), when it
            wraps around and starts increasing again from zero.

            Counters have no defined `initial’ value, and thus, a
            single value of a Counter has (in general) no information
            content.  Discontinuities in the monotonically increasing
            value normally occur at re-initialization of the
            management system, and at other times as specified in the
            description of an attribute using this type.  If such
            other times can occur, for example, the creation of a
            class instance that contains an attribute of type
            Counter32 at times other than re-initialization, then a
            corresponding attribute should be defined, with an
            appropriate type, to indicate the last discontinuity.
            Examples of appropriate types include: TimeStamp32,
            TimeStamp64, DateAndTime, TimeTicks32 or TimeTicks64
            (other types defined in this module).

            The value of the access statement for attributes with
            a type value of Counter32 should be either `readonly’
            or `eventonly’.

            A default statement should not be used for attributes
            with a type value of Counter32.";
        reference
           "RFC 2578, Sections 2. and 7.1.6.";
    };

    typedef Gauge64 {
        type        Unsigned64;
        description
           "The Gauge64 type represents a non-negative integer,
            which may increase or decrease, but shall never
            exceed a maximum value, nor fall below a minimum
            value.  The maximum value can not be greater than
            2^64-1 (18446744073709551615), and the minimum value
            can not be smaller than 0.  The value of a Gauge64
            has its maximum value whenever the information
            being modeled is greater than or equal to its
            maximum value, and has its minimum value whenever
            the information being modeled is smaller than or
            equal to its minimum value.  If the information
            being modeled subsequently decreases below
            (increases above) the maximum (minimum) value, the
            Gauge64 also decreases (increases).";
    };

    typedef Counter64 {
        type        Unsigned64;
        description
           "The Counter64 type represents a non-negative integer
            which monotonically increases until it reaches a
            maximum value of 2^64-1 (18446744073709551615), when
            it wraps around and starts increasing again from zero.

            Counters have no defined `initial’ value, and thus, a
            single value of a Counter has (in general) no
            information content.  Discontinuities in the
            monotonically increasing value normally occur at
            re-initialization of the management system, and at
            other times as specified in the description of an
            attribute using this type.  If such other times can
            occur, for example, the creation of a class
            instance that contains an attribute of type Counter32
            at times other than re-initialization, then
            a corresponding attribute should be defined, with an

            appropriate type, to indicate the last discontinuity.
            Examples of appropriate types include: TimeStamp32,
            TimeStamp64, DateAndTime, TimeTicks32 or TimeTicks64
            (other types defined in this module).

            The value of the access statement for attributes with
            a type value of Counter64 should be either `readonly’
            or `eventonly’.

            A default statement should not be used for attributes
            with a type value of Counter64.";
        reference
           "RFC 2578, Sections 2. and 7.1.10.";
    };

    typedef Opaque {
        type        OctetString;
        status      obsolete;
        description
           "******* THIS TYPE DEFINITION IS OBSOLETE *******

            The Opaque type is provided solely for
            backward-compatibility, and shall not be used for
            newly-defined attributes and derived types.

            The Opaque type supports the capability to pass
            arbitrary ASN.1 syntax.  A value is encoded using
            the ASN.1 Basic Encoding Rules into a string of
            octets.  This, in turn, is encoded as an
            OctetString, in effect `double-wrapping’ the
            original ASN.1 value.

            Note that a conforming implementation need only be
            able to accept and recognize opaquely-encoded data.
            It need not be able to unwrap the data and then
            interpret its contents.

            A requirement on `standard’ modules is that no
            attribute may have a type value of Opaque and no
            type may be derived from the Opaque type.";
        reference
           "RFC 2578, Sections 2. and 7.1.9.";
    };

    typedef IpAddress {
        type        OctetString (4);
        status      deprecated;
        description

           "******* THIS TYPE DEFINITION IS DEPRECATED *******

            The IpAddress type represents a 32-bit Internet
            IPv4 address.  It is represented as an OctetString
            of length 4, in network byte-order.

            Note that the IpAddress type is present for
            historical reasons.";
        reference
           "RFC 2578, Sections 2. and 7.1.5.";
    };

    typedef TimeTicks32 {
        type        Unsigned32;
        description
           "The TimeTicks32 type represents a non-negative integer
            which represents the time, modulo 2^32 (4294967296
            decimal), in hundredths of a second between two epochs.
            When attributes are defined which use this type, the
            description of the attribute identifies both of the
            reference epochs.

            For example, the TimeStamp32 type (defined in this
            module) is based on the TimeTicks32 type.";
        reference
           "RFC 2578, Sections 2. and 7.1.8.";
    };

    typedef TimeTicks64 {
        type        Unsigned64;
        description
           "The TimeTicks64 type represents a non-negative integer
            which represents the time, modulo 2^64
            (18446744073709551616 decimal), in hundredths of a second
            between two epochs.  When attributes are defined which use
            this type, the description of the attribute identifies
            both of the reference epochs.

            For example, the TimeStamp64 type (defined in this
            module) is based on the TimeTicks64 type.";
    };

    typedef TimeStamp32 {
        type        TimeTicks32;
        description
           "The value of an associated TimeTicks32 attribute at
            which a specific occurrence happened.  The specific
            occurrence must be defined in the description of any

            attribute defined using this type.  When the specific
            occurrence occurred prior to the last time the
            associated TimeTicks32 attribute was zero, then the
            TimeStamp32 value is zero.  Note that this requires all
            TimeStamp32 values to be reset to zero when the value of
            the associated TimeTicks32 attribute reaches 497+ days
            and wraps around to zero.

            The associated TimeTicks32 attribute should be specified
            in the description of any attribute using this type.
            If no TimeTicks32 attribute has been specified, the
            default scalar attribute sysUpTime is used.";
        reference
           "RFC 2579, Section 2.";
    };

    typedef TimeStamp64 {
        type        TimeTicks64;
        description
           "The value of an associated TimeTicks64 attribute at which
            a specific occurrence happened.  The specific occurrence
            must be defined in the description of any attribute
            defined using this type.  When the specific occurrence
            occurred prior to the last time the associated TimeTicks64
            attribute was zero, then the TimeStamp64 value is zero.
            The associated TimeTicks64 attribute must be specified in
            the description of any attribute using this
            type. TimeTicks32 attributes must not be used as
            associated attributes.";
    };

    typedef TimeInterval32 {
        type        Integer32 (0..2147483647);
        description
           "A period of time, measured in units of 0.01 seconds.

            The TimeInterval32 type uses Integer32 rather than
            Unsigned32 for compatibility with RFC 2579.";
        reference
           "RFC 2579, Section 2.";
    };

    typedef TimeInterval64 {
        type        Integer64;
        description
           "A period of time, measured in units of 0.01 seconds.
            Note that negative values are allowed.";
    };

    typedef DateAndTime {
        type        OctetString (8 | 11);
        default     0x0000000000000000000000;
        format      "2d-1d-1d,1d:1d:1d.1d,1a1d:1d";
        description
           "A date-time specification.

            field  octets  contents                  range
            -----  ------  --------                  -----
             1      1-2   year*                     0..65535
             2       3    month                     1..12 | 0
             3       4    day                       1..31 | 0
             4       5    hour                      0..23
             5       6    minutes                   0..59
             6       7    seconds                   0..60
                          (use 60 for leap-second)
             7       8    deci-seconds              0..9
             8       9    direction from UTC        ’+’ / ’-’
             9      10    hours from UTC*           0..13
            10      11    minutes from UTC          0..59

            * Notes:
            - the value of year is in big-endian encoding
            - daylight saving time in New Zealand is +13

            For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would
            be displayed as:

                         1992-5-26,13:30:15.0,-4:0

            Note that if only local time is known, then timezone
            information (fields 8-10) is not present.

            The two special values of 8 or 11 zero bytes denote an
            unknown date-time specification.";
        reference
           "RFC 2579, Section 2.";
    };

    typedef TruthValue {
        type        Enumeration (true(1), false(2));
        description
           "Represents a boolean value.";
        reference
           "RFC 2579, Section 2.";
    };

    typedef PhysAddress {

        type        OctetString;
        format      "1x:";
        description
           "Represents media- or physical-level addresses.";
        reference
           "RFC 2579, Section 2.";
    };

    typedef MacAddress {
        type        OctetString (6);
        format      "1x:";
        description
           "Represents an IEEE 802 MAC address represented in the
            `canonical’ order defined by IEEE 802.1a, i.e., as if it
            were transmitted least significant bit first, even though
            802.5 (in contrast to other 802.x protocols) requires MAC
            addresses to be transmitted most significant bit first.";
        reference
           "RFC 2579, Section 2.";
    };

    // The DisplayString definition below does not impose a size
    // restriction and is thus not the same as the DisplayString
    // definition in RFC 2579. The DisplayString255 definition is
    // provided for mapping purposes.

    typedef DisplayString {
        type        OctetString;
        format      "1a";
        description
           "Represents textual information taken from the NVT ASCII
            character set, as defined in pages 4, 10-11 of RFC 854.

            To summarize RFC 854, the NVT ASCII repertoire specifies:

             - the use of character codes 0-127 (decimal)

             - the graphics characters (32-126) are interpreted as
               US ASCII

             - NUL, LF, CR, BEL, BS, HT, VT and FF have the special
               meanings specified in RFC 854

             - the other 25 codes have no standard interpretation

             - the sequence ’CR LF’ means newline

             - the sequence ’CR NUL’ means carriage-return

             - an ’LF’ not preceded by a ’CR’ means moving to the
               same column on the next line.

             - the sequence ’CR x’ for any x other than LF or NUL is
               illegal.  (Note that this also means that a string may
               end with either ’CR LF’ or ’CR NUL’, but not with CR.)
        ";
    };

    typedef DisplayString255 {
        type        DisplayString (0..255);
        description
           "A DisplayString with a maximum length of 255 characters.
            Any attribute defined using this syntax may not exceed 255
            characters in length.

            The DisplayString255 type has the same semantics as the
            DisplayString textual convention defined in RFC 2579.";
        reference
           "RFC 2579, Section 2.";
    };

    // The Utf8String and Utf8String255 definitions below facilitate
    // internationalization. The definition is consistent with the
    // definition of SnmpAdminString in RFC 2571.

    typedef Utf8String {
        type        OctetString;
        format      "65535t";      // is there a better way ?
        description
           "A human readable string represented using the ISO/IEC IS
            10646-1 character set, encoded as an octet string using
            the UTF-8 transformation format described in RFC 3629.

            Since additional code points are added by amendments to
            the 10646 standard from time to time, implementations must
            be prepared to encounter any code point from 0x00000000 to
            0x7fffffff.  Byte sequences that do not correspond to the
            valid UTF-8 encoding of a code point or are outside this
            range are prohibited.

            The use of control codes should be avoided. When it is
            necessary to represent a newline, the control code
            sequence CR LF should be used.

            The use of leading or trailing white space should be
            avoided.

            For code points not directly supported by user interface
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容