Subject: [core] #408 (coap-tcp-tls): CoAP over TCP Length Format (New)

From: "core issue tracker" <[email-masked]>
Date: Mon, 02 May 2016 16:20:38 -0000

#408: CoAP over TCP Length Format (New)

 I am currently attending the OMA Device Management (DM) working group
 meeting. During the presentation of the CoAP over TCP / TLS document David
 Navarro from IoTerop asked whether we had thought about re-using the
 existing CoAP header (with a new version number) to ensure larger
 similiary between the CoAP over UDP and the CoAP over UDP transport.

 Below is his message; I thought it is worthwhile to discuss it.

 ---------

 From: David Navarro [mailto:[email-masked]]
 Sent: 02 May 2016 17:36
 To: Hannes Tschofenig
 Subject:

 Hi Hannes,

 For the sake of compatibility between CoAP/UDP and CoAP/TCP, what about
 this format ? In red the changes from RFC7252.

 {{{
  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |Ver| L | TKL | Code | Payload and Options Length...
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Token (if any, TKL bytes) ...
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Options (if any) ...
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |1 1 1 1 1 1 1 1| Payload (if any) ...
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 }}}
 Figure 7: Message Format

 The fields in the header are defined as follows:

 Version (Ver): 2-bit unsigned integer. Indicates the CoAP version
 number. Implementations of this specification MUST set this field
 to 2 (10 binary). Other values are reserved for future versions.
 Messages with unknown version numbers MUST be silently ignored.

 Length Type (L): 2-bit unsigned integer. Indicates the length of
 the variable-length Length field:
 00: no Length field
 01: 1 byte Length field
 10: 2 bytes Length field
 11: 4 bytes Length field

 Token Length (TKL): 4-bit unsigned integer. Indicates the length of
 the variable-length Token field (0-8 bytes). Lengths 9-15 are
 reserved, MUST NOT be sent, and MUST be processed as a message
 format error.

 Code: 8-bit unsigned integer, split into a 3-bit class (most
 significant bits) and a 5-bit detail (least significant bits),
 documented as "c.dd" where "c" is a digit from 0 to 7 for the
 3-bit subfield and "dd" are two digits from 00 to 31 for the 5-bit
 subfield. The class can indicate a request (0), a success
 response (2), a client error response (4), or a server error
 response (5). (All other class values are reserved.) As a
 special case, Code 0.00 indicates an Empty message. In case of a
 request, the Code field indicates the Request Method; in case of a
 response, a Response Code. Possible values are maintained in the
 CoAP Code Registries (Section 12.1). The semantics of requests
 and responses are defined in Section 5.

-- 
-------------------------------------+-------------------------------------
 Reporter:                           |      Owner:  draft-ietf-core-coap-
  [email-masked]          |  [email-masked]
     Type:  protocol defect          |     Status:  new
 Priority:  major                    |  Milestone:
Component:  coap-tcp-tls             |    Version:
 Severity:  -                        |   Keywords:
-------------------------------------+-------------------------------------

Ticket URL: <https://trac.tools.ietf.org/wg/core/trac/ticket/408>
core <https://tools.ietf.org/core/>