5. SCHC Compound ACK YANG Data Model (SCHC 复合 ACK YANG 数据模型)
5. SCHC Compound ACK YANG Data Model (SCHC 复合 ACK YANG 数据模型)
本文档还通过在 Ack-on-Error fragmentation mode 中包含一个新的 leaf 来扩展 [RFC9363] 中定义的 SCHC YANG 数据模型, 以描述使用 SCHC Compound ACK 的选项及其 bitmap 格式。
5.1. SCHC YANG Data Model Extension (SCHC YANG 数据模型扩展)
<CODE BEGINS> file "[email protected]"
module ietf-schc-compound-ack {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-schc-compound-ack";
prefix schc-compound-ack;
import 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:[email protected]>
Editor: Laurent Toutain
<mailto:[email protected]>
Editor: Juan Carlos Zuniga
<mailto:[email protected]>
Editor: Sergio Aguilar
<mailto:[email protected]>";
description
"Copyright (c) 2023 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 Revised 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 9363
(https://www.rfc-editor.org/info/rfc9363); see the RFC itself
for full legal notices.
***************************************************************
Generic data model for the Static Context Header Compression
Rule for SCHC, based on RFCs 8724 and 8824. Including
compression, no-compression, and fragmentation Rules.";
revision 2023-07-26 {
description
"Initial version for RFC 9441.";
reference
"RFC 9441 Static Context Header Compression (SCHC) Compound
Acknowledgement (ACK)";
}
identity bitmap-format-base-type {
description
"Define how the bitmap is formed in ACK messages.";
}
identity bitmap-RFC8724 {
base bitmap-format-base-type;
description
"Bitmap by default as defined in RFC 8724.";
reference
"RFC 8724 SCHC: Generic Framework for Static Context Header
Compression and Fragmentation";
}
identity bitmap-compound-ack {
base bitmap-format-base-type;
description
"Compound ACK allows several bitmaps in an ACK message.";
}
typedef bitmap-format-type {
type identityref {
base bitmap-format-base-type;
}
description
"Type of bitmap used in Rules.";
}
augment "/schc:schc/schc:rule/schc:nature/"
+ "schc:fragmentation/schc:mode/schc:ack-on-error" {
leaf bitmap-format {
when "derived-from-or-self(../schc:fragmentation-mode,
'schc:fragmentation-mode-ack-on-error')";
type schc-compound-ack:bitmap-format-type;
default "schc-compound-ack:bitmap-RFC8724";
description
"How the bitmaps are included in the SCHC ACK message.";
}
leaf last-bitmap-compression {
when "derived-from-or-self(../schc:fragmentation-mode,
'schc:fragmentation-mode-ack-on-error')";
type boolean;
default "true";
description
"When true, the ultimate bitmap in the SCHC ACK message
can be compressed. Default behavior from RFC 8724.";
reference
"RFC 8724 SCHC: Generic Framework for Static Context Header
Compression and Fragmentation";
}
description
"Augment the SCHC Rules to manage Compound ACK.";
}
}
<CODE ENDS>
图 9: SCHC YANG 数据模型 - 复合 ACK 扩展
5.2. SCHC YANG Tree Extension (SCHC YANG 树扩展)
module: ietf-schc-compound-ack
augment /schc:schc/schc:rule/schc:nature/schc:fragmentation/
schc:mode/schc:ack-on-error:
+--rw bitmap-format? schc-compound-ack:bitmap-format-type
+--rw last-bitmap-compression? boolean
图 10: 树图 - 复合 ACK 扩展