Internet DRAFT - draft-eberle-sdt

draft-eberle-sdt









Internet Draft                                                 J. Eberle
<draft-eberle-sdt-00.txt>                                     FastnLight
Category: Informational
Expires: June 2007                                         December 2006

                          Standard Data Types

Status of this Memo

   By submitting this Internet-Draft, each author represents that any
   applicable patent or other IPR claims of which he or she is aware have
   been or will be disclosed, and any of which he or she becomes aware will
   be disclosed, in accordance with Section 6 of BCP 79.

   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."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/1id-abstracts.html

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

Copyright Notice

   Copyright (C) The Internet Society, December 2006.



















Eberle                      Expires June 2007                   [Page 1]



Internet Draft             Standard Data Types             December 2006


Abstract

   This document assigns 25 common data types clear, unambiguous names, and
   numerical identifiers.  It also defines context dependencies, such as
   byte-order and charset, to the data types, where necessary.

1.  Introduction

   This document attempts to codify a set of common data types, giving each
   a clear, unambiguous name, and a fixed identifier.  The names and
   identifiers are designed to serve as the basis for higher-level data
   typing constructs.  On their own, the data type names serve to
   streamline and sharpen technical writing.






































Eberle                      Expires June 2007                   [Page 2]



Internet Draft             Standard Data Types             December 2006


2.  Type Catalog

ID  Name     Coding           Bits           Domain  Context
--  -------  ---------------  ----  ---------------  -------------------
 1  uint1    unsigned integer    1      0 ..      1
 2  uint2    unsigned integer    2      0 ..      3
 3  uint3    unsigned integer    3      0 ..      7
 4  uint4    unsigned integer    4      0 ..     15
 5  uint5    unsigned integer    5      0 ..     31
 6  uint6    unsigned integer    6      0 ..     63
 7  uint7    unsigned integer    7      0 ..    127
--  -------  ---------------  ----  ---------------  -------------------
 8  uint8    unsigned integer    8      0 ..    255
 9  uint16   unsigned integer   16      0 ..  65535  byte-order
10  uint32   unsigned integer   32      0 .. 2^32-1  byte-order
11  uint64   unsigned integer   64      0 .. 2^64-1  byte-order
--  -------  ---------------  ----  ---------------  -------------------
12  sint8    signed integer      8   -128 ..    127
13  sint16   signed integer     16 -32768 ..  32767  byte-order
14  sint32   signed integer     32  -2^31 .. 2^31-1  byte-order
15  sint64   signed integer     64  -2^63 .. 2^63-1  byte-order
--  -------  ---------------  ----  ---------------  -------------------
16  float32  floating point     32       +-10^ +-38  byte-order
17  float64  floating point     64       +-10^+-308  byte-order
--  -------  ---------------  ----  ---------------  -------------------
18  char8    character           8   256 codepoints  charset
19  char16   character          16 65536 codepoints  charset, byte-order
20  char32   character          32  2^32 codepoints  charset, byte-order
--  -------  ---------------  ----  ---------------  -------------------
21  mb8      multi-byte char  8-32  2^30 codepoints  charset
22  mb16     multi-byte char 16-32  2^31 codepoints  charset, byte-order
--  -------  ---------------  ----  ---------------  -------------------
23  bcd4     binary-coded dec    4     0 .. 9, +, -
24  bcd8     binary-coded dec    8     0 .. 9, +, -  charset
--  -------  ---------------  ----  ---------------  -------------------
25  void                         0               {}
--  -------  ---------------  ----  ---------------  -------------------














Eberle                      Expires June 2007                   [Page 3]



Internet Draft             Standard Data Types             December 2006


3.  Type Details

3.1.  Unsigned Integer (uint1, uint2, uint3, uint4, uint5, uint6, uint7,
                        uint8, uint16, uint32, uint64)

   Representation: Base-2 positional, unsigned.


3.2.  Signed Integer (sint8, sint16, sint32, sint64)

   Representation: Base-2 positional, two's complement.


3.3.  Floating Point (float32, float64)

   Representation: [IEEE754].


3.4.  Character (char8, char16, char32)

   Representation: Base-2 positional, unsigned.  Reference to codepoint
   within charset selected by context.


3.5.  Multi-Byte Character (mb8, mb16)

   Representation: Depends on selected charset.  Type mb8 can be used
   with UTF-7 and UTF-8.  Type mb16 can be used with UTF-16.  Other
   multi-byte charsets are handled in a similar manner.


3.6.  Binary-Coded Decimal (bcd4, bcd8)

   Representation bcd4:
     {0000..1001, 1100, 1101} => {0..9, +, -}
     All others undefined

   Representation bcd8:
     Depends on selected charset (ASCII family or EBCDIC family)
     {'0'..'9', '+', '-'} => {0..9, +, -}
     All others undefined


3.7.  Void (void)

   Representation: N/A.





Eberle                      Expires June 2007                   [Page 4]



Internet Draft             Standard Data Types             December 2006


4.  Context Details

   A data type is not valid until all of its references to the context
   have been established.  For example, uint32 requires the byte-order
   from the context.  Likewise, char8 requires the charset from the
   context.

   There are many ways to establish context values.  They can be written
   to a file header, negotiated at runtime, specified in an architecture
   document, etc.  This document does not specify the mechanism.  It
   only defines the various dependencies.

4.1.  Byte-Order

   Byte-order is the order in which to store a series of bytes.  It can
   either be most-to-least significant, or least-to-most significant.
   The former is called big-endian, the latter is called little-endian.

4.2.  Charset

   The charset defines the set of codepoints that a given character
   value can point to.  The set of valid charsets is defined in the IANA
   Charset MIB file [RFC3808].

   Note, not all charsets can be used with all character data types.
   For example, charset ISO-10646-UCS-2 cannot be used with type char8.
   Therefore, the user of these types must make informed charset/data
   type pairings.























Eberle                      Expires June 2007                   [Page 5]



Internet Draft             Standard Data Types             December 2006


5.  Security Considerations

   This document contains no security considerations.

6.  IANA Considerations

   The author recommends that the IANA create a registry to record the
   data type names and identifiers described in this document.

7.  References

7.1.  Normative References

   [IEEE754]  IEEE Std 754-1985, IEEE Standard for Binary Floating-Point
              Arithmetic.

   [RFC3808]  McDonald, I., "IANA Charset MIB", Informational, RFC 3808,
              June 2004.

7.2.  Informative References

   [CHARSET]  IANA Charset Registry (archived at):
              http://www.iana.org/assignments/character-sets

Author's Address

   Jim Eberle
   1450 Lincoln Ave, Unit 9
   Burlingame, CA 94010
   EMail: jim.eberle@fastnlight.com





















Eberle                      Expires June 2007                   [Page 6]



Internet Draft             Standard Data Types             December 2006


Full Copyright Statement

   Copyright (C) The IETF Trust (2006).

   This document is subject to the rights, licenses and restrictions
   contained in BCP 78, and except as set forth therein, the authors
   retain all their rights.

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST, AND
   THE INTERNET ENGINEERING TASK FORCE DISCLAIM 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.

Intellectual Property

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed
   to pertain to the implementation or use of the technology
   described in this document or the extent to which any license
   under such rights might or might not be available; nor does it
   represent that it has made any independent effort to identify any
   such rights.  Information on the procedures with respect to
   rights in RFC documents can be found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use
   of such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository
   at http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention
   any copyrights, patents or patent applications, or other
   proprietary rights that may cover technology that may be required
   to implement this standard.  Please address the information to the
   IETF at ietf-ipr@ietf.org.












Eberle                      Expires June 2007                   [Page 7]