Re: [Last-Call] [lp-wan] [yang-doctors] Yangdoctors last call review of draft-ietf-lpwan-schc-yang-data-model-14

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Joe,

Thanks a lot for your comments, it really improve the document.

On Fri, Jul 15, 2022 at 10:32 PM Joe Clarke (jclarke) <jclarke=40cisco.com@xxxxxxxxxxxxxx> wrote:

Ugh, this didn’t get formatted well at all.  Resending here:

 

- YANG tree has subtle differences from the YANG module; regenerate


done and included in -15. We compress a little bit the yang tree to avoid to have too long lines
which are creating errors with idnits. For instance this one:

           +--:(fragmentation) {fragmentation}?
           |  +--rw fragmentation-mode        schc:fragmentation-mode-type
 
which exceed 1 character.

 

- Run the module through `pyang -f yang`


same thing, the reformatting is creating some too long line errors, so we edited the document
to remove them. For instance the rule figure has been shifted to the left, and some carriage 
return has been added. Is it correct ?

 

- No linting errors, though the copyright needs to be updated


I suppose it is the year in the yang module, we moved from 2021 to 2022. 
The funny thing is that pyang --ietf complains with 2022 and not 2021.

 

- Pet peeve: I prefer descriptions to begin with a capital letter and end with a full-stop '.'


done withour breaking the line size constaint :-) 

 

- Many descriptions (especially of identities) have an RFC in them.  Please make this a reference as well.


done 

 

- For fl-type, if this is a positive integer, why not use an unsigned type?


good catch 

 

- appiid and deviid should be AppIID and DevIID as stated in RFC8724


Do you mean in the identity ? We lowercased all acronyms in the module
- msb
-lsb
-no-ack
...

if we do it for appiid, we should do it everywhere. 

 

- In grouping tv-struct's description: s/enconding/encoding/


done 

 

- Leaf "index" in tv-struct grouping: s/indicia/index/


done 

 

- In leaf field-position: s/occurence/occurrence/


done 

 

- You use "YANG referenceid" a few times, but this isn't a thing per se.  You tend to use

  this to mean an identity reference.  In all cases, though, I think it would be

  best to more clearly state what the leaf is/does and leave out that fact that it

  uses an identityref


done, it becomes:

leaf field-length {
type schc:fl-type;
mandatory true;
description
"Field Length, expressed in number of bits if the length is
known when the Rule is created or through a specific function
if the length is variable.";
} 

leaf direction-indicator {
type schc:di-type;
mandatory true;
description
"Direction Indicator, indicate if this field must be
consider for both directions, or only uplink or
downlink.";
}

 

- In grouping compression-rule-entry: s/identifer/identifier/, but again, I'd leave

  out these YANG bits from descriptions.


done

grouping compression-rule-entry {
description
"These entries defines a compression entry (i.e. a line)
as defined in RFC 8724.

+-------+--+--+--+------------+-----------------+---------------+
|Field 1|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|
+-------+--+--+--+------------+-----------------+---------------+

An entry in a compression rule is composed of 7 elements:
- Field ID: The header field to be compressed.
- Field Length : Either a positive integer of a function.
- Field Position: A positive (and possibly equal to 0)
integer.
- Direction Indicator: An indication in which direction
compression and decompression process is effective.
- Target value: A value against which the header Field is
compared.
- Matching Operator: The comparison operation and optional
associate parameters.
- Comp./Decomp. Action: The compression or decompression
action, and optional parameters.
"; 

 

- In your tv-struct grouping, define "index" as the first leaf.  That seems a bit more logical to me.


done 

 

- For leaf comp-decomp-action, your description is a tautology (which is another pet peeve of mine).

  Can you sweep descriptions and make sure they provide some additional context or at least a reference?


Ok, at least it expends the acronym :-) . We think this remark is also valuable for MO. We changed the description:

identity mo-base-type {
description
"Matching Operator: used in the rule selection process
defined in RFC 8724 (cf. 7.2) to check is a Target Value
matches the field's value.";
reference
"RFC 8724 SCHC: Generic Framework for Static Context
Header Compression and Fragmentation";
}

 


identity cda-base-type {
description
"Compression Decompression Actions. Specify the action to
be applied to the field's value in a specific rule as
defined in RFC8724 (cf. 7.2)" ;
reference
"RFC 8724 SCHC: Generic Framework for Static Context
Header Compression and Fragmentation";
} 

- For something like di-type, does it make sense to be an identity?  Seems like this could be an enumeration

  as I don't think you'll have directions other than up, down, bi?  But maybe you think

  these types may be extended?  Just curious.


We don't know, the problem with enumeration is that it is difficult to extend. We are currently investigate the mesh topology,
so may be another "direction" will appear. As we are not sure that there is only up and down, identity reference is more generic.

 

- In leaf direction: s/bidirectionnal/bidirectional/ and s/forbiden/forbidden/


done 

 

- For w-size, why not use derived-from-or-self here (same in other places where fragmentation-mode is referenced)?


 In fact, I must admit that these function are still a mystery for me. I didn't find a good tutorial on that and I tested them empirically with yangson.
I changed to derived-from-or-self. If I understand derive-from-and-self allows to test an equality and derived-from allows more to test what derives 
from this identity but not the identify itself.

 

- In grouping compression-content: s/identifed/identified/


done 

 

- See Section 3.4 of https://datatracker.ietf.org/doc/html/rfc8407 on how to reference YANG tree diagrams


I don't understand the comment 
 

 

- Why do you have empty cases for the mode choice (e.g., no-ack, ack-always)?  It's not clear you need a choice here.

  And if you need it, you could just have one "when" clause on the case itself.


That's something we had difficulties to handle. We wanted originally to put parameters specific to the 3 frag mode in these choices,
but ACK-Always and ACK-on-Error got some common values, so we moved them in the generic part with some when/must conditions.
Since ACK-on-Error have some specific parameters, they are on the case. The question for us was if we have in the future an augmentation
for one mode, it is better in our views to define the name that will be used to do this augmentation.

We have already an augmentation for ACK-on-Error to support compound-ack.

 

- There is another empty case for the no-compression case in the nature choice.

The description there says that a rule is required. 

- Can one have both

features for compression and fragmentation?  The choice seems to imply no, but

I am curious.  I didn't get the impression that they were mutually exclusive

from 8724.


you are right, that's a big problem, a rule can be of only one nature, and right now we can carry both frag and comp and 
no-frag is transparent since nature does not appear in the data model. 

one solution is to add a leaf which will define the nature of the rule before the choice and test it in each case to see if we allow it.


