idnits 2.17.1 draft-toutain-lpwan-schc-yang-data-model-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack a Security Considerations section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** There are 10 instances of too long lines in the document, the longest one being 20 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 11, 2019) is 1866 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Informational ---------------------------------------------------------------------------- == Unused Reference: 'I-D.ietf-core-comi' is defined on line 346, but no explicit reference was found in the text == Outdated reference: A later version (-17) exists of draft-ietf-core-comi-04 == Outdated reference: A later version (-24) exists of draft-ietf-lpwan-ipv6-static-context-hc-18 Summary: 3 errors (**), 0 flaws (~~), 4 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Minaburo 3 Internet-Draft Acklio 4 Intended status: Informational L. Toutain 5 Expires: September 12, 2019 Institut MINES TELECOM ; IMT Atlantique 6 March 11, 2019 8 Data Model for Static Context Header Compression (SCHC) 9 draft-toutain-lpwan-schc-yang-data-model-00 11 Abstract 13 This document describes a YANG data model for the SCHC (Static 14 Context Header Compression). A generic module is defined, that can 15 be applied for any headers and also a specific model for the IPv6 UDP 16 protocol stack is also proposed. Note that this draft is a first 17 attempt to define a YANG data module for SCHC, more work is needed to 18 use all the YANG facilities. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on September 12, 2019. 37 Copyright Notice 39 Copyright (c) 2019 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (https://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 1. Introduction 54 SCHC [I-D.ietf-lpwan-ipv6-static-context-hc] defines a compression 55 technique for LPWAN networks based on static context. The context 56 contains a list of rules (cf. Figure 1). Each rule contains itself 57 a list of field descriptions composed of a field identifier (FID), a 58 field length (FID), a field position (FP), a field direction (DI), a 59 target value (TV), a matching operator (MO) and a Compression/ 60 Decompression Action (CDA). 62 +-----------------------------------------------------------------+ 63 | Rule N | 64 +-----------------------------------------------------------------+| 65 | Rule i || 66 +-----------------------------------------------------------------+|| 67 | (FID) Rule 1 ||| 68 |+-------+--+--+--+------------+-----------------+---------------+||| 69 ||Field 1|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|||| 70 |+-------+--+--+--+------------+-----------------+---------------+||| 71 ||Field 2|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|||| 72 |+-------+--+--+--+------------+-----------------+---------------+||| 73 ||... |..|..|..| ... | ... | ... |||| 74 |+-------+--+--+--+------------+-----------------+---------------+||/ 75 ||Field N|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||| 76 |+-------+--+--+--+------------+-----------------+---------------+|/ 77 | | 78 \-----------------------------------------------------------------/ 80 Figure 1: Compression Decompression Context 82 The goal of this document is to provide an YANG data model to 83 represent SCHC Compression and Fragmentation rules, to allow 84 management over a LPWAN network. The main constraints are: 86 o since the device may be managed through the LPWAN network, 87 management messages must be compact. COREconf offers a 88 representation based on CBOR. 90 o this data model can be extended with new values, such as new field 91 id, new MO or CDA. 93 2. YANG types 95 2.1. Field Identifier 97 The field identifier is used to identify a specific field. It is 98 viewed as an uint32. 100 2.2. Target Value field 102 A value may be associated for each field in a rule. The value's type 103 depends on the field. It can be an integer, a prefix, a string, or 104 any other type carried by the field. The LPWA-types regroups all the 105 possibles values. Figure 2 gives its definition. 107 typedef lpwan-types { 108 type union { 109 type uint8; 110 type uint16; 111 type uint32; 112 type uint64; 113 type inet:ipv6-prefix; 114 type string; 115 } 116 } 118 Figure 2: Value types 120 Note that as defined in [I-D.ietf-lpwan-ipv6-static-context-hc], Dev 121 and App Prefixes can be of type inet:ipv6-prefix-type, but this type 122 derives from ASCII characters, a binary representation such as uint64 123 will be more compact. 125 2.3. Matching Operators 127 A matching operator is used to check the field value stored in the 128 rule against the value contained in the header field. If there is no 129 matching the rule is not selected. Two instances of matching 130 operator are defined to allow the rule selection from informations 131 contained either in the compressed header or the uncompressed header. 132 The SCHC document [I-D.ietf-lpwan-ipv6-static-context-hc] defines 133 four operators: 135 o equal: The rule's value must be equal to the packet header value 136 for a specific field. 138 o ignore: There is no check for this field. 140 o MSB(x): This operator compare the most significant bits. The 141 operator takes one argument representing the length of least 142 significant bit part, which will be ignored during the matching 143 but sent if the rule matches. 145 o match-mapping: From the list of values of the Target Value, This 146 operator will match if one of those values is equal to the field 147 value and will send the index of the list representing this value. 149 /**********************************/ 150 /* Matching operator type */ 151 /**********************************/ 152 typedef matching-operator-type { 153 type enumeration { 154 enum equal; 155 enum ignore; 156 enum msb; 157 enum match-mapping; 158 } 159 } 161 Figure 3: Matching operators 163 Figure 3 represents the Matching Operator type definition. 165 2.4. Compression Decompression Actions 167 The SCHC document [I-D.ietf-lpwan-ipv6-static-context-hc] defines 168 some compression decompression actions (CDA). The CDA tells how to 169 compress and decompress the field. They are defined in Figure 4. 170 they are coded the same way as MO. 172 /***********************************************/ 173 /* Compression-Decompression action type */ 174 /***********************************************/ 175 typedef compression-decompression-action-type { 176 type enumeration { 177 enum not-sent; 178 enum value-sent; 179 enum lsb; 180 enum mapping-sent; 181 enum compute-length; 182 enum compute-checksum; 183 enum esiid-did; 184 enum laiid-did; 185 } 186 } 188 Figure 4: Action functions 190 3. Generic rule definition 192 Each rule's row is defined by several leaves, composed of: 194 o a field key which will be used as a key, 196 o a field name that can be used for debugging purpose, 198 o a field length that containing the length of the field, 200 o a field position that gives the number of instances, 202 o a field direction indicates the packet direction, 204 o a field target value containing the value that will be compared, 206 o a matching operators for rule selection 208 o an compression/decompression action to compress/decompress the 209 field. 211 Figure 5 defines the format. 213 grouping rule-entry { 214 leaf field-id { 215 type int32; 216 description "Field ID unique value representing the Field"; 217 } 218 leaf field-length { 219 type uint8; 220 description "size in bits of the field"; 221 } 223 leaf field-position { 224 type uint8; 225 description "For repeated fields, we need to be able to 226 distinguish between successive occurences"; 227 } 229 leaf direction { 230 type direction-type; 231 } 232 list target-values { 233 key tv-key; 234 leaf tv-key { 235 type int8; 236 } 237 leaf target-value { 238 type lpwan-types; 239 } 240 description "Target Values can be a list of value, for 241 match-mapping. For other MO, only one entry is specified"; 242 } 243 leaf matching-operator { 244 type matching-operator-type; 245 } 247 leaf matching-operator-parameter { 248 type lpwan-types; 249 description "If the matching operator requires a parameter 250 (for example lsb or msb), the value is provided here."; 251 } 253 leaf compression-decompression-action { 254 type compression-decompression-action-type; 255 } 257 leaf compression-decompression-action-parameter { 258 type lpwan-types; 259 description "If the matching operator requires a parameter 260 (for example lsb or msb), the value is provided here."; 261 } 262 } 264 Figure 5: Action functions 266 4. YANG static context model 268 This lead to the generic rule definition, represented Figure 7. It 269 defines a set of rules. 271 grouping compression-rule { 273 leaf rule-id { 274 type uint8; 275 description "The number of the context rule that should be applied."; 276 } 277 leaf rule-id-length { 278 type uint8; 279 } 281 list rule-fields { 282 key "field-id field-position direction"; 283 uses rule-entry; 284 } 286 } 288 Figure 6: YANG definition of the generic module 290 module: ietf-lpwan-schc-rule 291 +--rw rule-id? uint8 292 +--rw rule-id-length? uint8 293 +--rw rule-fields* [field-id field-position direction] 294 +--rw field-id int32 295 +--rw field-length? uint8 296 +--rw field-position uint8 297 +--rw direction direction-type 298 +--rw target-values* [tv-key] 299 | +--rw tv-key int8 300 | +--rw target-value? lpwan-types 301 +--rw matching-operator? m.-o.-type 302 +--rw matching-operator-parameter? lpwan-types 303 +--rw compression-decompression-action? c.-d.-a.-type 304 +--rw compression-decompression-action-parameter? lpwan-types 306 Figure 7: Generic module tree 308 The YANG tree is given Figure 7. 310 SID Assigned to 311 --------- -------------------------------------------------- 312 60000 node /rule-fields 313 60001 node /rule-fields/compression-decompression-action 314 60002 node /rule-fields/compression-decompression-action-parameter 315 60003 node /rule-fields/direction 316 60004 node /rule-fields/field-id 317 60005 node /rule-fields/field-length 318 60006 node /rule-fields/field-position 319 60007 node /rule-fields/matching-operator 320 60008 node /rule-fields/matching-operator-parameter 321 60009 node /rule-fields/target-values 322 60010 node /rule-fields/target-values/target-value 323 60011 node /rule-fields/target-values/tv-key 324 60012 node /rule-id 325 60013 node /rule-id-length 327 File ietf-lpwan-schc-rule@2016-10-31.sid created 328 Number of SIDs available : 100 329 Number of SIDs assigned : 14 331 Figure 8: Example of SID allocation 333 Figure 8 gives a simple allocation for SID value. SID values from 334 100 to 113 are used for /generic-rules/context-rules/rule-fields/ 335 field-compression-decompression-action. SID value from 1009 to 1012 336 are used in /generic-rules/context-rules/rule-fields/field-matching- 337 operator. 339 5. Acknowledgement 341 The authors would like to thank Michel Veillette, Alexander Pelov, 342 Antoni Markovski for their help on COMI/CoOL and YANG. 344 6. Normative References 346 [I-D.ietf-core-comi] 347 Veillette, M., Stok, P., Pelov, A., and A. Bierman, "CoAP 348 Management Interface", draft-ietf-core-comi-04 (work in 349 progress), November 2018. 351 [I-D.ietf-lpwan-ipv6-static-context-hc] 352 Minaburo, A., Toutain, L., Gomez, C., Barthel, D., and J. 353 Zuniga, "LPWAN Static Context Header Compression (SCHC) 354 and fragmentation for IPv6 and UDP", draft-ietf-lpwan- 355 ipv6-static-context-hc-18 (work in progress), December 356 2018. 358 Authors' Addresses 360 Ana Minaburo 361 Acklio 362 1137A Avenue des Champs Blancs 363 35510 Cesson-Sevigne Cedex 364 France 366 Email: ana@ackl.io 368 Laurent Toutain 369 Institut MINES TELECOM ; IMT Atlantique 370 2 rue de la Chataigneraie 371 CS 17607 372 35576 Cesson-Sevigne Cedex 373 France 375 Email: Laurent.Toutain@imt-atlantique.fr