Internet-Draft | SCHC considerations | November 2022 |
Lampin | Expires 14 May 2023 | [Page] |
Taking the opportunity of a fresh implementation of SCHC by a newcomer to SCHC to reflect on the design principles and the implications on the implication of SCHC.¶
Topics addressed:¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
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."¶
This Internet-Draft will expire on 14 May 2023.¶
Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This is a reflexion on SCHC [RFC8724] and its use for LPWANs [RFC8376].¶
This document captures the author's reflections during its implementation of the SCHC protocol (C/D) in microSCHC. This is a work-in-progress and might contain mistakes or misinterpretations.¶
This draft re-uses the Terminology defined in [RFC8724].¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
SCHC C/D assumes that both ends of a SCHC communication implement a parser alongside the implementation of the rule matching, compression and decompression procedures. This parser, whose specification is out of scope of the RFC, "is able to identify all the fields encountered in the headers to be compressed, and to label them with a Field ID. Rules only describe the compression/decompression behavior for each header field, after it has been identified." (Section 7.1 of [RFC8724]).¶
Sections 7.1 and 10 and Appendix A provide further insights as to what the parser is expected to output for a field:¶
where type can be anything: integers, bytes, arrays, etc.¶
[RFC8724] does not provide a formal definition of a packet field but the examples provided in Appendix A, figures 26 to 28, suggest the use of the colloquial definition, i.e. a sequence of continuous bits of the frame provided by the underlying layer. For example, the following IPv6 packet would be parsed as 8 fields : IPv6 Version, Traffic Class, etc.¶
Furthermore, parts of the RFC suggest that fields might be seen in a broader sense. Section 7.1 and [RFC8824] refer to the "CoAP URI Path" option as a field and this is further confirmed in [I-D.ietf-lpwan-schc-yang-data-model], where subfields are introduced.¶
The case of "CoAP URI Path" is an interesting one, as it is not a on-the-wire field but an abstract construct based on the decoding and interpretation of on-the-wire fields, namely "CoAP Option Delta", "CoAP Option Length", "CoAP Option Delta Extended" (if any), "CoAP Option Length Extended" (if any) and "CoAP Option Value", illustrated below Figure 2.¶
As illustrated in the previous section, some level of interpretation is expected from the parser which raises the question of its roles and expected capabilities.¶
Depending on the protocol to parse, the parser might be required to execute:¶
[I-D.ietf-lpwan-schc-yang-data-model] provides YANG data models to describe the IPv6, UDP and CoAP headers and those models determine the itemization or, practically speaking, the list of fields, their IDs, the type and encoding of the internal representation used by C/D and so forth.¶
In particular, the CoAP model provided in [I-D.ietf-lpwan-schc-yang-data-model] lists CoAP Options as fields but not the raw fields constituting the CoAP Option header on-the-wire. A SCHC parser implementation must therefore include some level of interpretation.¶
Depending on the characteristics of the packets to be compressed between two SCHC endpoints, one set of fields representations might provide better compression performance than another. This yields the question of the support of multiple interpretations of the same on-the-wire frame and how to enable it. In particular, does it require to list fields representations in the SCHC data model?¶
Supporting new protocols in SCHC, or extensions of them (e.g. new CoAP Options) requires updating the data model of [I-D.ietf-lpwan-schc-yang-data-model]. Assuming [I-D.ietf-lpwan-schc-yang-data-model] becomes an RFC, it would require updates every now and then. Limiting this need for updates is certainly beneficial.¶
More specifically, should the data model include: CoAP Option Delta, CoAP Option Length, CoAP Option Delta Extended, CoAP Option Length Extended, CoAP Option Value, CoAP Payload Marker?¶
A study on the complexity (memory, code, ...) vs compression efficiency of rules on interpreted fields compared to equivalent rules on raw fields would be interesting.¶