-----
Any way thank you Joe for your time and the deep and valuable comments, it help us a lot to improve in writing a YANG module. And if you are in Philadelphia, I will be very happy to discuss with you.
I will publish a -15 with all the changes next week. The changes are currently on the lpwan github (https://github.com/lp-wan/datamodel)  and the new version is attached to this mail.

Laurent and Ana

 

From: yang-doctors <yang-doctors-bounces@xxxxxxxx> on behalf of Joe Clarke via Datatracker <noreply@xxxxxxxx>
Date: Friday, July 15, 2022 at 16:29
To: yang-doctors@xxxxxxxx <yang-doctors@xxxxxxxx>
Cc: draft-ietf-lpwan-schc-yang-data-model.all@xxxxxxxx <draft-ietf-lpwan-schc-yang-data-model.all@xxxxxxxx>, last-call@xxxxxxxx <last-call@xxxxxxxx>, lp-wan@xxxxxxxx <lp-wan@xxxxxxxx>
Subject: [yang-doctors] Yangdoctors last call review of draft-ietf-lpwan-schc-yang-data-model-14

Reviewer: Joe Clarke
Review result: Not Ready

I have been tasked to perform a LC review on this draft on behalf of YANG
Doctors.  This document defines a YANG module to codify the rules for Static
Context Header Compression.  While I say that it is "Not Ready" from a LC
perspective, it may be more ready than that lets on.  I have a few questions of
the authors to gain perspective on what they're trying to achieve.  I have also
found a number of issues in the module itself.  See below:

- YANG tree has subtle differences from the YANG module; regenerate
- Run the module through `pyang -f yang` to generate a canonical formatted
version - No linting errors, though the copyright needs to be updated - Pet
peeve: I prefer descriptions to begin with a capital letter and end with a
full-stop '.' - Many descriptions (especially of identities) have an RFC in
them.  Please make this a reference as well. - For fl-type, if this is a
positive integer, why not use an unsigned type? - appiid and deviid should be
AppIID and DevIID as stated in RFC8724 - In grouping tv-struct's description:
s/enconding/encoding/ - Leaf "index" in tv-struct grouping: s/indicia/index/ -
In leaf field-position: s/occurence/occurrence/ - You use "YANG referenceid" a
few times, but this isn't a thing per se.  You tend to use
  this to mean an identity reference.  In all cases, though, I think it would be
  best to more clearly state what the leaf is/does and leave out that fact that
  it uses an identityref
- In grouping compression-rule-entry: s/identifer/identifier/, but again, I'd
leave
  out these YANG bits from descriptions.
- In your tv-struct grouping, define "index" as the first leaf.  That seems a
bit more logical to me. - For leaf comp-decomp-action, your description is a
tautology (which is another pet peeve of mine).
  Can you sweep descriptions and make sure they provide some additional context
  or at least a reference?
- For something like di-type, does it make sense to be an identity?  Seems like
this could be an enumeration
  as I don't think you'll have directions other than up, down, bi?  But maybe
  you think these types may be extended?  Just curious.
- In leaf direction: s/bidirectionnal/bidirectional/ and s/forbiden/forbidden/
- For w-size, why not use derived-from-or-self here (same in other places where
fragmentation-mode is referenced)? - In grouping compression-content:
s/identifed/identified/ - See Section 3.4 of
https://datatracker.ietf.org/doc/html/rfc8407 on how to reference YANG tree
diagrams - Why do you have empty cases for the mode choice (e.g., no-ack,
ack-always)?  It's not clear you need a choice here.
  And if you need it, you could just have one "when" clause on the case itself.
- There is another empty case for the no-compression case in the nature choice.
 The description there says that a rule is required. - Can one have both
features for compression and fragmentation?  The choice seems to imply no, but
I am curious.  I didn't get the impression that they were mutually exclusive
from 8724.


_______________________________________________
yang-doctors mailing list
yang-doctors@xxxxxxxx
https://www.ietf.org/mailman/listinfo/yang-doctors

_______________________________________________
lp-wan mailing list
lp-wan@xxxxxxxx
https://www.ietf.org/mailman/listinfo/lp-wan



lpwan Working Group                                          A. Minaburo
Internet-Draft                                                    Acklio
Intended status: Standards Track                              L. Toutain
Expires: 21 January 2023          Institut MINES TELECOM; IMT Atlantique
                                                            20 July 2022


        Data Model for Static Context Header Compression (SCHC)
                draft-ietf-lpwan-schc-yang-data-model-15

Abstract

   This document describes a YANG data model for the SCHC (Static
   Context Header Compression) compression and fragmentation rules.

Status of This Memo

   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 21 January 2023.

Copyright Notice

   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.






Minaburo & Toutain       Expires 21 January 2023                [Page 1]

Internet-Draft           LPWAN SCHC YANG module                July 2022


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Requirements Language . . . . . . . . . . . . . . . . . . . .   3
   3.  SCHC rules  . . . . . . . . . . . . . . . . . . . . . . . . .   3
     3.1.  Compression Rules . . . . . . . . . . . . . . . . . . . .   4
     3.2.  Identifier generation . . . . . . . . . . . . . . . . . .   4
     3.3.  Convention for Field Identifier . . . . . . . . . . . . .   5
     3.4.  Convention for Field length . . . . . . . . . . . . . . .   6
     3.5.  Convention for Field position . . . . . . . . . . . . . .   6
     3.6.  Convention for Direction Indicator  . . . . . . . . . . .   6
     3.7.  Convention for Target Value . . . . . . . . . . . . . . .   6
     3.8.  Convention for Matching Operator  . . . . . . . . . . . .   7
       3.8.1.  Matching Operator arguments . . . . . . . . . . . . .   7
     3.9.  Convention for Compression Decompression Actions  . . . .   7
       3.9.1.  Compression Decompression Action arguments  . . . . .   7
     3.10. Fragmentation rule  . . . . . . . . . . . . . . . . . . .   7
       3.10.1.  Fragmentation mode . . . . . . . . . . . . . . . . .   7
       3.10.2.  Fragmentation Header . . . . . . . . . . . . . . . .   8
       3.10.3.  Last fragment format . . . . . . . . . . . . . . . .   8
       3.10.4.  Acknowledgment behavior  . . . . . . . . . . . . . .   9
       3.10.5.  Timer values . . . . . . . . . . . . . . . . . . . .   9
       3.10.6.  Fragmentation Parameter  . . . . . . . . . . . . . .  10
       3.10.7.  Layer 2 parameters . . . . . . . . . . . . . . . . .  10
   4.  Rule definition . . . . . . . . . . . . . . . . . . . . . . .  10
     4.1.  Compression rule  . . . . . . . . . . . . . . . . . . . .  11
     4.2.  Fragmentation rule  . . . . . . . . . . . . . . . . . . .  11
     4.3.  YANG Tree . . . . . . . . . . . . . . . . . . . . . . . .  11
   5.  YANG Module . . . . . . . . . . . . . . . . . . . . . . . . .  12
   6.  Implementation Status . . . . . . . . . . . . . . . . . . . .  41
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  41
     7.1.  URI Registration  . . . . . . . . . . . . . . . . . . . .  41
     7.2.  YANG Module Name Registration . . . . . . . . . . . . . .  41
   8.  Security Considerations . . . . . . . . . . . . . . . . . . .  42
   9.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  43
   10. References  . . . . . . . . . . . . . . . . . . . . . . . . .  43
     10.1.  Normative References . . . . . . . . . . . . . . . . . .  43
     10.2.  Informative References . . . . . . . . . . . . . . . . .  44
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  45

1.  Introduction

   SCHC is a compression and fragmentation mechanism for constrained
   networks defined in [RFC8724].  It is based on a static context
   shared by two entities at the boundary of the constrained network.
   [RFC8724] provides a non formal representation of the rules used
   either for compression/decompression (or C/D) or fragmentation/
   reassembly (or F/R).  The goal of this document is to formalize the



Minaburo & Toutain       Expires 21 January 2023                [Page 2]

Internet-Draft           LPWAN SCHC YANG module                July 2022


   description of the rules to offer:

   *  the same definition on both ends, even if the internal
      representation is different.

   *  an update of the other end to set up some specific values (e.g.
      IPv6 prefix, destination address,...)

   *  ...

   [I-D.ietf-lpwan-architecture] illustrates the exchange of rules using
   the YANG data model.

   This document defines a YANG module [RFC7950] to represent both
   compression and fragmentation rules, which leads to common
   representation for values for all the rules elements.

2.  Requirements Language

   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.

3.  SCHC rules

   This document defines a YANG module to represent both compression and
   fragmentation rules, which leads to common representation for values
   for all the rules elements.

   SCHC compression is generic, the main mechanism does not refer to a
   specific protocol.  Any header field is abstracted through an ID, a
   position, a direction, and a value that can be a numerical value or a
   string.  [RFC8724] and [RFC8824] specify fields for IPv6 [RFC8200],
   UDP[RFC0768], CoAP [RFC7252] including options definied for no
   serveur response [RFC7967] and OSCORE [RFC8613].  For the latter
   [RFC8824] splits this field into sub-fields.

   SCHC fragmentation requires a set of common parameters that are
   included in a rule.  These parameters are defined in [RFC8724].

   The YANG data model allows to select the compression or the
   fragmentation using the feature command.







Minaburo & Toutain       Expires 21 January 2023                [Page 3]

Internet-Draft           LPWAN SCHC YANG module                July 2022


3.1.  Compression Rules

   [RFC8724] proposes a non formal representation of the compression
   rule.  A compression context for a device is composed of a set of
   rules.  Each rule contains information to describe a specific field
   in the header to be compressed.

     +-----------------------------------------------------------------+
     |                      Rule N                                     |
    +-----------------------------------------------------------------+|
    |                    Rule i                                       ||
   +-----------------------------------------------------------------+||
   |  (FID)            Rule 1                                        |||
   |+-------+--+--+--+------------+-----------------+---------------+|||
   ||Field 1|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||||
   |+-------+--+--+--+------------+-----------------+---------------+|||
   ||Field 2|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||||
   |+-------+--+--+--+------------+-----------------+---------------+|||
   ||...    |..|..|..|   ...      | ...             | ...           ||||
   |+-------+--+--+--+------------+-----------------+---------------+||/
   ||Field N|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|||
   |+-------+--+--+--+------------+-----------------+---------------+|/
   |                                                                 |
   \-----------------------------------------------------------------/

                Figure 1: Compression Decompression Context

3.2.  Identifier generation

   Identifier used in the SCHC YANG data model are from the identityref
   statement to ensure to be globally unique and be easily augmented if
   needed.  The principle to define a new type based on a group of
   identityref is the following:

   *  define a main identity ending with the keyword base-type.

   *  derive all the identities used in the Data Model from this base
      type.

   *  create a typedef from this base type.

   The example (Figure 2) shows how an identityref is created for RCS
   (Reassembly Check Sequence) algorithms used during SCHC
   fragmentation.







Minaburo & Toutain       Expires 21 January 2023                [Page 4]

Internet-Draft           LPWAN SCHC YANG module                July 2022


    // -- RCS algorithm types

     identity rcs-algorithm-base-type {
       description
         "Identify which algorithm is used to compute RCS.
          The algorithm also defines the size of the RCS field.";
     }

     identity rcs-RFC8724 {
       base rcs-algorithm-base-type;
       description
         "CRC 32 defined as default RCS in RFC8724. RCS is 4 byte-long";
     }

     typedef rcs-algorithm-type {
       type identityref {
         base rcs-algorithm-base-type;
       }
       description
         "type used in rules.";
     }

         Figure 2: Principle to define a type based on identityref.

3.3.  Convention for Field Identifier

   In the process of compression, the headers of the original packet are
   first parsed to create a list of fields.  This list of fields is
   matched against the rules to find the appropriate rule and apply
   compression.  [RFC8724] does not state how the field ID value is
   constructed.  In examples, identification is done through a string
   indexed by the protocol name (e.g.  IPv6.version, CoAP.version,...).

   The current YANG data model includes fields definitions found in
   [RFC8724], [RFC8824].

   Using the YANG data model, each field MUST be identified through a
   global YANG identityref.  A YANG field ID for the protocol is always
   derived from the fid-base-type.  Then an identity for each protocol
   is specified using the naming convention fid-<<protocol name>>-base-
   type.  All possible fields for this protocol MUST derive from the
   protocol identity.  The naming convention is "fid" followed by the
   protocol name and the field name.  If a field has to be divided into
   sub-fields, the field identity serves as a base.

   The full field-id definition is found in Section 5.  A type is
   defined for IPv6 protocol, and each field is based on it.  Note that
   the DiffServ bits derives from the Traffic Class identity.



Minaburo & Toutain       Expires 21 January 2023                [Page 5]

Internet-Draft           LPWAN SCHC YANG module                July 2022


3.4.  Convention for Field length

   Field length is either an integer giving the size of a field in bits
   or a specific function.  [RFC8724] defines the "var" function which
   allows variable length fields (whose length is expressed in bytes)
   and [RFC8824] defines the "tkl" function for managing the CoAP Token
   length field.

   The naming convention is "fl" followed by the function name.

   The field length function can be defined as an identityref as
   described in Section 5.  Therefore, the type for field length is a
   union between an integer giving in bits the size of the length and
   the identityref.

3.5.  Convention for Field position

   Field position is a positive integer which gives the position of a
   field, the default value is 1, and incremented at each repetition.
   value 0 indicates that the position is not important and is not
   considered during the rule selection process.

   Field position is a positive integer.  The type is an uint8.

3.6.  Convention for Direction Indicator

   The Direction Indicator (di) is used to tell if a field appears in
   both direction (Bi) or only uplink (Up) or Downlink (Dw).  The naming
   convention is "di" followed by the Direction Indicator name.

   The type is "di-type".

3.7.  Convention for Target Value

   The Target Value is a list of binary sequences of any length, aligned
   to the left.  In the rule, the structure will be used as a list, with
   index as a key.  The highest index value is used to compute the size
   of the index sent in residue for the match-mapping CDA (Compression
   Decompression Action).  The index allows to specify several values:

   *  For Equal and LSB, Target Value contains a single element.
      Therefore, the index is set to 0.

   *  For match-mapping, Target Value can contain several elements.
      Index values MUST start from 0 and MUST be contiguous.

   If the header field contains a text, the binary sequence uses the
   same enconding.



Minaburo & Toutain       Expires 21 January 2023                [Page 6]

Internet-Draft           LPWAN SCHC YANG module                July 2022


3.8.  Convention for Matching Operator

   Matching Operator (MO) is a function applied between a field value
   provided by the parsed header and the target value.  [RFC8724]
   defines 4 MO.

   The naming convention is "mo" followed by the MO name.

   The type is "mo-type"

3.8.1.  Matching Operator arguments

   They are viewed as a list, built with a tv-struct (see chapter
   Section 3.7).

3.9.  Convention for Compression Decompression Actions

   Compression Decompression Action (CDA) identifies the function to use
   for compression or decompression.  [RFC8724] defines 6 CDA.

   The naming convention is "cda" followed by the CDA name.

3.9.1.  Compression Decompression Action arguments

   Currently no CDA requires arguments, but in the future some CDA may
   require one or several arguments.  They are viewed as a list, of
   target-value type.

3.10.  Fragmentation rule

   Fragmentation is optional in the data model and depends on the
   presence of the "fragmentation" feature.

   Most of the fragmentation parameters are listed in Annex D of
   [RFC8724].

   Since fragmentation rules work for a specific direction, they MUST
   contain a mandatory direction indicator.  The type is the same as the
   one used in compression entries, but bidirectional MUST NOT be used.

3.10.1.  Fragmentation mode

   [RFC8724] defines 3 fragmentation modes:

   *  No Ack: this mode is unidirectionnal, no acknowledgment is sent
      back.





Minaburo & Toutain       Expires 21 January 2023                [Page 7]

Internet-Draft           LPWAN SCHC YANG module                July 2022


   *  Ack Always: each fragmentation window must be explicitly
      acknowledged before going to the next.

   *  Ack on Error: A window is acknowledged only when the receiver
      detects some missing fragments.

   The type is "fragmentation-mode-type".  The naming convention is
   "fragmentation-mode" followed by the fragmentation mode name.

3.10.2.  Fragmentation Header

   A data fragment header, starting with the rule ID can be sent on the
   fragmentation direction.  [RFC8724] indicates that the SCHC header
   may be composed of (cf.  Figure 3):

   *  a Datagram Tag (Dtag) identifying the datagram being fragmented if
      the fragmentation applies concurrently on several datagrams.  This
      field in optional and its length is defined by the rule.

   *  a Window (W) used in Ack-Always and Ack-on-Error modes.  In Ack-
      Always, its size is 1.  In Ack-on-Error, it depends on the rule.
      This field is not needed in No-Ack mode.

   *  a Fragment Compressed Number (FCN) indicating the fragment/tile
      position within the window.  This field is mandatory on all modes
      defined in [RFC8724], its size is defined by the rule.

   |-- SCHC Fragment Header ----|
            |-- T --|-M-|-- N --|
   +-- ... -+- ... -+---+- ... -+--------...-------+~~~~~~~~~~~~~~~~~~~~
   | RuleID | DTag  | W |  FCN  | Fragment Payload | padding (as needed)
   +-- ... -+- ... -+---+- ... -+--------...-------+~~~~~~~~~~~~~~~~~~~~

                Figure 3: Data fragment header from RFC8724

3.10.3.  Last fragment format

   The last fragment of a datagram is sent with an RCS (Reassembly Check
   Sequence) field to detect residual transmission error and possible
   losses in the last window.  [RFC8724] defines a single algorithm
   based on Ethernet CRC computation.

   The naming convention is "rcs" followed by the algorithm name.

   For Ack-on-Error mode, the All-1 fragment may just contain the RCS or
   can include a tile.  The parameters defines the behavior:

   *  all-1-data-no: the last fragment contains no data, just the RCS



Minaburo & Toutain       Expires 21 January 2023                [Page 8]

Internet-Draft           LPWAN SCHC YANG module                July 2022


   *  all-1-data-yes: the last fragment includes a single tile and the
      RCS

   *  all-1-data-sender-choice: the last fragment may or may not contain
      a single tile.  The receiver can detect if a tile is present.

   The naming convention is "all-1-data" followed by the behavior
   identifier.

3.10.4.  Acknowledgment behavior

   The acknowledgment fragment header goes in the opposite direction of
   data.  [RFC8724] defines the header, composed of (see Figure 4):

   *  a Dtag (if present).

   *  a mandatory window as in the data fragment.

   *  a C bit giving the status of RCS validation.  In case of failure,
      a bitmap follows, indicating the received tile.

   |--- SCHC ACK Header ----|
            |-- T --|-M-| 1 |
   +-- ... -+- ... -+---+---+~~~~~~~~~~~~~~~~~~
   | RuleID |  DTag | W |C=1| padding as needed                (success)
   +-- ... -+- ... -+---+---+~~~~~~~~~~~~~~~~~~

   +-- ... -+- ... -+---+---+------ ... ------+~~~~~~~~~~~~~~~
   | RuleID |  DTag | W |C=0|Compressed Bitmap| pad. as needed (failure)
   +-- ... -+- ... -+---+---+------ ... ------+~~~~~~~~~~~~~~~

            Figure 4: Acknowledgment fragment header for RFC8724

   For Ack-on-Error, SCHC defines when an acknowledgment can be sent.
   This can be at any time defined by the layer 2, at the end of a
   window (FCN all-0) or as a response to receiving the last fragment
   (FCN all-1).  The naming convention is "ack-behavior" followed by the
   algorithm name.

3.10.5.  Timer values

   The state machine requires some common values to handle correctly
   fragmentation.

   *  retransmission-timer gives the duration before sending an ack
      request (cf. section 8.2.2.4. of [RFC8724]).  If specified, value
      must be strictly positive.




Minaburo & Toutain       Expires 21 January 2023                [Page 9]

Internet-Draft           LPWAN SCHC YANG module                July 2022


   *  inactivity-timer gives the duration before aborting a
      fragmentation session (cf. section 8.2.2.4. of [RFC8724]).  The
      value 0 explicitly indicates that this timer is disabled.

   [RFC8724] do not specified any range for these timers.  [RFC9011]
   recommends a duration of 12 hours.  In fact, the value range sould be
   between milliseconds for real time systems to several days.  To allow
   a large range of applications, two parameters must be specified:

   *  the duration of a tick.  It is computed by this formula 2^tick-
      duration/10^6.  When tick-duration is set to 0, the unit is the
      microsecond.  The default value of 20 leads to a unit of 1.048575
      second.  A value of 32 leads to a tick duration of about 1 hour 11
      minutes.

   *  the number of ticks in the predefined unit.  With the default
      tick-duration value of 20, the timers can cover a range between
      1.0 sec and 19 hours covering [RFC9011] recommandation.

3.10.6.  Fragmentation Parameter

   The SCHC fragmentation protocol specifies the the number of attempts
   before aborting through the parameter:

   *  max-ack-requests (cf. section 8.2.2.4. of [RFC8724]).

3.10.7.  Layer 2 parameters

   The data model includes two parameters needed for fragmentation:

   *  l2-word-size: [RFC8724] base fragmentation, in bits, on a layer 2
      word which can be of any length.  The default value is 8 and
      correspond to the default value for byte aligned layer 2.  A value
      of 1 will indicate that there is no alignment and no need for
      padding.

   *  maximum-packet-size: defines the maximum size of a uncompressed
      datagram.  By default, the value is set to 1280 bytes.

   They are defined as unsigned integer, see Section 5.

4.  Rule definition

   A rule is idenfied by a unique rule identifier (rule ID) comprising
   both a Rule ID value and a Rule ID length.  The YANG grouping rule-
   id-type defines the structure used to represent a rule ID.  A length
   of 0 is allowed to represent an implicit rule.




Minaburo & Toutain       Expires 21 January 2023               [Page 10]

Internet-Draft           LPWAN SCHC YANG module                July 2022


   Three types of rules are defined in [RFC8724]:

   *  Compression: a compression rule is associated with the rule ID.

   *  No compression: this identifies the default rule used to send a
      packet in extenso when no compression rule was found (see
      [RFC8724] section 6).

   *  Fragmentation: fragmentation parameters are associated with the
      rule ID.  Fragmentation is optional and feature "fragmentation"
      should be set.

   To access a specific rule, the rule ID length and value are used as a
   key.  The rule is either a compression or a fragmentation rule.

4.1.  Compression rule

   A compression rule is composed of entries describing its processing.
   An entry contains all the information defined in Figure 1 with the
   types defined above.

   The compression rule described Figure 1 is defined by compression-
   content.  It defines a list of compression-rule-entry, indexed by
   their field id, position and direction.  The compression-rule-entry
   element represent a line of the table Figure 1.  Their type reflects
   the identifier types defined in Section 3.1

   Some checks are performed on the values:

   *  target value must be present for MO different from ignore.

   *  when MSB MO is specified, the matching-operator-value must be
      present

4.2.  Fragmentation rule

   A Fragmentation rule is composed of entries describing the protocol
   behavior.  Some on them are numerical entries, others are identifiers
   defined in Section 3.10.

4.3.  YANG Tree

module: ietf-schc
  +--rw schc
     +--rw rule* [rule-id-value rule-id-length]
        +--rw rule-id-value                   uint32
        +--rw rule-id-length                  uint8
        +--rw (nature)?



Minaburo & Toutain       Expires 21 January 2023               [Page 11]

Internet-Draft           LPWAN SCHC YANG module                July 2022


           +--:(fragmentation) {fragmentation}?
           |  +--rw fragmentation-mode      schc:fragmentation-mode-type
           |  +--rw l2-word-size?             uint8
           |  +--rw direction                 schc:di-type
           |  +--rw dtag-size?                uint8
           |  +--rw w-size?                   uint8
           |  +--rw fcn-size                  uint8
           |  +--rw rcs-algorithm?            rcs-algorithm-type
           |  +--rw maximum-packet-size?      uint16
           |  +--rw window-size?              uint16
           |  +--rw max-interleaved-frames?   uint8
           |  +--rw inactivity-timer
           |  |  +--rw ticks-duration?   uint8
           |  |  +--rw ticks-numbers?    uint16
           |  +--rw retransmission-timer
           |  |  +--rw ticks-duration?   uint8
           |  |  +--rw ticks-numbers?    uint16
           |  +--rw max-ack-requests?         uint8
           |  +--rw (mode)?
           |     +--:(no-ack)
           |     +--:(ack-always)
           |     +--:(ack-on-error)
           |        +--rw tile-size?          uint8
           |        +--rw tile-in-all-1?      schc:all-1-data-type
           |        +--rw ack-behavior?       schc:ack-behavior-type
           +--:(compression) {compression}?
           |  +--rw entry* [field-id field-position direction-indicator]
           |     +--rw field-id                    schc:fid-type
           |     +--rw field-length                schc:fl-type
           |     +--rw field-position              uint8
           |     +--rw direction-indicator         schc:di-type
           |     +--rw target-value* [index]
           |     |  +--rw value?   binary
           |     |  +--rw index    uint16
           |     +--rw matching-operator           schc:mo-type
           |     +--rw matching-operator-value* [index]
           |     |  +--rw value?   binary
           |     |  +--rw index    uint16
           |     +--rw comp-decomp-action          schc:cda-type
           |     +--rw comp-decomp-action-value* [index]
           |        +--rw value?   binary
           |        +--rw index    uint16
           +--:(no-compression)

                               Figure 5

5.  YANG Module




Minaburo & Toutain       Expires 21 January 2023               [Page 12]

Internet-Draft           LPWAN SCHC YANG module                July 2022


   <CODE BEGINS> file "ietf-schc@xxxxxxxxxxxxxxx"
   module ietf-schc {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-schc";
     prefix schc;

     organization
       "IETF IPv6 over Low Power Wide-Area Networks (lpwan) working
        group";
     contact
       "WG Web:   <https://datatracker.ietf.org/wg/lpwan/about/>
        WG List:  <mailto:p-wan@xxxxxxxx>
        Editor:   Laurent Toutain
          <mailto:laurent.toutain@xxxxxxxxxxxxxxxxx>
        Editor:   Ana Minaburo
          <mailto:ana@xxxxxxx>";
     description
       "
        Copyright (c) 2022 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject to
        the license terms contained in, the Simplified BSD License set
        forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (https://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC XXXX
        (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
        for full legal notices.

        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 (RFC 2119) (RFC 8174) when, and only when,
        they appear in all capitals, as shown here.

        ***************************************************************

        Generic Data model for Static Context Header Compression Rule
        for SCHC, based on RFC 8724 and RFC8824. Include compression,
        no compression and fragmentation rules.

        This module is a YANG model for SCHC rules (RFC 8724 and
        RFC8824). RFC 8724 describes compression rules in a abstract
        way through a table.




Minaburo & Toutain       Expires 21 January 2023               [Page 13]

Internet-Draft           LPWAN SCHC YANG module                July 2022


    |-----------------------------------------------------------------|
    |  (FID)            Rule 1                                        |
    |+-------+--+--+--+------------+-----------------+---------------+|
    ||Field 1|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||
    |+-------+--+--+--+------------+-----------------+---------------+|
    ||Field 2|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||
    |+-------+--+--+--+------------+-----------------+---------------+|
    ||...    |..|..|..|   ...      | ...             | ...           ||
    |+-------+--+--+--+------------+-----------------+---------------+|
    ||Field N|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||
    |+-------+--+--+--+------------+-----------------+---------------+|
    |-----------------------------------------------------------------|

        This module proposes a global data model that can be used for
        rule exchanges or modification. It proposes both the data model
        format and the global identifiers used to describe some
        operations in fields.
        This data model applies to both compression and fragmentation.";

     revision 2022-07-20 {
       description
         "Initial version from RFC XXXX.";
       reference
         "RFC XXX: Data Model for Static Context Header Compression
          (SCHC)";
     }

     feature compression {
       description
         "SCHC compression capabilities are taken into account.";
     }

     feature fragmentation {
       description
         "SCHC fragmentation capabilities are taken into account.";
     }

     // -------------------------
     //  Field ID type definition
     //--------------------------
     // generic value TV definition

     identity fid-base-type {
       description
         "Field ID base type for all fields.";
     }

     identity fid-ipv6-base-type {



Minaburo & Toutain       Expires 21 January 2023               [Page 14]

Internet-Draft           LPWAN SCHC YANG module                July 2022


       base fid-base-type;
       description
         "Field ID base type for IPv6 headers described in RFC 8200.";
       reference
         "RFC 8200 Internet Protocol, Version 6 (IPv6) Specification";
     }

     identity fid-ipv6-version {
       base fid-ipv6-base-type;
       description
         "IPv6 version field from RFC 8200.";
       reference
         "RFC 8200 Internet Protocol, Version 6 (IPv6) Specification";
     }

     identity fid-ipv6-trafficclass {
       base fid-ipv6-base-type;
       description
         "IPv6 Traffic Class field from RFC 8200.";
       reference
         "RFC 8200 Internet Protocol, Version 6 (IPv6) Specification";
     }

     identity fid-ipv6-trafficclass-ds {
       base fid-ipv6-trafficclass;
       description
         "IPv6 Traffic Class field from RFC 8200,
          DiffServ field from RFC 3168.";
       reference
         "RFC 3168 The Addition of Explicit Congestion Notification
                   (ECN) to IP";
     }

     identity fid-ipv6-trafficclass-ecn {
       base fid-ipv6-trafficclass;
       description
         "IPv6 Traffic Class field from RFC 8200,
          ECN field from RFC 3168.";
       reference
         "RFC 3168 The Addition of Explicit Congestion Notification
                   (ECN) to IP";
     }

     identity fid-ipv6-flowlabel {
       base fid-ipv6-base-type;
       description
         "IPv6 Flow Label field from RFC8200.";
       reference



Minaburo & Toutain       Expires 21 January 2023               [Page 15]

Internet-Draft           LPWAN SCHC YANG module                July 2022


         "RFC 8200 Internet Protocol, Version 6 (IPv6) Specification";
     }

     identity fid-ipv6-payload-length {
       base fid-ipv6-base-type;
       description
         "IPv6 Payload Length field from RFC8200.";
       reference
         "RFC 8200 Internet Protocol, Version 6 (IPv6) Specification";
     }

     identity fid-ipv6-nextheader {
       base fid-ipv6-base-type;
       description
         "IPv6 Next Header field from RFC8200.";
       reference
         "RFC 8200 Internet Protocol, Version 6 (IPv6) Specification";
     }

     identity fid-ipv6-hoplimit {
       base fid-ipv6-base-type;
       description
         "IPv6 Next Header field from RFC8200.";
       reference
         "RFC 8200 Internet Protocol, Version 6 (IPv6) Specification";
     }

     identity fid-ipv6-devprefix {
       base fid-ipv6-base-type;
       description
         "Corresponds to either the source address or the destination
          address prefix of RFC 8200. Depending if it is
          respectively an uplink or a downlink message.";
       reference
         "RFC 8200 Internet Protocol, Version 6 (IPv6) Specification";
     }

     identity fid-ipv6-deviid {
       base fid-ipv6-base-type;
       description
         "Corresponds to either the source address or the destination
          address prefix of RFC 8200. Depending if it is respectively
          an uplink or a downlink message.";
       reference
         "RFC 8200 Internet Protocol, Version 6 (IPv6) Specification";
     }

     identity fid-ipv6-appprefix {



Minaburo & Toutain       Expires 21 January 2023               [Page 16]

Internet-Draft           LPWAN SCHC YANG module                July 2022


       base fid-ipv6-base-type;
       description
         "Corresponds to either the source address or the destination
          address prefix of RFC 8200. Depending if it is respectively
          a downlink or an uplink message.";
       reference
         "RFC 8200 Internet Protocol, Version 6 (IPv6) Specification";
     }

     identity fid-ipv6-appiid {
       base fid-ipv6-base-type;
       description
         "Corresponds to either the source address or the destination
          address prefix of RFC 8200. Depending if it is respectively
          a downlink or an uplink message.";
         reference
         "RFC 8200 Internet Protocol, Version 6 (IPv6) Specification";
     }

     identity fid-udp-base-type {
       base fid-base-type;
       description
         "Field ID base type for UDP headers described in RFC 768.";
       reference
         "RFC 768 User Datagram Protocol";
     }

     identity fid-udp-dev-port {
       base fid-udp-base-type;
       description
         "UDP source or destination port from RFC 768, if uplink or
          downlink communication, respectively.";
       reference
         "RFC 768 User Datagram Protocol";
     }

     identity fid-udp-app-port {
       base fid-udp-base-type;
       description
         "UDP destination or source port from RFC 768, if uplink or
          downlink communication, respectively.";
       reference
         "RFC 768 User Datagram Protocol";
     }

     identity fid-udp-length {
       base fid-udp-base-type;
       description



Minaburo & Toutain       Expires 21 January 2023               [Page 17]

Internet-Draft           LPWAN SCHC YANG module                July 2022


         "UDP length from RFC 768.";
       reference
         "RFC 768 User Datagram Protocol";
     }

     identity fid-udp-checksum {
       base fid-udp-base-type;
       description
         "UDP length from RFC 768.";
       reference
         "RFC 768 User Datagram Protocol";
     }

     identity fid-coap-base-type {
       base fid-base-type;
       description
         "Field ID base type for UDP headers described in RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-version {
       base fid-coap-base-type;
       description
         "CoAP version from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-type {
       base fid-coap-base-type;
       description
         "CoAP type from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-tkl {
       base fid-coap-base-type;
       description
         "CoAP token length from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-code {
       base fid-coap-base-type;
       description



Minaburo & Toutain       Expires 21 January 2023               [Page 18]

Internet-Draft           LPWAN SCHC YANG module                July 2022


         "CoAP code from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-code-class {
       base fid-coap-code;
       description
         "CoAP code class from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-code-detail {
       base fid-coap-code;
       description
         "CoAP code detail from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-mid {
       base fid-coap-base-type;
       description
         "CoAP message ID from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
   }

     identity fid-coap-token {
       base fid-coap-base-type;
       description
         "CoAP token from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-if-match {
       base fid-coap-base-type;
       description
         "CoAP option If-Match from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-uri-host {
       base fid-coap-base-type;
       description



Minaburo & Toutain       Expires 21 January 2023               [Page 19]

Internet-Draft           LPWAN SCHC YANG module                July 2022


         "CoAP option URI-Host from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-etag {
       base fid-coap-base-type;
       description
         "CoAP option Etag from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-if-none-match {
       base fid-coap-base-type;
       description
         "CoAP option if-none-match from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-observe {
       base fid-coap-base-type;
       description
         "CoAP option Observe from RFC 7641.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-uri-port {
       base fid-coap-base-type;
       description
         "CoAP option Uri-Port from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-location-path {
       base fid-coap-base-type;
       description
         "CoAP option Location-Path from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-uri-path {
       base fid-coap-base-type;
       description



Minaburo & Toutain       Expires 21 January 2023               [Page 20]

Internet-Draft           LPWAN SCHC YANG module                July 2022


         "CoAP option Uri-Path from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-content-format {
       base fid-coap-base-type;
       description
         "CoAP option Content Format from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-max-age {
       base fid-coap-base-type;
       description
         "CoAP option Max-Age from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-uri-query {
       base fid-coap-base-type;
       description
         "CoAP option Uri-Query from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-accept {
       base fid-coap-base-type;
       description
         "CoAP option Accept from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-location-query {
       base fid-coap-base-type;
       description
         "CoAP option Location-Query from RFC 7252.";
       reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-block2 {
       base fid-coap-base-type;
       description



Minaburo & Toutain       Expires 21 January 2023               [Page 21]

Internet-Draft           LPWAN SCHC YANG module                July 2022


         "CoAP option Block2 from RFC 7959.";
       reference
         "RFC 7959 Block-Wise Transfers in the Constrained
                   Application Protocol (CoAP)";
     }

     identity fid-coap-option-block1 {
       base fid-coap-base-type;
       description
         "CoAP option Block1 from RFC 7959.";
       reference
         "RFC 7959 Block-Wise Transfers in the Constrained
                   Application Protocol (CoAP)";   }

     identity fid-coap-option-size2 {
       base fid-coap-base-type;
       description
         "CoAP option size2 from RFC 7959.";
       reference
         "RFC 7959 Block-Wise Transfers in the Constrained
                   Application Protocol (CoAP)";
     }

     identity fid-coap-option-proxy-uri {
       base fid-coap-base-type;
       description
         "CoAP option Proxy-Uri from RFC 7252.";
      reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";    }

     identity fid-coap-option-proxy-scheme {
       base fid-coap-base-type;
       description
         "CoAP option Proxy-scheme from RFC 7252.";
      reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";    }

     identity fid-coap-option-size1 {
       base fid-coap-base-type;
       description
         "CoAP option Size1 from RFC 7252.";
      reference
         "RFC 7252 The Constrained Application Protocol (CoAP)";    }

     identity fid-coap-option-no-response {
       base fid-coap-base-type;
       description
         "CoAP option No response from RFC 7967.";



Minaburo & Toutain       Expires 21 January 2023               [Page 22]

Internet-Draft           LPWAN SCHC YANG module                July 2022


       reference
         "RFC 7967 Constrained Application Protocol (CoAP)
                   Option for No Server Response";
     }

     identity fid-oscore-base-type {
       base fid-coap-type;
       description
         "OSCORE options (RFC8613) split by RFC 8824 in sub options.";
       reference
         "RFC 8824 Static Context Header Compression (SCHC) for the
                   Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-oscore-flags {
       base fid-oscore-base-type;
       description
         "CoAP option oscore flags (see RFC 8824, section 6.4).";
       reference
         "RFC 8824 Static Context Header Compression (SCHC) for the
                   Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-oscore-piv {
       base fid-oscore-base-type;
       description
         "CoAP option oscore flags (see RFC 8824, section 6.4).";
       reference
         "RFC 8824 Static Context Header Compression (SCHC) for the
                   Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-oscore-kid {
       base fid-oscore-base-type;
       description
         "CoAP option oscore flags (see RFC 8824, section 6.4).";
       reference
         "RFC 8824 Static Context Header Compression (SCHC) for the
                   Constrained Application Protocol (CoAP)";
     }

     identity fid-coap-option-oscore-kidctx {
       base fid-oscore-base-type;
       description
         "CoAP option oscore flags (see RFC 8824, section 6.4).";
       reference
         "RFC 8824 Static Context Header Compression (SCHC) for the
                   Constrained Application Protocol (CoAP)";



Minaburo & Toutain       Expires 21 January 2023               [Page 23]

Internet-Draft           LPWAN SCHC YANG module                July 2022


     }

     //----------------------------------
     // Field Length type definition
     //----------------------------------

     identity fl-base-type {
       description
         "Used to extend field length functions.";
     }

     identity fl-variable {
       base fl-base-type;
       description
         "Residue length in Byte is sent as defined
          for CoAP in RFC 8824 (cf. 5.3).";
       reference
         "RFC 8824 Static Context Header Compression (SCHC) for the
                   Constrained Application Protocol (CoAP)";
     }

     identity fl-token-length {
       base fl-base-type;
       description
         "Residue length in Byte is sent as defined
          for CoAP in RFC 8824 (cf. 4.5).";
       reference
         "RFC 8824 Static Context Header Compression (SCHC) for the
                   Constrained Application Protocol (CoAP)";
     }

     //---------------------------------
     // Direction Indicator type
     //---------------------------------

     identity di-base-type {
       description
         "Used to extend direction indicators.";
     }

     identity di-bidirectional {
       base di-base-type;
       description
         "Direction Indication of bidirectionality in
          RFC 8724 (cf. 7.1).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";



Minaburo & Toutain       Expires 21 January 2023               [Page 24]

Internet-Draft           LPWAN SCHC YANG module                July 2022


     }

     identity di-up {
       base di-base-type;
       description
         "Direction Indication of uplink defined in
          RFC 8724 (cf. 7.1).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     identity di-down {
       base di-base-type;
       description
         "Direction Indication of downlink defined in
          RFC 8724 (cf. 7.1).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     //----------------------------------
     // Matching Operator type definition
     //----------------------------------

     identity mo-base-type {
       description
         "Matching Operator: used in the rule selection process
          defined in RFC 8724 (cf. 7.2) to check is a Target Value
          matches the field's value.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     identity mo-equal {
       base mo-base-type;
       description
         "equal MO as defined in RFC 8724 (cf. 7.3).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     identity mo-ignore {
       base mo-base-type;
       description



Minaburo & Toutain       Expires 21 January 2023               [Page 25]

Internet-Draft           LPWAN SCHC YANG module                July 2022


         "ignore MO as defined in RFC 8724 (cf. 7.3).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     identity mo-msb {
       base mo-base-type;
       description
         "MSB MO as defined in RFC 8724 (cf. 7.3).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     identity mo-match-mapping {
       base mo-base-type;
       description
         "match-mapping MO as defined in RFC 8724 (cf. 7.3).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     //------------------------------
     // CDA type definition
     //------------------------------

     identity cda-base-type {
       description
         "Compression Decompression Actions. Specify the action to
          be applied to the field's value in a specific rule as
          defined in RFC8724 (cf. 7.2)" ;
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     identity cda-not-sent {
       base cda-base-type;
       description
         "not-sent CDA as defined in RFC 8724 (cf. 7.4).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     identity cda-value-sent {



Minaburo & Toutain       Expires 21 January 2023               [Page 26]

Internet-Draft           LPWAN SCHC YANG module                July 2022


       base cda-base-type;
       description
         "value-sent CDA as defined in RFC 8724 (cf. 7.4).";
     }

     identity cda-lsb {
       base cda-base-type;
       description
         "LSB CDA as defined in RFC 8724 (cf. 7.4).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     identity cda-mapping-sent {
       base cda-base-type;
       description
         "mapping-sent CDA as defined in RFC 8724 (cf. 7.4).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     identity cda-compute {
       base cda-base-type;
       description
         "compute-* CDA as defined in RFC 8724 (cf. 7.4).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     identity cda-deviid {
       base cda-base-type;
       description
         "deviid CDA as defined in RFC 8724 (cf. 7.4).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";
     }

     identity cda-appiid {
       base cda-base-type;
       description
         "appiid CDA as defined in RFC 8724 (cf. 7.4).";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context
                   Header Compression and Fragmentation";



Minaburo & Toutain       Expires 21 January 2023               [Page 27]

Internet-Draft           LPWAN SCHC YANG module                July 2022


     }

     // -- type definition

     typedef fid-type {
       type identityref {
         base fid-base-type;
       }
       description
         "Field ID generic type.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     typedef fl-type {
       type union {
         type uint64; /* positive integer, expressing length in bits */
         type identityref { /* function */
           base fl-base-type;
         }
       }
       description
         "Field length either a positive integer expressing the size in
          bits or a function defined through an identityref.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     typedef di-type {
       type identityref {
         base di-base-type;
       }
       description
         "Direction in LPWAN network, up when emitted by the device,
          down when received by the device, bi when emitted or
          received by the device.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     typedef mo-type {
       type identityref {
         base mo-base-type;
       }
       description



Minaburo & Toutain       Expires 21 January 2023               [Page 28]

Internet-Draft           LPWAN SCHC YANG module                July 2022


         "Matching Operator (MO) to compare fields values with
          target values.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     typedef cda-type {
       type identityref {
         base cda-base-type;
       }
       description
         "Compression Decompression Action to compression or
          decompress a field.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     // -- FRAGMENTATION TYPE
     // -- fragmentation modes

     identity fragmentation-mode-base-type {
       description
         "Define the fragmentation mode.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     identity fragmentation-mode-no-ack {
       base fragmentation-mode-base-type;
       description
         "No-ACK of RFC8724.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     identity fragmentation-mode-ack-always {
       base fragmentation-mode-base-type;
       description
         "ACK-Always of RFC8724.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }




Minaburo & Toutain       Expires 21 January 2023               [Page 29]

Internet-Draft           LPWAN SCHC YANG module                July 2022


     identity fragmentation-mode-ack-on-error {
       base fragmentation-mode-base-type;
       description
         "ACK-on-Error of RFC8724.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     typedef fragmentation-mode-type {
       type identityref {
         base fragmentation-mode-base-type;
       }
       description
         "Define the type used for fragmentation mode in rules.";
     }

     // -- Ack behavior

     identity ack-behavior-base-type {
       description
         "Define when to send an Acknowledgment .";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     identity ack-behavior-after-all-0 {
       base ack-behavior-base-type;
       description
         "Fragmentation expects Ack after sending All-0 fragment.";
     }

     identity ack-behavior-after-all-1 {
       base ack-behavior-base-type;
       description
         "Fragmentation expects Ack after sending All-1 fragment.";
     }

     identity ack-behavior-by-layer2 {
       base ack-behavior-base-type;
       description
         "Layer 2 defines when to send an Ack.";
     }

     typedef ack-behavior-type {
       type identityref {
         base ack-behavior-base-type;



Minaburo & Toutain       Expires 21 January 2023               [Page 30]

Internet-Draft           LPWAN SCHC YANG module                July 2022


       }
       description
         "Define the type used for Ack behavior in rules.";
     }

     // -- All-1 with data types

     identity all-1-data-base-type {
       description
         "Type to define when to send an Acknowledgment message.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     identity all-1-data-no {
       base all-1-data-base-type;
       description
         "All-1 contains no tiles.";
     }

     identity all-1-data-yes {
       base all-1-data-base-type;
       description
         "All-1 MUST contain a tile.";
     }

     identity all-1-data-sender-choice {
       base all-1-data-base-type;
       description
         "Fragmentation process chooses to send tiles or not in All-1.";
     }

     typedef all-1-data-type {
       type identityref {
         base all-1-data-base-type;
       }
       description
         "Define the type used for All-1 format in rules.";
     }

     // -- RCS algorithm types

     identity rcs-algorithm-base-type {
       description
         "Identify which algorithm is used to compute RCS.
          The algorithm also defines the size of the RCS field.";
       reference



Minaburo & Toutain       Expires 21 January 2023               [Page 31]

Internet-Draft           LPWAN SCHC YANG module                July 2022


         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     identity rcs-RFC8724 {
       base rcs-algorithm-base-type;
       description
         "CRC 32 defined as default RCS in RFC8724. This RCS is
          4 byte-long.";
     }

     typedef rcs-algorithm-type {
       type identityref {
         base rcs-algorithm-base-type;
       }
       description
         "Define the type for RCS algorithm in rules.";
     }

     // --------- TIMER DURATION -------------------

     grouping timer-duration {
       leaf ticks-duration {
         type uint8;
         default "20";
         description
           "Duration of one tick in micro-seconds:
               2^ticks-duration/10^6 = 1.048s.";
       }
       leaf ticks-numbers {
         type uint16;
         description
           "Timer duration = ticks-numbers * 2^ticks-duration / 10^6.";
       }
       description
         "Used by inactivity and retransmission timer. Allows a
          precision from micro-second to year by sending the
          tick-duration value.
          For instance:

          tick-duration /  smallest value          highest value
          v
          20: 00y 000d 00h 00m 01s.048575<->00y 000d 19h 05m 18s.428159
          21: 00y 000d 00h 00m 02s.097151<->00y 001d 14h 10m 36s.856319
          22: 00y 000d 00h 00m 04s.194303<->00y 003d 04h 21m 13s.712639
          23: 00y 000d 00h 00m 08s.388607<->00y 006d 08h 42m 27s.425279
          24: 00y 000d 00h 00m 16s.777215<->00y 012d 17h 24m 54s.850559
          25: 00y 000d 00h 00m 33s.554431<->00y 025d 10h 49m 49s.701119



Minaburo & Toutain       Expires 21 January 2023               [Page 32]

Internet-Draft           LPWAN SCHC YANG module                July 2022


          Note that the smallest value is also the incrementation step,
          so the timer precision.
         ";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     // --------  RULE ENTRY DEFINITION ------------

     grouping tv-struct {
       description
         "Defines the target value element. If the header field
          contains a text, the binary sequence uses the same encoding.
          field-id allows the conversion to the appropriate type.";
       leaf index {
         type uint16;
         description
           "Index gives the position in the matching-list. If only one
            element is present, index is 0. Otherwise, index is the
            the order in the matching list, starting at 0.";
       }
       leaf value {
         type binary;
         description
           "Target Value content as a untyped binary value.";
       }
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     grouping compression-rule-entry {
       description
         "These entries defines a compression entry (i.e. a line)
          as defined in RFC 8724.

     +-------+--+--+--+------------+-----------------+---------------+
     |Field 1|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|
     +-------+--+--+--+------------+-----------------+---------------+

          An entry in a compression rule is composed of 7 elements:
          - Field ID: The header field to be compressed.
          - Field Length : Either a positive integer of a function.
          - Field Position: A positive (and possibly equal to 0)
            integer.
          - Direction Indicator: An indication in which direction
            compression and decompression process is effective.



Minaburo & Toutain       Expires 21 January 2023               [Page 33]

Internet-Draft           LPWAN SCHC YANG module                July 2022


          - Target value: A value against which the header Field is
            compared.
          - Matching Operator: The comparison operation and optional
            associate parameters.
          - Comp./Decomp. Action: The compression or decompression
            action, and optional parameters.
         ";
       leaf field-id {
         type schc:fid-type;
         mandatory true;
         description
           "Field ID, identify a field in the header with a YANG
            referenceid.";
       }
       leaf field-length {
         type schc:fl-type;
         mandatory true;
         description
           "Field Length, expressed in number of bits if the length is
            known when the Rule is created or through a specific function
            if the length is variable.";
       }
       leaf field-position {
         type uint8;
         mandatory true;
         description
           "Field position in the header is an integer. Position 1
            matches the first occurrence of a field in the header,
            while incremented position values match subsequent
            occurences.
            Position 0 means that this entry matches a field
            irrespective of its position of occurence in the
            header.
            Be aware that the decompressed header may have
            position-0 fields ordered differently than they
            appeared in the original packet.";
       }
       leaf direction-indicator {
         type schc:di-type;
         mandatory true;
         description
           "Direction Indicator, indicate if this field must be
           consider for both directions, or only uplink or
           downlink.";
       }
       list target-value {
         key "index";
         uses tv-struct;



Minaburo & Toutain       Expires 21 January 2023               [Page 34]

Internet-Draft           LPWAN SCHC YANG module                July 2022


         description
           "A list of value to compare with the header field value.
            If target value is a singleton, position must be 0.
            For use as a matching list for the mo-match-mapping matching
            operator, positions should take consecutive values starting
            from 1.";
       }
       leaf matching-operator {
         type schc:mo-type;
         must
           "../target-value or derived-from-or-self(., 'mo-ignore')" {
           error-message
             "mo-equal, mo-msb and mo-match-mapping need target-value";
           description
             "target-value is not required for mo-ignore.";
         }
         must "not (derived-from-or-self(., 'mo-msb')) or
               ../matching-operator-value" {
           error-message "mo-msb requires length value";
         }
         mandatory true;
         description
           "MO: Matching Operator";
       }
       list matching-operator-value {
         key "index";
         uses tv-struct;
         description
           "Matching Operator Arguments, based on TV structure to allow
            several arguments.
            In RFC 8724, only the MSB matching operator needs arguments
            (a single argument, which is the number of most significant
            bits to be matched).";
       }
       leaf comp-decomp-action {
         type schc:cda-type;
         mandatory true;
         description
           "CDA: Compression Decompression Action.";
       }
       list comp-decomp-action-value {
         key "index";
         uses tv-struct;
         description
           "CDA arguments, based on a TV structure, in order to allow
            for several arguments. The CDAs specified in RFC 8724
            require no argument.";
       }



Minaburo & Toutain       Expires 21 January 2023               [Page 35]

Internet-Draft           LPWAN SCHC YANG module                July 2022


       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     grouping compression-content {
       list entry {
         key "field-id field-position direction-indicator";
         uses compression-rule-entry;
         description
           "A compression rule is a list of rule entries, each
            describing a header field. An entry is identified
            through a field-id, its position in the packet and
            its direction.";
       }
       description
         "Define a compression rule composed of a list of entries.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     grouping fragmentation-content {
       description
         "This grouping defines the fragmentation parameters for
          all the modes (No-ACK, ACK-Always and ACK-on-Error) specified
          in RFC 8724.";
       leaf fragmentation-mode {
         type schc:fragmentation-mode-type;
         mandatory true;
         description
           "Which fragmentation mode is used (No-Ack, ACK-Always,
            ACK-on-Error).";
       }
       leaf l2-word-size {
         type uint8;
         default "8";
         description
           "Size, in bits, of the layer 2 word.";
       }
       leaf direction {
         type schc:di-type;
         must "derived-from-or-self(., 'di-up') or
               derived-from-or-self(., 'di-down')" {
           error-message
             "Direction for fragmentation rules are up or down.";
         }
         mandatory true;



Minaburo & Toutain       Expires 21 January 2023               [Page 36]

Internet-Draft           LPWAN SCHC YANG module                July 2022


         description
           "Should be up or down, bidirectional is forbidden.";
       }
       // SCHC Frag header format
       leaf dtag-size {
         type uint8;
         default "0";
         description
           "Size, in bits, of the DTag field (T variable from
            RFC8724).";
       }
       leaf w-size {
         when "derived-from-or-self(../fragmentation-mode,
                                   'fragmentation-mode-ack-on-error')
               or
               derived-from-or-self(../fragmentation-mode,
                                   'fragmentation-mode-ack-always') ";
         type uint8;
         description
           "Size, in bits, of the window field (M variable from
            RFC8724).";
       }
       leaf fcn-size {
         type uint8;
         mandatory true;
         description
           "Size, in bits, of the FCN field (N variable from RFC8724).";
       }
       leaf rcs-algorithm {
         type rcs-algorithm-type;
         default "schc:rcs-RFC8724";
         description
           "Algorithm used for RCS. The algorithm specifies the RCS
            size.";
       }
       // SCHC fragmentation protocol parameters
       leaf maximum-packet-size {
         type uint16;
         default "1280";
         description
           "When decompression is done, packet size must not
            strictly exceed this limit, expressed in bytes.";
       }
       leaf window-size {
         type uint16;
         description
           "By default, if not specified 2^w-size - 1. Should not exceed
            this value. Possible FCN values are between 0 and



Minaburo & Toutain       Expires 21 January 2023               [Page 37]

Internet-Draft           LPWAN SCHC YANG module                July 2022


            window-size - 1.";
       }
       leaf max-interleaved-frames {
         type uint8;
         default "1";
         description
           "Maximum of simultaneously fragmented frames. Maximum value
            is 2^dtag-size. All DTAG values can be used, but at most
            max-interleaved-frames must be active at any time.";
       }
       container inactivity-timer {
         uses timer-duration;
         description
           "Duration is seconds of the inactivity timer, 0 indicates
            that the timer is disabled.";
       }
       container retransmission-timer {
         uses timer-duration;
         when "derived-from-or-self(../fragmentation-mode,
                                   'fragmentation-mode-ack-on-error')
               or
               derived-from-or-self(../fragmentation-mode,
                                   'fragmentation-mode-ack-always') ";
         description
           "Duration in seconds of the retransmission timer.";
       }
       leaf max-ack-requests {
         when "derived-from-or-self(../fragmentation-mode,
                                   'fragmentation-mode-ack-on-error')
               or
               derived-from-or-self(../fragmentation-mode,
                                   'fragmentation-mode-ack-always') ";
         type uint8 {
           range "1..max";
         }
         description
           "The maximum number of retries for a specific SCHC ACK.";
       }
       choice mode {
         case no-ack;
         case ack-always;
         case ack-on-error {
           leaf tile-size {
             when "derived-from-or-self(../fragmentation-mode,
                                'fragmentation-mode-ack-on-error')";
             type uint8;
             description
               "Size, in bits, of tiles. If not specified or set to 0,



Minaburo & Toutain       Expires 21 January 2023               [Page 38]

Internet-Draft           LPWAN SCHC YANG module                July 2022


                tiles fill the fragment.";
           }
           leaf tile-in-all-1 {
             when "derived-from-or-self(../fragmentation-mode,
                                'fragmentation-mode-ack-on-error')";
             type schc:all-1-data-type;
             description
               "Defines whether the sender and receiver expect a tile in
                All-1 fragments or not, or if it is left to the sender's
                choice.";
           }
           leaf ack-behavior {
             when "derived-from-or-self(../fragmentation-mode,
                                'fragmentation-mode-ack-on-error')";
             type schc:ack-behavior-type;
             description
               "Sender behavior to acknowledge, after All-0, All-1 or
                when the LPWAN allows it.";
           }
         }
         description
           "RFC 8724 defines 3 fragmentation modes.";
       }
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     // Define rule ID. Rule ID is composed of a RuleID value and a
     // Rule ID Length

     grouping rule-id-type {
       leaf rule-id-value {
         type uint32;
         description
           "Rule ID value, this value must be unique, considering its
            length.";
       }
       leaf rule-id-length {
         type uint8 {
           range "0..32";
         }
         description
           "Rule ID length, in bits. The value 0 is for implicit
            rules.";
       }
       description
         "A rule ID is composed of a value and a length, expressed in



Minaburo & Toutain       Expires 21 January 2023               [Page 39]

Internet-Draft           LPWAN SCHC YANG module                July 2022


          bits.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }

     // SCHC table for a specific device.

     container schc {
       list rule {
         key "rule-id-value rule-id-length";
         uses rule-id-type;
         choice nature {
           case fragmentation {
             if-feature "fragmentation";
             uses fragmentation-content;
           }
           case compression {
             if-feature "compression";
             uses compression-content;
           }
           case no-compression {
             description
               "RFC 8724 requires a rule for uncompressed headers.";
           }
           description
             "A rule is for compression, for no-compression or for
              fragmentation.";
         }
         description
           "Set of rules compression, no compression or fragmentation
            rules identified by their rule-id.";
       }
       description
         "A SCHC set of rules is composed of a list of rules which are
          used for compression, no-compression or fragmentation.";
       reference
         "RFC 8724 SCHC: Generic Framework for Static Context Header
                   Compression and Fragmentation";
     }
   }
   <CODE ENDS>

                                  Figure 6







Minaburo & Toutain       Expires 21 January 2023               [Page 40]

Internet-Draft           LPWAN SCHC YANG module                July 2022


6.  Implementation Status

   This section records the status of known implementations of the
   protocol defined by this specification at the time of posting of this
   Internet-Draft, and is based on a proposal described in [RFC7942].
   The description of implementations in this section is intended to
   assist the IETF in its decision processes in progressing drafts to
   RFCs.  Please note that the listing of any individual implementation
   here does not imply endorsement by the IETF.  Furthermore, no effort
   has been spent to verify the information presented here that was
   supplied by IETF contributors.  This is not intended as, and must not
   be construed to be, a catalog of available implementations or their
   features.  Readers are advised to note that other implementations may
   exist.

   According to [RFC7942], "this will allow reviewers and working groups
   to assign due consideration to documents that have the benefit of
   running code, which may serve as evidence of valuable experimentation
   and feedback that have made the implemented protocols more mature.
   It is up to the individual working groups to use this information as
   they see fit".

   *  Openschc is implementing the conversion between the local rule
      representation and the representation conform to the data model in
      JSON and CBOR (following -08 draft).

7.  IANA Considerations

   This document registers one URIs and one YANG modules.

7.1.  URI Registration

   This document requests IANA to register the following four URIs in
   the "IETF XML Registry" [RFC3688]:

      URI:  urn:ietf:params:xml:ns:yang:ietf-schc

      Registrant Contact:  The IESG.

      XML:  N/A; the requested URI is an XML namespace.

7.2.  YANG Module Name Registration

   This document registers the following one YANG modules in the "YANG
   Module Names" registry [RFC6020].

      name:           ietf-schc




Minaburo & Toutain       Expires 21 January 2023               [Page 41]

Internet-Draft           LPWAN SCHC YANG module                July 2022


      namespace:      urn:ietf:params:xml:ns:yang:ietf-schc

      prefix:         schc

      reference:      RFC XXXX Data Model for Static Context Header
      Compression (SCHC)

8.  Security Considerations

   The YANG module specified in this document defines a schema for data
   that is designed to be accessed via network management protocols such
   as NETCONF [RFC6241] or RESTCONF [RFC8040].  The lowest NETCONF layer
   is the secure transport layer, and the mandatory-to-implement secure
   transport is Secure Shell (SSH) [RFC6242].  The lowest RESTCONF layer
   is HTTPS, and the mandatory-to-implement secure transport is TLS
   [RFC8446].

   The Network Configuration Access Control Model (NACM) [RFC8341]
   provides the means to restrict access for particular NETCONF or
   RESTCONF users to a preconfigured subset of all available NETCONF or
   RESTCONF protocol operations and content.

   This data model formalizes the rules elements described in [RFC8724]
   for compression and fragmentation.  As explained in the architecture
   document [I-D.ietf-lpwan-architecture], a rule can be read, created,
   updated or deleted in response to a management request.  These
   actions can be done between two instances of SCHC or between a SCHC
   instance and a rule repository.

                        create
             (-------)  read   +=======+ *
             ( rules )<------->|Rule   |<--|-------->
             (-------)  update |Manager|   NETCONF, RESTCONF or CORECONF
                . read  delete +=======+   request
                .
             +-------+
         <===| R & D |<===
         ===>| C & F |===>
             +-------+

   The rule contains some sensible informations such as the application
   IPv6 address.  An attacker by changing a rule content may block the
   communication or intercept the traffic.  Therefore, the identity of
   the requester must be validated.  This can be done through
   certificates or access lists.






Minaburo & Toutain       Expires 21 January 2023               [Page 42]

Internet-Draft           LPWAN SCHC YANG module                July 2022


   The full tree is sensitive, since it represents all the elements that
   can be managed.  This module aims to be encapsulated into a YANG
   module including access right and identities.

9.  Acknowledgements

   The authors would like to thank Dominique Barthel, Carsten Bormann,
   Ivan Martinez, Alexander Pelov for their careful reading and valuable
   inputs.  A special thanks for Carl Moberg, Tom Petch and Eric Vyncke
   for their explanations and wise advices when building the model.

10.  References

10.1.  Normative References

   [RFC0768]  Postel, J., "User Datagram Protocol", STD 6, RFC 768,
              DOI 10.17487/RFC0768, August 1980,
              <https://www.rfc-editor.org/info/rfc768>.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <https://www.rfc-editor.org/info/rfc6020>.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <https://www.rfc-editor.org/info/rfc6241>.

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
              <https://www.rfc-editor.org/info/rfc6242>.

   [RFC7252]  Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
              Application Protocol (CoAP)", RFC 7252,
              DOI 10.17487/RFC7252, June 2014,
              <https://www.rfc-editor.org/info/rfc7252>.





Minaburo & Toutain       Expires 21 January 2023               [Page 43]

Internet-Draft           LPWAN SCHC YANG module                July 2022


   [RFC8040]  Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
              <https://www.rfc-editor.org/info/rfc8040>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8200]  Deering, S. and R. Hinden, "Internet Protocol, Version 6
              (IPv6) Specification", STD 86, RFC 8200,
              DOI 10.17487/RFC8200, July 2017,
              <https://www.rfc-editor.org/info/rfc8200>.

   [RFC8341]  Bierman, A. and M. Bjorklund, "Network Configuration
              Access Control Model", STD 91, RFC 8341,
              DOI 10.17487/RFC8341, March 2018,
              <https://www.rfc-editor.org/info/rfc8341>.

   [RFC8446]  Rescorla, E., "The Transport Layer Security (TLS) Protocol
              Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
              <https://www.rfc-editor.org/info/rfc8446>.

   [RFC8613]  Selander, G., Mattsson, J., Palombini, F., and L. Seitz,
              "Object Security for Constrained RESTful Environments
              (OSCORE)", RFC 8613, DOI 10.17487/RFC8613, July 2019,
              <https://www.rfc-editor.org/info/rfc8613>.

   [RFC8724]  Minaburo, A., Toutain, L., Gomez, C., Barthel, D., and JC.
              Zuniga, "SCHC: Generic Framework for Static Context Header
              Compression and Fragmentation", RFC 8724,
              DOI 10.17487/RFC8724, April 2020,
              <https://www.rfc-editor.org/info/rfc8724>.

   [RFC8824]  Minaburo, A., Toutain, L., and R. Andreasen, "Static
              Context Header Compression (SCHC) for the Constrained
              Application Protocol (CoAP)", RFC 8824,
              DOI 10.17487/RFC8824, June 2021,
              <https://www.rfc-editor.org/info/rfc8824>.

10.2.  Informative References

   [I-D.ietf-lpwan-architecture]
              Pelov, A., Thubert, P., and A. Minaburo, "LPWAN Static
              Context Header Compression (SCHC) Architecture", Work in
              Progress, Internet-Draft, draft-ietf-lpwan-architecture-
              02, 30 June 2022, <https://www.ietf.org/archive/id/draft-
              ietf-lpwan-architecture-02.txt>.




Minaburo & Toutain       Expires 21 January 2023               [Page 44]

Internet-Draft           LPWAN SCHC YANG module                July 2022


   [RFC7942]  Sheffer, Y. and A. Farrel, "Improving Awareness of Running
              Code: The Implementation Status Section", BCP 205,
              RFC 7942, DOI 10.17487/RFC7942, July 2016,
              <https://www.rfc-editor.org/info/rfc7942>.

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <https://www.rfc-editor.org/info/rfc7950>.

   [RFC7967]  Bhattacharyya, A., Bandyopadhyay, S., Pal, A., and T.
              Bose, "Constrained Application Protocol (CoAP) Option for
              No Server Response", RFC 7967, DOI 10.17487/RFC7967,
              August 2016, <https://www.rfc-editor.org/info/rfc7967>.

   [RFC9011]  Gimenez, O., Ed. and I. Petrov, Ed., "Static Context
              Header Compression and Fragmentation (SCHC) over LoRaWAN",
              RFC 9011, DOI 10.17487/RFC9011, April 2021,
              <https://www.rfc-editor.org/info/rfc9011>.

Authors' Addresses

   Ana Minaburo
   Acklio
   1137A avenue des Champs Blancs
   35510 Cesson-Sevigne Cedex
   France
   Email: ana@xxxxxxx


   Laurent Toutain
   Institut MINES TELECOM; IMT Atlantique
   2 rue de la Chataigneraie
   CS 17607
   35576 Cesson-Sevigne Cedex
   France
   Email: Laurent.Toutain@xxxxxxxxxxxxxxxxx















Minaburo & Toutain       Expires 21 January 2023               [Page 45]
-- 
last-call mailing list
last-call@xxxxxxxx
https://www.ietf.org/mailman/listinfo/last-call

[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Mhonarc]     [Fedora Users]

  Powered by Linux