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-float-00.txt < prev    next >
Text File  |  1997-06-13  |  12KB  |  287 lines

  1.  
  2. INTERNET-DRAFT           Expires December 1997           INTERNET-DRAFT
  3.  
  4. Draft                   Floating-Point in SNMP             June 8, 1997
  5.  
  6.  
  7.                        Support for Floating-Point
  8.                                 in SNMP
  9.  
  10.                       <draft-perkins-float-00.txt>
  11.  
  12.                               June 8, 1997
  13.  
  14.                             David T. Perkins
  15.                          dperkins@snmpinfo.com
  16.  
  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                   Floating-Point in SNMP             June 8, 1997
  60.  
  61.  
  62. 2.  Introduction
  63.  
  64. This memo is informational.  It specifies an approach to add floating-
  65. point types to versions 1 and 2 of the SNMP SMI[1][2][3][4][5][6], and
  66. versions 1 and 2 of the SNMP protocol[7][8][9] without changes. Thus,
  67. this addition requires no modifications to existing SNMP MIB compilers,
  68. and no changes to existing SNMP protocol engines used in SNMP agents and
  69. SNMP management applications.
  70.  
  71. This memo does not specify a standard for the Internet community.
  72.  
  73.  
  74. 3.  Background
  75.  
  76. The SNMP protocol and SMI is based on elements from ASN.1[10] and
  77. BER[11].  The SMI allows use of only a few ASN.1 base types plus a few
  78. SNMP application specific types.  Support for floating-point types is
  79. not currently found in SNMP.  This is primarily due to two factors.  The
  80. first was the focus during the original development of SNMP to keep SNMP
  81. simple and use it for managing computer network devices using the
  82. Internet protocol suite.  The second factor was the problems with the
  83. support for floating-point types as it is defined in ASN.1.
  84.  
  85. SNMP has been found to be useful for purposes other than those for which
  86. it was originally developed.  However, some of the limitations in SNMP
  87. have restricted its continuing growth.  Lack of support for floating-
  88. point types has been a problem in some areas.  The first example is in
  89. mid-level managers that gather and process management information from
  90. many sources.  The processing includes computing values for mathematical
  91. formulas that require floating-point arithmetic.  Mid-level managers
  92. typically execute on general purpose computers with built-in support for
  93. floating point.  Thus, supporting floating-point types is not a burden
  94. for them.  A second area is using SNMP in equipment that require
  95. floating point support as part of its normal operation.  Examples
  96. include heating-cooling systems of large buildings, water and electrical
  97. supply systems for cities, and chemical processing plants.
  98.  
  99. There is a floating-point type in ASN.1.  It is called REAL.  It is
  100. quite complex and allows many options.  Also, it does not trivially map
  101. to the internal floating-point supported in contemporary computers.  On
  102. the other hand, the format of floating-point values specified in "IEEE
  103. Standard for Binary Floating-Point," ANSI/IEEE Std 754-1985[12] has
  104. become widely used.  The two standard IEEE encodings of floating-point
  105. values are quite different from that specified for the REAL type in the
  106. ASN.1 and the BER specifications.  Thus, translation between the IEEE
  107. encoding formats (used internally in computers) and the BER encoding
  108. format (to transmit values) has no value.  However, the translation does
  109. have the following costs: execution cost; the cost to develop and test
  110. the code to perform the translation; and the cost to educate users and
  111. developers about a format that has no other application.  Thus, a
  112. trivial serialization of the IEEE encodings for floating-point values is
  113.  
  114.  
  115. Expires 12/08/97                                               [Page 2]
  116. Draft                   Floating-Point in SNMP             June 8, 1997
  117.  
  118.  
  119. needed.  Note that IEEE encodings are used in XDR defined in RFC
  120. 1832[13].
  121.  
  122.  
  123. 4.  Floating-Point Types
  124.  
  125. Four floating-point types are defined in "IEEE Standard for Binary
  126. Floating-Point."  These types are "single," "extended single," "double,"
  127. and "extended double."  Only the single and double formats, which are
  128. called "float" and "double" in this memo, are to be used in SNMP.
  129. Section 5.1.2 of "The Domestication of the Opaque Type for SNMP"[14]
  130. requires that a new base type be identified and a textual convention be
  131. defined for each new "wrapped" type.  Shown below are the definitions
  132. for these types and corresponding textual conventions.
  133.  
  134.  
  135.    -- A floating-point value encoded according to that specified
  136.    -- in "IEEE Standard for Binary Floating-Point,"
  137.    -- ANSI/IEEE Std 754-1985 for the "single" type.
  138.    -- The first octet in the string contains the "sign bit" and
  139.    -- the first 7 of the 8 bits of the biased exponent. (The sign
  140.    -- bit is the most significant bit of the octet.)  The eighth
  141.    -- bit of the biased exponent and the 23 bits of the fraction
  142.    -- are contained in second through fourth octets.  The
  143.    -- floating-point values have identical semantics to those
  144.    -- defined in the ANSI/IEEE document.
  145.    FloatType ::= [APPLICATION 8] IMPLICIT OCTET STRING (SIZE(4))
  146.  
  147.    -- A floating-point value encoded according to that specified
  148.    -- in "IEEE Standard for Binary Floating-Point,"
  149.    -- ANSI/IEEE Std 754-1985 for the "double" type.
  150.    -- The first octet in the string contains the "sign bit" and
  151.    -- the first 7 of the 11 bits of the biased exponent. (The sign
  152.    -- bit is the most significant bit of the octet.)  The eighth
  153.    -- through eleventh bits of the biased exponent and the 52
  154.    -- bits of the fraction are contained in second through eighth
  155.    -- octets.  The floating-point values have identical semantics
  156.    -- to those defined in the ANSI/IEEE document.
  157.    DoubleType ::= [APPLICATION 9] IMPLICIT OCTET STRING (SIZE(8))
  158.  
  159.  
  160.    Float TEXTUAL-CONVENTION
  161.        STATUS      current
  162.        DESCRIPTION
  163.            "A single precision floating-point number.  The semantics
  164.            and encoding are identical for type 'single' defined in
  165.            IEEE Standard for Binary Floating-Point,
  166.            ANSI/IEEE Std 754-1985.
  167.  
  168.  
  169.  
  170.  
  171.  
  172. Expires 12/08/97                                               [Page 3]
  173. Draft                   Floating-Point in SNMP             June 8, 1997
  174.  
  175.  
  176.            The value is restricted to the BER serialization of
  177.            the following ASN.1 type:
  178.                FLOATTYPE ::= [120] IMPLICIT FloatType
  179.            (note: the value 120 is the sum of '30'h and '48'h)
  180.            The BER serialization of the length for values of
  181.            this type must use the definite length, short
  182.            encoding form.
  183.  
  184.            For example, the BER serialization of value 123
  185.            of type FLOATTYPE is '9f780442f60000'h.  (The tag
  186.            is '9f78'h; the length is '04'h; and the value is
  187.            '42f60000'h.) The BER serialization of value
  188.            '9f780442f60000'h of data type Opaque is
  189.            '44079f780442f60000'h. (The tag is '44'h; the length
  190.            is '07'h; and the value is '9f780442f60000'h."
  191.        SYNTAX      Opaque (SIZE(7))
  192.  
  193.  
  194.    Double TEXTUAL-CONVENTION
  195.        STATUS      current
  196.        DESCRIPTION
  197.            "A double precision floating-point number.  The semantics
  198.            and encoding are identical for type 'double' defined in
  199.            IEEE Standard for Binary Floating-Point,
  200.            ANSI/IEEE Std 754-1985.
  201.  
  202.            The value is restricted to the BER serialization of
  203.            the following ASN.1 type:
  204.                DOUBLETYPE ::= [121] IMPLICIT DoubleType
  205.            (note: the value 121 is the sum of '30'h and '49'h)
  206.            The BER serialization of the length for values of
  207.            this type must use the definite length, short
  208.            encoding form.
  209.  
  210.            For example, the BER serialization of value 123
  211.            of type DOUBLETYPE is '9f7908405ec00000000000'h.
  212.            (The tag is '9f79'h; the length is '08'h; and the
  213.            value is '405ec00000000000'h.)  The BER serialization
  214.            of value '9f7908405ec00000000000'h of data type Opaque
  215.            is '440b9f7908405ec00000000000'h.  (The tag is '44'h;
  216.            the length is '07'h; and the value is
  217.            '9f7908405ec00000000000'h.)"
  218.        SYNTAX      Opaque (SIZE(11))
  219.  
  220.  
  221. 6.  References
  222.  
  223.  
  224. [1]  K. McCloghrie, M. Rose, "Structure and Identification of Management
  225.      Information for TCP/IP-based Internets", RFC 1155, 05/10/1990.
  226.  
  227.  
  228.  
  229. Expires 12/08/97                                               [Page 4]
  230. Draft                   Floating-Point in SNMP             June 8, 1997
  231.  
  232.  
  233. [2]  K. McCloghrie, M. Rose, "Concise MIB Definitions", RFC 1212,
  234.      03/26/1991.
  235.  
  236. [3]  M. Rose, "A Convention for Defining Traps for use with the SNMP",
  237.      RFC 1215, 03/27/1991.
  238.  
  239. [4]  J. Case, K. McCloghrie, M. Rose, S. Waldbusser, "Structure of
  240.      Management Information for Version 2 of the Simple Network
  241.      Management Protocol (SNMPv2)", RFC 1902, 01/22/1996.
  242.  
  243. [5]  J. Case, K. McCloghrie, M. Rose, S. Waldbusser, "Textual
  244.      Conventions for Version 2 of the Simple Network Management Protocol
  245.      (SNMPv2)", RFC 1903, 01/22/1996.
  246.  
  247. [6]  J. Case, K. McCloghrie, M. Rose, S. Waldbusser, "Conformance
  248.      Statements for Version 2 of the Simple Network Management Protocol
  249.      (SNMPv2)", RFC 1904, 01/22/1996.
  250.  
  251. [7]  M. Schoffstall, M. Fedor, J. Davin, J. Case, "A Simple Network
  252.      Management Protocol (SNMP)", RFC 1157, 05/10/1990.
  253.  
  254. [8]  J. Case, K. McCloghrie, M. Rose, S. Waldbusser, "Protocol
  255.      Operations for Version 2 of the Simple Network Management Protocol
  256.      (SNMPv2)", RFC 1905, 01/22/1996.
  257.  
  258. [9]  SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
  259.      S. Waldbusser, "Transport Mappings for Version 2 of the Simple
  260.      Network Management Protocol (SNMPv2)", RFC 1906, 01/22/1996.
  261.  
  262. [10] Information processing systems - Open Systems Interconnection -
  263.      Specification of Abstract Syntax Notation One (ASN.1),
  264.      International Organization for Standardization.  International
  265.      Standard 8824, (December, 1987).
  266.  
  267. [11] Information processing systems - Open Systems Interconnection -
  268.      Specification of Basic Encoding Rules for Abstract Syntax Notation
  269.      One (ASN.1), International Organization for Standardization.
  270.      International Standard 8825, (December, 1987).
  271.  
  272. [12] "IEEE Standard for Binary Floating-Point Arithmetic", ANSI/IEEE
  273.      Standard 754-1985, Institute of Electrical and Electronics
  274.      Engineers, August 1985.
  275.  
  276. [13] R. Srinivasan, "XDR: External Data Representation Standard",
  277.      RFC 1832, 08/09/1995.
  278.  
  279. [14] Perkins, D., "Domestication of the Opaque Type for SNMP",
  280.      Internet-draft <name-pending> (Replace with reference
  281.      to RFC).
  282.  
  283.  
  284.  
  285.  
  286. Expires 12/08/97                                               [Page 5]
  287.