home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_n_r / draft-perkins-clartc-00.txt < prev    next >
Text File  |  1997-06-13  |  7KB  |  229 lines

  1.  
  2. INTERNET-DRAFT           Expires December 1997           INTERNET-DRAFT
  3.  
  4. Draft            Clarification for Textual Conventions     June 8, 1997
  5.  
  6.  
  7.                           A Clarification for
  8.                           Textual Conventions
  9.                                 in SMIv2
  10.  
  11.                      <draft-perkins-clartc-00.txt>
  12.  
  13.                               June 8, 1997
  14.  
  15.                             David T. Perkins
  16.                          dperkins@snmpinfo.com
  17.  
  18.  
  19. 1.  Status of this Memo
  20.  
  21.    This document is an Internet Draft.  Internet Drafts are working
  22.    documents of the Internet Engineering Task Force (IETF), its Areas,
  23.    and its Working Groups. Note that other groups may also distribute
  24.    working documents as Internet Drafts.
  25.  
  26.    Internet Drafts are draft documents valid for a maximum of six
  27.    months.  Internet Drafts may be updated, replaced, or obsoleted by
  28.    other documents at any time.  It is not appropriate to use Internet
  29.    Drafts as reference material or to cite them other than as a
  30.    "working draft" or "work in progress."
  31.  
  32.    To learn the current status of any Internet-Draft, please check the
  33.    "1id-abstracts.txt" listing contained in the internet-drafts Shadow
  34.    Directories on:
  35.  
  36.          ftp.is.co.za (Africa)
  37.          nic.nordu.net (Europe)
  38.          ds.internic.net (US East Coast)
  39.          ftp.isi.edu (US West Coast)
  40.          munnari.oz.au (Pacific Rim)
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Expires 12/08/97                                               [Page 1]
  59. Draft            Clarification for Textual Conventions     June 8, 1997
  60.  
  61.  
  62. 2.  Introduction
  63.  
  64. This memo is informational.  It specifies a clarification of version 2
  65. of the SNMP SMI, a standard for the Internet community, which is defined
  66. by RFCs 1902[1], 1903[2], and 1904[3]. The clarification is to fix a
  67. perceived inconsistency in the definition of the TEXTUAL-CONVENTION
  68. construct.  This problem is resolved by replacement text for section 3.5
  69. of RFC 1903.
  70.  
  71.  
  72. 3.  Background
  73.  
  74. The TEXTUAL-CONVENTION construct, defined in RFC 1903, is used by MIB
  75. designers as a mechanism to create a "new" data type to be used in
  76. defining object types.  A newly created type is nothing more than a
  77. short cut way to write an SNMP base type with additional constraints.
  78. These constraints may be a restriction in the range of values of integer
  79. types, a restriction in the length of string types, or a restriction in
  80. the values of individual octets in string types.  A TEXTUAL-CONVENTION
  81. construct contains several clauses, some optional and some required.
  82. The required DESCRIPTION and SYNTAX clauses are used to specify the
  83. semantics and data type for the "new" data type defined by the
  84. construct.  (Note that a textual convention may also be specified as an
  85. ASN.1 type assignment.  This method, while legal, is not preferred,
  86. since the TEXTUAL-CONVENTION construct is more expressive and the
  87. associated clauses parsable by MIB compilers. However, the description
  88. of the SYNTAX clause also applies to the data type specified in a type
  89. assignment.)  RFC 1903 contains the following text in section 3.5 that
  90. describes the SYNTAX clause:
  91.  
  92.    The SYNTAX clause, which must be present, defines abstract data
  93.    structure corresponding to the textual convention.  The data
  94.    structure must be one of the alternatives defined in the ObjectSyntax
  95.    CHOICE or the BITS construct (see section 7.1 in [2]).
  96.  
  97. Reference "[2]" in the above text is to RFC 1902.  Thus, to some readers
  98. this text seems to indicate that the only values allowed are the "base"
  99. SMIv2 data types from RFC 1902:
  100.  
  101.    INTEGER (-2147483648..2147483647), Integer32,
  102.    OCTET STRING (SIZE (0..65535)), OBJECT IDENTIFIER,
  103.    IpAddress, Counter32, Gauge32, TimeTicks, Opaque,
  104.    Counter64, and Unsigned32.
  105.  
  106. Also, some readers interpret the text to mean that sub-typing of these
  107. types is not allowed.  However, section 13.3 of RFC 1902, shown below,
  108. gives explicit examples of textual conventions that contradict a strict
  109. interpretation of section 3.5 of RFC 1303.  That is, the text allows a
  110. textual convention to use a previously defined textual convention as a
  111. data type, and the text allows sub-typing.  The text from section 13.3
  112. of RFC 1902 is:
  113.  
  114.  
  115. Expires 12/08/97                                               [Page 2]
  116. Draft            Clarification for Textual Conventions     June 8, 1997
  117.  
  118.  
  119.  
  120.    Sub-typing of Textual Conventions (see [3]) is allowed but must be
  121.    valid.  In particular, each range specified for the textual
  122.    convention must be a subset of a range specified for the base type.
  123.    For example,
  124.  
  125.      Tc1 ::= INTEGER (1..10 | 11..20)
  126.      Tc2 ::= Tc1 (2..10 | 12..15)       -- is valid
  127.      Tc3 ::= Tc1 (4..8)                 -- is valid
  128.      Tc4 ::= Tc1 (8..12)                -- is invalid
  129.  
  130.  
  131.  
  132. 4.  Replacement Text
  133.  
  134. The text specified below is a replacement for the text of section 3.5 of
  135. RFC 1903.  It resolves that perceived inconsistency between RFCs 1903
  136. and 1902.  This replacement text does not change or invalidate any
  137. existing SNMP MIB module, nor does it affect any existing or SNMP agent
  138. or management application.  It affects only those existing MIB compilers
  139. whose implementors interpreted section 3.5 of RFC 1903 in the most
  140. restrictive terms.  The replacement text is consistent with ASN.1 type
  141. definitions, and the normal usage by MIB designers.
  142.  
  143. The replacement text is the following:
  144.  
  145.   3.5.  Mapping of the SYNTAX clause
  146.  
  147.      The SYNTAX clause, which must be present, defines the abstract data
  148.      type corresponding to the textual convention.  The data type
  149.      must be one of the base SNMP data types described in section 7.1
  150.      of [2], a previously defined textual convention, or an allowed
  151.      sub-typing of a base data type or previously defined textual
  152.      convention.
  153.  
  154.      The following are examples of the SYNTAX clause:
  155.  
  156.          SYNTAX Integer32
  157.          SYNTAX OCTET STRING(SIZE(0..20))
  158.          SYNTAX INTEGER { up(1), down(2) }
  159.          SYNTAX BITS { red(0), blue(1), green(2) }
  160.          SYNTAX OBJECT IDENTIFIER
  161.          SYNTAX DisplayString(SIZE(1..10))  -- DisplayString must be
  162.                                             --  previously defined with
  163.                                             --  a resolved data type of
  164.                                             --  OCTET STRING
  165.          SYNTAX Tc1(1..45 | 100..200) -- Tc1 must be previously defined
  166.                                       --  with a resolved data type
  167.                                       --  that is integer based
  168.  
  169.  
  170.  
  171.  
  172. Expires 12/08/97                                               [Page 3]
  173. Draft            Clarification for Textual Conventions     June 8, 1997
  174.  
  175.  
  176. 5.  References
  177.  
  178.  
  179. [1]  J. Case, K. McCloghrie, M. Rose, S. Waldbusser, "Structure of
  180.      Management Information for Version 2 of the Simple Network
  181.      Management Protocol (SNMPv2)", RFC 1902, 01/22/1996.
  182.  
  183. [2]  J. Case, K. McCloghrie, M. Rose, S. Waldbusser, "Textual
  184.      Conventions for Version 2 of the Simple Network Management Protocol
  185.      (SNMPv2)", RFC 1903, 01/22/1996.
  186.  
  187. [3]  J. Case, K. McCloghrie, M. Rose, S. Waldbusser, "Conformance
  188.      Statements for Version 2 of the Simple Network Management Protocol
  189.      (SNMPv2)", RFC 1904, 01/22/1996.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229. Expires 12/08/97                                               [Page 4]