rfc2579.txt

来自「RFC 的详细文档!」· 文本 代码 · 共 1,534 行 · 第 1/4 页

TXT
1,534
字号
    REFERENCE    "The SNMPv2-TM MIB module is defined in RFC 1906."
    SYNTAX       OCTET STRING (SIZE (1..255))


END

3.  Mapping of the TEXTUAL-CONVENTION macro

   The TEXTUAL-CONVENTION macro is used to convey the syntax and
   semantics associated with a textual convention.  It should be noted
   that the expansion of the TEXTUAL-CONVENTION macro is something which
   conceptually happens during implementation and not during run-time.

   The name of a textual convention must consist of one or more letters
   or digits, with the initial character being an upper case letter.
   The name must not conflict with any of the reserved words listed in
   section 3.7 of [2], should not consist of all upper case letters, and
   shall not exceed 64 characters in length.  (However, names longer
   than 32 characters are not recommended.)  The hyphen is not allowed
   in the name of a textual convention (except for use in information
   modules converted from SMIv1 which allowed hyphens in ASN.1 type
   assignments).  Further, all names used for the textual conventions
   defined in all "standard" information modules shall be unique.



McCloghrie, et al.          Standards Track                    [Page 20]





RFC 2579             Textual Conventions for SMIv2            April 1999


3.1.  Mapping of the DISPLAY-HINT clause

   The DISPLAY-HINT clause, which need not be present, gives a hint as
   to how the value of an instance of an object with the syntax defined
   using this textual convention might be displayed.  The DISPLAY-HINT
   clause must not be present if the Textual Convention is defined with
   a syntax of:  OBJECT IDENTIFIER, IpAddress, Counter32, Counter64, or
   any enumerated syntax (BITS or INTEGER).  The determination of
   whether it makes sense for other syntax types is dependent on the
   specific definition of the Textual Convention.

   When the syntax has an underlying primitive type of INTEGER, the hint
   consists of an integer-format specification, containing two parts.
   The first part is a single character suggesting a display format,
   either: `x' for hexadecimal, or `d' for decimal, or `o' for octal, or
   `b' for binary.  For all types, when rendering the value, leading
   zeros are omitted, and for negative values, a minus sign is rendered
   immediately before the digits.  The second part is always omitted for
   `x', `o' and `b', and need not be present for `d'.  If present, the
   second part starts with a hyphen and is followed by a decimal number,
   which defines the implied decimal point when rendering the value.
   For example:

        Hundredths ::= TEXTUAL-CONVENTION
            DISPLAY-HINT "d-2"
            ...
            SYNTAX     INTEGER (0..10000)

   suggests that a Hundredths value of 1234 be rendered as "12.34"


   When the syntax has an underlying primitive type of OCTET STRING, the
   hint consists of one or more octet-format specifications.  Each
   specification consists of five parts, with each part using and
   removing zero or more of the next octets from the value and producing
   the next zero or more characters to be displayed.  The octets within
   the value are processed in order of significance, most significant
   first.

   The five parts of a octet-format specification are:

(1)  the (optional) repeat indicator; if present, this part is a `*',
     and indicates that the current octet of the value is to be used as
     the repeat count.  The repeat count is an unsigned integer (which
     may be zero) which specifies how many times the remainder of this
     octet-format specification should be successively applied.  If the
     repeat indicator is not present, the repeat count is one.



McCloghrie, et al.          Standards Track                    [Page 21]





RFC 2579             Textual Conventions for SMIv2            April 1999


(2)  the octet length: one or more decimal digits specifying the number
     of octets of the value to be used and formatted by this octet-
     specification.  Note that the octet length can be zero.  If less
     than this number of octets remain in the value, then the lesser
     number of octets are used.

(3)  the display format, either:  `x' for hexadecimal, `d' for decimal,
     `o' for octal, `a' for ascii, or `t' for UTF-8.  If the octet
     length part is greater than one, and the display format part refers
     to a numeric format, then network-byte ordering (big-endian
     encoding) is used interpreting the octets in the value.  The octets
     processed by the `t' display format do not necessarily form an
     integral number of UTF-8 characters.  Trailing octets which do not
     form a valid UTF-8 encoded character are discarded.

(4)  the (optional) display separator character; if present, this part
     is a single character which is produced for display after each
     application of this octet-specification; however, this character is
     not produced for display if it would be immediately followed by the
     display of the repeat terminator character for this octet-
     specification.  This character can be any character other than a
     decimal digit and a `*'.

(5)  the (optional) repeat terminator character, which can be present
     only if the display separator character is present and this octet-
     specification begins with a repeat indicator; if present, this part
     is a single character which is produced after all the zero or more
     repeated applications (as given by the repeat count) of this
     octet-specification.  This character can be any character other
     than a decimal digit and a `*'.

   Output of a display separator character or a repeat terminator
   character is suppressed if it would occur as the last character of
   the display.

   If the octets of the value are exhausted before all the octet-format
   specification have been used, then the excess specifications are
   ignored.  If additional octets remain in the value after interpreting
   all the octet-format specifications, then the last octet-format
   specification is re-interpreted to process the additional octets,
   until no octets remain in the value.

3.2.  Mapping of the STATUS clause

   The STATUS clause, which must be present, indicates whether this
   definition is current or historic.

   The value "current" means that the definition is current and valid.


McCloghrie, et al.          Standards Track                    [Page 22]





RFC 2579             Textual Conventions for SMIv2            April 1999


   The value "obsolete" means the definition is obsolete and should not
   be implemented and/or can be removed if previously implemented.
   While the value "deprecated" also indicates an obsolete definition,
   it permits new/continued implementation in order to foster
   interoperability with older/existing implementations.

3.3.  Mapping of the DESCRIPTION clause

   The DESCRIPTION clause, which must be present, contains a textual
   definition of the textual convention, which provides all semantic
   definitions necessary for implementation, and should embody any
   information which would otherwise be communicated in any ASN.1
   commentary annotations associated with the object.

3.4.  Mapping of the REFERENCE clause

   The REFERENCE clause, which need not be present, contains a textual
   cross-reference to some other document, either another information
   module which defines a related assignment, or some other document
   which provides additional information relevant to this definition.

3.5.  Mapping of the SYNTAX clause

   The SYNTAX clause, which must be present, defines abstract data
   structure corresponding to the textual convention.  The data
   structure must be one of the alternatives defined in the ObjectSyntax
   CHOICE or the BITS construct (see section 7.1 in [2]).  Note that
   this means that the SYNTAX clause of a Textual Convention can not
   refer to a previously defined Textual Convention.

   An extended subset of the full capabilities of ASN.1 (1988) sub-
   typing is allowed, as appropriate to the underlying ASN.1 type.  Any
   such restriction on size, range or enumerations specified in this
   clause represents the maximal level of support which makes "protocol
   sense".  Restrictions on sub-typing are specified in detail in
   Section 9 and Appendix A of [2].

4.  Sub-typing of Textual Conventions

   The SYNTAX clause of a TEXTUAL CONVENTION macro may be sub-typed in
   the same way as the SYNTAX clause of an OBJECT-TYPE macro (see
   section 11 of [2]).

5.  Revising a Textual Convention Definition

   It may be desirable to revise the definition of a textual convention
   after experience is gained with it.  However, changes are not allowed
   if they have any potential to cause interoperability problems "over


McCloghrie, et al.          Standards Track                    [Page 23]





RFC 2579             Textual Conventions for SMIv2            April 1999


   the wire" between an implementation using an original specification
   and an implementation using an updated specification(s).  Such
   changes can only be accommodated by defining a new textual convention
   (i.e., a new name).

   The following revisions are allowed:

(1)  A SYNTAX clause containing an enumerated INTEGER may have new
     enumerations added or existing labels changed.  Similarly, named
     bits may be added or existing labels changed for the BITS
     construct.

(2)  A STATUS clause value of "current" may be revised as "deprecated"
     or "obsolete".  Similarly, a STATUS clause value of "deprecated"
     may be revised as "obsolete".  When making such a change, the
     DESCRIPTION clause should be updated to explain the rationale.

(3)  A REFERENCE clause may be added or updated.

(4)  A DISPLAY-HINTS clause may be added or updated.

(5)  Clarifications and additional information may be included in the
     DESCRIPTION clause.

(6)  Any editorial change.

   Note that with the introduction of the TEXTUAL-CONVENTION macro,
   there is no longer any need to define types in the following manner:

        DisplayString ::= OCTET STRING (SIZE (0..255))

   When revising an information module containing a definition such as
   this, that definition should be replaced by a TEXTUAL-CONVENTION
   macro.

6.  Security Considerations

   This document defines the means to define new data types for the
   language used to write and read descriptions of management
   information.  These data types have no security impact on the
   Internet.









McCloghrie, et al.          Standards Track                    [Page 24]





RFC 2579             Textual Conventions for SMIv2            April 1999


7.  Editors' Addresses

   Keith McCloghrie
   Cisco Systems, Inc.
   170 West Tasman Drive
   San Jose, CA  95134-1706
   USA
   Phone: +1 408 526 5260
   EMail: kzm@cisco.com

   David Perkins
   SNMPinfo
   3763 Benton Street
   Santa Clara, CA 95051
   USA
   Phone: +1 408 221-8702
   EMail: dperkins@snmpinfo.com

   Juergen Schoenwaelder
   TU Braunschweig
   Bueltenweg 74/75
   38106 Braunschweig
   Germany
   Phone: +49 531 391-3283
   EMail: schoenw@ibr.cs.tu-bs.de


8.  References

[1]  Information processing systems - Open Systems Interconnection -
     Specification of Abstract Syntax Notation One (ASN.1),
     International Organization for Standardization.  International
     Standard 8824, (December, 1987).

[2]  McCloghrie, K., Perkins, D., Schoenwaelder, J., Case, J., Rose, M.
     and S. Waldbusser, "Structure of Management Information Version 2
     (SMIv2)", STD 58, RFC 2578, April 1999.

[3]  The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M. and
     Waldbusser, S., "Transport Mappings for Version 2 of the" Simple
     Network Management Protocol (SNMPv2)", RFC 1906, January 1996.









McCloghrie, et al.          Standards Track                    [Page 25]





RFC 2579             Textual Conventions for SMIv2            April 1999


9.  Full Copyright Statement

   Copyright (C) The Internet Society (1999).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE."























McCloghrie, et al.          Standards Track                    [Page 26]

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?