<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.0.30 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<?rfc strict="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc ipr="trust200902" docName="draft-ietf-core-yang-cbor-01" category="std">

  <front>
    <title>CBOR Encoding of Data Modeled with YANG</title>

    <author initials="M.V." surname="Veillette" fullname="Michel Veillette" role="editor">
      <organization>Trilliant Networks Inc.</organization>
      <address>
        <postal>
          <street>610 Rue du Luxembourg</street>
          <city>Granby</city>
          <region>Quebec</region>
          <code>J2J 2V2</code>
          <country>Canada</country>
        </postal>
        <phone>+14503750556</phone>
        <email>michel.veillette@trilliantinc.com</email>
      </address>
    </author>
    <author initials="A.P." surname="Pelov" fullname="Alexander Pelov" role="editor">
      <organization>Acklio</organization>
      <address>
        <postal>
          <street>2bis rue de la Chataigneraie</street>
          <city>Cesson-Sevigne</city>
          <region>Bretagne</region>
          <code>35510</code>
          <country>France</country>
        </postal>
        <email>a@ackl.io</email>
      </address>
    </author>
    <author initials="A.S." surname="Somaraju" fullname="Abhinav Somaraju">
      <organization>Tridonic GmbH &amp; Co KG</organization>
      <address>
        <postal>
          <street>Farbergasse 15</street>
          <city>Dornbirn</city>
          <region>Vorarlberg</region>
          <code>6850</code>
          <country>Austria</country>
        </postal>
        <phone>+43664808926169</phone>
        <email>abhinav.somaraju@tridonic.com</email>
      </address>
    </author>
    <author initials="R.T." surname="Turner" fullname="Randy Turner">
      <organization>Landis+Gyr</organization>
      <address>
        <postal>
          <street>30000 Mill Creek Ave</street> <street>Suite 100</street>
          <city>Alpharetta</city>
          <region>GA</region>
          <code>30022</code>
          <country>US</country>
        </postal>
        <phone>++16782581292</phone>
        <email>randy.turner@landisgyr.com</email>
        <uri>http://www.landisgyr.com/</uri>
      </address>
    </author>
    <author initials="A.M." surname="Minaburo" fullname="Ana Minaburo">
      <organization>Acklio</organization>
      <address>
        <postal>
          <street>2bis rue de la châtaigneraie</street>
          <city>Cesson-Sévigné</city>
          <region>Bretagne</region>
          <code>35510</code>
          <country>France</country>
        </postal>
        <email>ana@ackl.io</email>
      </address>
    </author>

    <date year="2016" month="June" day="23"/>

    <area>Applications and Real-Time Area (art)</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>CBOR</keyword>

    <abstract>


<t>This document defines encoding rules for serializing configuration data, state data, RPC input and RPC output, Action input, Action output and notifications defined within YANG modules using the Concise Binary Object Representation (CBOR) <xref target="RFC7049"/>.</t>



    </abstract>


  </front>

  <middle>


<section anchor="introduction" title="Introduction">

<t>The specification of the YANG 1.1 data modelling language <xref target="I-D.ietf-netmod-rfc6020bis"/> defines only an XML encoding for data instances, i.e. contents of configuration datastores, state data, RPC inputs and outputs, action inputs and outputs, and event notifications.</t>

<t>A new set of encoding rules has been defined to allow the use of the same data models in environments based on the JavaScript Object Notation (JSON) Data Interchange Format <xref target="RFC7159"/>. This is accomplished in the JSON Encoding of Data Modeled with YANG specification <xref target="I-D.ietf-netmod-yang-json"/>.</t>

<t>The aim of this document is to define a set of encoding rules for the Concise Binary Object Representation (CBOR) <xref target="RFC7049"/>. The resulting encoding is more compact compared to XML and JSON and more suitable for Constrained Nodes and/or Constrained Networks as defined by <xref target="RFC7228"/>.</t>

</section>
<section anchor="terminology-and-notation" title="Terminology and Notation">

<t>The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
“SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to
be interpreted as described in <xref target="RFC2119"/>.</t>

<t>The following terms are defined in <xref target="I-D.ietf-netmod-rfc6020bis"/>:</t>

<t><list style="symbols">
  <t>action</t>
  <t>anydata</t>
  <t>anyxml</t>
  <t>data node</t>
  <t>data tree</t>
  <t>module</t>
  <t>notification</t>
  <t>RPC</t>
  <t>schema node</t>
  <t>schema tree</t>
  <t>submodule</t>
</list></t>

<t>The following terms are defined in <xref target="I-D.ietf-netmod-yang-json"/>:</t>

<t><list style="symbols">
  <t>member name</t>
  <t>name of an identity</t>
</list></t>

<t>The following term is defined in <xref target="I-D.vanderstok-core-comi"/>:</t>

<t><list style="symbols">
  <t>YANG hash</t>
</list></t>

<t>This specification also makes use of the following terminology:</t>

<t><list style="symbols">
  <t>child: A schema node defined within a collection such as a container, a list, a case, a notification, an RPC input, an RPC output, an action input, an action output.</t>
  <t>delta : Difference between the SID assigned to the current schema node and the SID assigned to the parent.</t>
  <t>parent: The collection in which a schema node is defined.</t>
  <t>structured identifier or SID: Unsigned integer used to identify different YANG items.</t>
</list></t>

<section anchor="cbor-diagnostic-notation" title="CBOR diagnostic notation">

<t>Within this document, CBOR binary contents are represented using an equivalent textual form called CBOR diagnostic notation as defined in <xref target="RFC7049"/> section 6. This notation is used strictly for documentation purposes and is never used in the data serialization.</t>

<texttable align="left">
      <ttcol align='left'>CBOR content</ttcol>
      <ttcol align='left'>CBOR type</ttcol>
      <ttcol align='left'>Diagnostic notation</ttcol>
      <ttcol align='left'>Example</ttcol>
      <ttcol align='left'>CBOR encoding</ttcol>
      <c>Unsigned integer</c>
      <c>0</c>
      <c>Decimal digits</c>
      <c>123 or +123</c>
      <c>18 7b</c>
      <c>Negative integer</c>
      <c>1</c>
      <c>Decimal digits prefixed by a minus sign</c>
      <c>-123</c>
      <c>38 7a</c>
      <c>Byte string</c>
      <c>2</c>
      <c>Hexadecimal value enclosed between single quotes and prefixed by an ‘h’</c>
      <c>h’f15c’</c>
      <c>42 f15c</c>
      <c>Text string</c>
      <c>3</c>
      <c>String of Unicode characters enclosed between double quotes</c>
      <c>“txt”</c>
      <c>63 747874</c>
      <c>Array</c>
      <c>4</c>
      <c>Comma-separated list of values within square brackets</c>
      <c>[ 1, 2 ]</c>
      <c>82 01 02</c>
      <c>Map</c>
      <c>5</c>
      <c>Comma-separated list of key : value pairs within curly braces</c>
      <c>{ 1: 123, 2: 456 }</c>
      <c>a2 01187b 021901c8</c>
      <c>Boolean</c>
      <c>7/20</c>
      <c>false</c>
      <c>false</c>
      <c>f4</c>
      <c>&#160;</c>
      <c>7/21</c>
      <c>true</c>
      <c>true</c>
      <c>f5</c>
      <c>Null</c>
      <c>7/22</c>
      <c>null</c>
      <c>null</c>
      <c>f6</c>
      <c>Not assigned</c>
      <c>7/23</c>
      <c>undefined</c>
      <c>undefined</c>
      <c>f7</c>
</texttable>

<t>The following extensions to the CBOR diagnostic notation are supported:</t>

<t><list style="symbols">
  <t>Comments can be added to the end of each line. Any characters after a Pound sign (‘#’) outside of a string, up to the end of the line, are treated as a comment.</t>
  <t>Deltas are represented as positive numbers (e.g. +123).</t>
</list></t>

</section>
</section>
<section anchor="properties-of-the-cbor-encoding" title="Properties of the CBOR Encoding">

<t>This document defines CBOR encoding rules for YANG schema trees and their subtrees.</t>

<t>Basic schema nodes such as leaf, leaf-list, list, anydata and anyxml can be encoded standalone. In this case, only the value of this schema node is encoded in CBOR. Identification of this value need to be provided by some external means when needed.</t>

<t>A collection such as container, list instance, notification, RPC input, RPC output, action input and action output is serialized using a CBOR map in which each child schema node is encoded using a key and a value. This specification supports three type of keys; SID as defined in <xref target="I-D.somaraju-core-sid"/>, member names as defined in <xref target="I-D.ietf-netmod-yang-json"/> and YANG hash as defined by <xref target="I-D.vanderstok-core-comi"/>. Each of these key type is encoded using a specific CBOR type which allows their interpretation during the deserialization process. The end user of this mapping specification can mandate the use of a specific key type or a specific subset of key types.</t>

<t>In order to minimize the size of the encoded data, the proposed mapping avoid any unnecessary meta-information beyond those natively supported by CBOR. For instance, CBOR tags are used sorely in the case of the union datatype to distinguish explicitly the use of different YANG datatypes encoded using the same CBOR major type.</t>

<t>It is expected that entities generating and decoding CBOR contents have enough knowledge about the information processed in order to perform the expected task without the need of such extra meta-information.  The CoAP Content-Format Option, or an HTTP Content-Type header field, conveys that the data is YANG-encoded CBOR in the first place.</t>

</section>
<section anchor="instance-encoding" title="Encoding of YANG Schema Node Instances">

<t>Schema node instances defined using the YANG modeling language are encoded using CBOR <xref target="RFC7049"/> based on the rules defined in this section. We assume that the reader is
already familiar with both YANG <xref target="I-D.ietf-netmod-rfc6020bis"/> and CBOR <xref target="RFC7049"/>.</t>

<section anchor="the-leaf-schema-node" title="The ‘leaf’ Schema Node">

<t>Leafs MUST be encoded based on the encoding rules specified in <xref target="data-types-mapping"/>.</t>

</section>
<section anchor="container" title="The ‘container’ Schema Node">

<t>Collections such as containers, list instances, notifications, RPC inputs, RPC outputs, action inputs and action outputs MUST be encoded using a CBOR map data item (major type 5). A map is comprised of pairs of data items, with each data item consisting of a key and a value. Each key within the CBOR map is set to a data node identifier, each value is set to the value of this data node instance.</t>

<t>This specification supports three type of keys; SID as defined in <xref target="I-D.somaraju-core-sid"/>, member names as defined in <xref target="I-D.ietf-netmod-yang-json"/> and YANG hash as defined by <xref target="I-D.vanderstok-core-comi"/>.</t>

<t><spanx style="strong">SIDs as keys</spanx></t>

<t>Keys implemented using SIDs MUST be encoded using a CBOR unsigned integer (major type 0) or CBOR signed integer (major type 1), depending on the actual value. Keys are set to the delta of the associated SID, delta values are computed as follows:</t>

<t><list style="symbols">
  <t>The delta value is equal to the SID of the current schema node minus the SID of the parent schema node. When no parent exists in the context of use of this container, the delta is set to the SID of the current schema node (a parent with SID equal to zero is assumed).</t>
  <t>Delta values may result in a negative number, clients and servers MUST support negative deltas.</t>
</list></t>

<t><spanx style="strong">Member names as keys</spanx></t>

<t>Keys implemented using member names MUST be encoded using a CBOR text string data item (major type 3). A namespace-qualified member name MUST be used for all members of a top-level collection, and then also whenever the namespaces of the schema node and its parent are different. In all other cases, the simple form of the member name MUST be used. Member names and namespaces are defined in <xref target="I-D.ietf-netmod-yang-json"/> section 4.</t>

<t><spanx style="strong">YANG hashes as keys</spanx></t>

<t>Keys implemented using YANG hashes MUST be encoded using a CBOR byte string data item (major type 2).</t>

<t>Values MUST be encoded using the appropriate rules defined in <xref target="instance-encoding"/> and <xref target="data-types-mapping"/>.</t>

<t>Definition example <xref target="RFC7317"/>:</t>

<!-- draft-iab-xml2rfc-03.txt uses lower-case "yang" as the type -->

<figure><artwork type="yang"><![CDATA[
typedef date-and-time {
  type string {
    pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[\+\-]
             \d{2}:\d{2})';
  }
}

container system {
  leaf hostname {
    type inet:domain-name;

  container clock {
    leaf current-datetime {
      type date-and-time;
    }

    leaf boot-datetime {
      type date-and-time;
    }
  }
}
]]></artwork></figure>

<t><spanx style="strong">SIDs example</spanx></t>

<t>This example is encoded using the SIDs defined in <xref target="I-D.somaraju-core-sid"/> Appendix C.</t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
{
  1708 : {                              # clock
    +2 : "2015-10-02T14:47:24Z-05:00",  # current-datetime, SID 1710
    +1 : "2015-09-15T09:12:58Z-05:00"   # boot-datetime, SID 1709
  }
}
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
a1                                      # map(1)
   19 06ac                              # unsigned(1708)
   a2                                   # map(2)
      02                                # unsigned(2)
      78 1a                             # text(26)
      323031352d31302d30325431343a34373a32345a2d30353a3030
      01                                # unsigned(1)
      78 1a                             # text(26)
      323031352d30392d31355430393a31323a35385a2d30353a3030
]]></artwork></figure>

<t><spanx style="strong">Member names example</spanx></t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
{
  "ietf-system:clock" : {
    "current-datetime" : "2015-10-02T14:47:24Z-05:00",
    "boot-datetime" : "2015-09-15T09:12:58Z-05:00"
  }
}
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
a1                                          # map(1)
   71                                       # text(17)
      696574662d73797374656d3a636c6f636b    # "ietf-system:clock"
   a2                                       # map(2)
      70                                    # text(16)
         63757272656e742d6461746574696d65   # "current-datetime"
      78 1a                                 # text(26)
         323031352d31302d30325431343a34373a32345a2d30353a3030
      6d                                    # text(13)
         626f6f742d6461746574696d65         # "boot-datetime"
      78 1a                                 # text(26)
         323031352d30392d31355430393a31323a35385a2d30353a3030
]]></artwork></figure>

<t><spanx style="strong">YANG Hashes example</spanx></t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
{
  h'334c67d9' : {                                # clock
    h'047c468b' : "2015-10-02T14:47:24Z-05:00",  # current-datetime
    h'2fe1a167' : "2015-09-15T09:12:58Z-05:00"   # boot-datetime
  }
}
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
a1                                      # map(1)
   44                                   # bytes(4)
      334c67d9 
   a2                                   # map(2)
      44                                # bytes(4)
         047c468b
      78 1a                             # text(26)
         323031352d31302d30325431343a34373a32345a2d30353a3030
      44                                # bytes(4)
         2fe1a167
      78 1a                             # text(26)
         323031352d30392d31355430393a31323a35385a2d30353a3030
]]></artwork></figure>

</section>
<section anchor="leaf-list" title="The ‘leaf-list’ Schema Node">

<t>A leaf-list MUST be encoded using a CBOR array data item (major type 4).
Each entry of this array MUST be encoded using the rules defined by the YANG type specified.</t>

<t>Definition example <xref target="RFC7317"/>:</t>

<figure><artwork type="yang"><![CDATA[
typedef domain-name {
  type string {
    length "1..253";
    pattern '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9].)
             *([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?
             )|\.';
  }
}

leaf-list search {
  type domain-name;
  ordered-by user;
}
]]></artwork></figure>

<t>CBOR diagnostic notation: [ “ietf.org”, “ieee.org” ]</t>

<t>CBOR encoding: 82  68 696574662e6f7267  68 696565652e6f7267</t>

</section>
<section anchor="list" title="The ‘list’ Schema Node">

<t>A list MUST be encoded using a CBOR array data item (major type 4). Each list instance within this CBOR array is encoded using a CBOR map data item (major type 5) based on the same rules as a YANG container as defined in <xref target="container"/>.</t>

<t>Definition example <xref target="RFC7317"/>:</t>

<figure><artwork type="yang"><![CDATA[
list server {
  key name;

  leaf name {
    type string;
  }
  choice transport {
    case udp {
      container udp {
        leaf address {
          type host;
          mandatory true;
        }
        leaf port {
          type port-number;
        }
      }
    }
  }
  leaf association-type {
    type enumeration {
      enum server;
      enum peer;
      enum pool;
    }
    default server;
  }
  leaf iburst {
    type boolean;
    default false;
  }
  leaf prefer {
    type boolean;
    default false;
  }
}
]]></artwork></figure>

<t><spanx style="strong">SIDs example</spanx></t>

<t>SIDs used in this example are defined in <xref target="I-D.somaraju-core-sid"/> Appendix C. It is important to note that the protocol or method using this mapping may carry a parent SID or may have the knowledge of this parent SID based on its context. In these cases, delta encoding can be performed based on this parent SID which minimizes the size of the encoded data.</t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
[
  {
    1746 : "NRC TIC server",          # name
    1748 : {                          # udp
      +1 : "tic.nrc.ca",              # address, SID 1749
      +2 : 123                        # port, SID 1750
    },
    1744 : 0,                         # association-type
    1745 : false,                     # iburst
    1747 : true                       # prefer
  },
  {
    1746 : "NRC TAC server",          # name
    1748 : {                          # udp
      +1 : "tac.nrc.ca"               # address, SID 1749
    }
  }
]
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
82                                    # array(2)
   a5                                 # map(5)
      19 06d2                         # unsigned(1746)
      6e                              # text(14)
         4e52432054494320736572766572 # "NRC TIC server"
      19 06d4                         # unsigned(1748)
      a2                              # map(2)
         01                           # unsigned(1)
         6a                           # text(10)
            7469632e6e72632e6361      # "tic.nrc.ca"
         02                           # unsigned(2)
         18 7b                        # unsigned(123)
      19 06d0                         # unsigned(1744)
      00                              # unsigned(0)
      19 06d1                         # unsigned(1745)
      f4                              # primitive(20)
      19 06d3                         # unsigned(1747)
      f5                              # primitive(21)
   a2                                 # map(2)
      19 06d2                         # unsigned(1746)
      6e                              # text(14)
         4e52432054414320736572766572 # "NRC TAC server"
      19 06d4                         # unsigned(1748)
      a1                              # map(1)
         01                           # unsigned(1)
         6a                           # text(10)
            7461632e6e72632e6361      # "tac.nrc.ca"
]]></artwork></figure>

<t><spanx style="strong">Member names example</spanx></t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
[
  {
    "ietf-system:name" : "NRC TIC server",
    "ietf-system:udp" : {
      "address" : "tic.nrc.ca",
      "port" : 123
    },
    "ietf-system:association-type" : 0,
    "ietf-system:iburst" : false,
    "ietf-system:prefer" : true
  },
  {
    "ietf-system:name" : "NRC TAC server",
    "ietf-system:udp" : {
      "address" : "tac.nrc.ca"
    }
  }
]
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
82                                            # array(2)
   a5                                         # map(5)
      70                                      # text(16)
         696574662d73797374656d3a6e616d65     # "ietf-system:name"
      6e                                      # text(14)
         4e52432054494320736572766572         # "NRC TIC server"
      6f                                      # text(15)
         696574662d73797374656d3a756470       # "ietf-system:udp"
      a2                                      # map(2)
         67                                   # text(7)
            61646472657373                    # "address"
         6a                                   # text(10)
            7469632e6e72632e6361              # "tic.nrc.ca"
         64                                   # text(4)
            706f7274                          # "port"
         18 7b                                # unsigned(123)
      78 1c                                   # text(28)
         696574662d73797374656d3a6173736f63696174696f6e2d74797065
      00                                      # unsigned(0)
      72                                      # text(18)
         696574662d73797374656d3a696275727374 # "ietf-system:iburst"
      f4                                      # primitive(20)
      72                                      # text(18)
         696574662d73797374656d3a707265666572 # "ietf-system:prefer"
      f5                                      # primitive(21)
   a2                                         # map(2)
      70                                      # text(16)
         696574662d73797374656d3a6e616d65     # "ietf-system:name"
      6e                                      # text(14)
         4e52432054414320736572766572         # "NRC TAC server"
      6f                                      # text(15)
         696574662d73797374656d3a756470       # "ietf-system:udp"
      a1                                      # map(1)
         67                                   # text(7)
            61646472657373                    # "address"
         6a                                   # text(10)
            7461632e6e72632e6361              # "tac.nrc.ca"
]]></artwork></figure>

<t><spanx style="strong">YANG hashes example</spanx></t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
[
  {
    h'06c32032' : "NRC TIC server",           # name
    h'11889c84' : {                           # udp
      h'3158c529' : "tic.nrc.ca",             # address
      h'34492d05' : 123                       # port
    },
    h'2c2c2ccf' : 0,                          # association-type
    h'1058dc5d' : false,                      # iburst
    h'390e346a' : true                        # prefer
  },
  {
    h'06c32032' : "NRC TAC server",           # name
    h'11889c84' : {                           # udp
      h'3158c529' : "tac.nrc.ca"              # address
    }
  }
]
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
82                                    # array(2)
   a5                                 # map(5)
      44                              # bytes(4)
         06c32032"
      6e                              # text(14)
         4e52432054494320736572766572 # "NRC TIC server"
      44                              # bytes(4)
         11889c84 "
      a2                              # map(2)
         44                           # bytes(4)
            3158c529
         6a                           # text(10)
            7469632e6e72632e6361      # "tic.nrc.ca"
         44                           # bytes(4)
            34492d05
         18 7b                        # unsigned(123)
      44                              # bytes(4)
         2c2c2ccf
      00                              # unsigned(0)
      44                              # bytes(4)
         1058dc5d
      f4                              # primitive(20)
      44                              # bytes(4)
         390e346a
      f5                              # primitive(21)
   a2                                 # map(2)
      44                              # bytes(4)
         06c32032
      6e                              # text(14)
         4e52432054414320736572766572 # "NRC TAC server"
      44                              # bytes(4)
         11889c84
      a1                              # map(1)
         44                           # bytes(4)
            3158c529
         6a                           # text(10)
            7461632e6e72632e6361      # "tac.nrc.ca"
]]></artwork></figure>

</section>
<section anchor="the-anydata-schema-node" title="The ‘anydata’ Schema Node">

<t>An anydata serves as a container for an arbitrary set of schema nodes that otherwise appear as normal YANG-modeled data. An anydata instance is encoded using the same rules as a container, i.e., CBOR map. The requirement that anydata content can be modeled by YANG implies the following:</t>

<t><list style="symbols">
  <t>Keys MUST be set to valid SIDs, member names or YANG hashes. This rule applies to the key of the anydata node and the key of any inner schema node.</t>
  <t>The CBOR array MUST contain either unique scalar values (as a leaf-list, see <xref target="leaf-list"/>), or maps (as a list, see <xref target="list"/>).</t>
  <t>Values MUST follow the encoding rules of one of the datatypes listed in <xref target="data-types-mapping"/>.</t>
</list></t>

</section>
<section anchor="the-anyxml-schema-node" title="The ‘anyxml’ Schema Node">

<t>An anyxml instance is encoded as a CBOR key/value pair. The key of the anyxml schema node MUST be a valid SID, member name or YANG hash but the value is unrestricted, i.e., the value can be any CBOR encoded content.</t>

</section>
</section>
<section anchor="data-types-mapping" title="Representing YANG Data Types in CBOR">

<section anchor="the-unsigned-integer-types" title="The unsigned integer Types">

<t>Leafs of type uint8, uint16, uint32 and uint64 MUST be encoded using a CBOR
unsigned integer data item (major type 0).</t>

<t>Definition example <xref target="RFC7277"/>:</t>

<figure><artwork type="yang"><![CDATA[
leaf mtu {
  type uint16 {
    range "68..max";
  }
}
]]></artwork></figure>

<t>CBOR diagnostic notation: 1280</t>

<t>CBOR encoding: 19 0500</t>

</section>
<section anchor="the-integer-types" title="The integer Types">

<t>Leafs of type int8, int16, int32 and int64 MUST be encoded using either CBOR
unsigned integer (major type 0) or CBOR signed integer (major type 1), depending
on the actual value.</t>

<t>Definition example <xref target="RFC7317"/>:</t>

<figure><artwork type="yang"><![CDATA[
leaf timezone-utc-offset {
  type int16 {
    range "-1500 .. 1500";
  }
}
]]></artwork></figure>

<t>CBOR diagnostic notation: -300</t>

<t>CBOR encoding: 39 012b</t>

</section>
<section anchor="the-decimal64-type" title="The ‘decimal64’ Type">
<t>f type decimal64 MUST be encoded using either CBOR unsigned integer
(major type 0) or CBOR signed integer (major type 1), depending on the actual
value. 
Leafs oThe position of the decimal point is defined by the fraction-digits YANG statement and is not available in the CBOR encoding.</t>

<t>Definition example <xref target="RFC7317"/>:</t>

<figure><artwork type="yang"><![CDATA[
leaf my-decimal {
  type decimal64 {
    fraction-digits 2;
    range "1 .. 3.14 | 10 | 20..max";
  }
}
]]></artwork></figure>

<t>CBOR diagnostic notation: 257 (Represents decimal value 2.57)</t>

<t>CBOR encoding: 19 0101</t>

</section>
<section anchor="the-string-type" title="The ‘string’ Type">

<t>Leafs of type string MUST be encoded using a CBOR text string data item (major
type 3).</t>

<t>Definition example <xref target="RFC7223"/>:</t>

<figure><artwork type="yang"><![CDATA[
leaf name {
  type string;
}
]]></artwork></figure>

<t>CBOR diagnostic notation: “eth0”</t>

<t>CBOR encoding: 64 65746830</t>

</section>
<section anchor="the-boolean-type" title="The ‘boolean’ Type">

<t>Leafs of type boolean MUST be encoded using a CBOR true (major type 7, additional
information 21) or false data item (major type 7, additional information
20).</t>

<t>Definition example <xref target="RFC7317"/>:</t>

<figure><artwork type="yang"><![CDATA[
leaf enabled {
  type boolean;
}
]]></artwork></figure>

<t>CBOR diagnostic notation: true</t>

<t>CBOR encoding: f5</t>

</section>
<section anchor="the-enumeration-type" title="The ‘enumeration’ Type">

<t>Leafs of type enumeration MUST be encoded using a CBOR unsigned integer (major type 0) or CBOR signed integer (major type 1), depending on the actual value. Enumeration values are either explicitly assigned using the YANG statement ‘value’ or automatically assigned based on the algorithm defined in <xref target="I-D.ietf-netmod-rfc6020bis"/> section 9.6.4.2.</t>

<t>Definition example <xref target="RFC7317"/>:</t>

<figure><artwork type="yang"><![CDATA[
leaf oper-status {
  type enumeration {
    enum up { value 1; }
    enum down { value 2; }
    enum testing { value 3; }
    enum unknown { value 4; }
    enum dormant { value 5; }
    enum not-present { value 6; }
    enum lower-layer-down { value 7; }
  }
}
]]></artwork></figure>

<t>CBOR diagnostic notation: 3 (Represents enumeration value ‘testing’)</t>

<t>CBOR encoding: 03</t>

</section>
<section anchor="the-bits-type" title="The ‘bits’ Type">

<t>Leafs of type bits MUST be encoded using a CBOR byte string data item (major
type 2). Bits position are either explicitly assigned using the YANG statement
‘position’ or automatically assigned based on the algorithm defined in <xref target="I-D.ietf-netmod-rfc6020bis"/> section 9.7.4.2.</t>

<t>Bits position 0 to 7 are assigned to the first byte within the byte
string, bits 8 to 15 to the second byte, and subsequent bytes are assigned
similarly. Within each byte, bits are assigned from least to most significant.</t>

<t>Definition example <xref target="I-D.ietf-netmod-rfc6020bis"/>:</t>

<figure><artwork type="yang"><![CDATA[
leaf mybits {
  type bits {
    bit disable-nagle {
      position 0;
    }
    bit auto-sense-speed {
      position 1;
    }
    bit 10-Mb-only {
      position 2;
    }
  }
}
]]></artwork></figure>

<t>CBOR diagnostic notation: h’05’ (Represents bits disable-nagle and 10-Mb-only set)</t>

<t>CBOR encoding: 41 05</t>

</section>
<section anchor="the-binary-type" title="The ‘binary’ Type">

<t>Leafs of type binary MUST be encoded using a CBOR byte string data item (major
type 2).</t>

<t>Definition example:</t>

<figure><artwork type="yang"><![CDATA[
leaf aes128-key {
  type binary {
    length 16;
  }
}
]]></artwork></figure>

<t>CBOR diagnostic notation: h’1f1ce6a3f42660d888d92a4d8030476e’</t>

<t>CBOR encoding: 50 1f1ce6a3f42660d888d92a4d8030476e</t>

</section>
<section anchor="the-leafref-type" title="The ‘leafref’ Type">

<t>Leafs of type leafref MUST be encoded using the rules of the schema node referenced
by the ‘path’ YANG statement.</t>

<t>Definition example <xref target="RFC7223"/>:</t>

<figure><artwork type="yang"><![CDATA[
typedef interface-state-ref {
  type leafref {
    path "/interfaces-state/interface/name";
  }
}

container interfaces-state {
  list interface {
    key "name";
    leaf name {
      type string;
    }
    leaf-list higher-layer-if {
      type interface-state-ref;
    }
  }
}
]]></artwork></figure>

<t>CBOR diagnostic notation: “eth1”</t>

<t>CBOR encoding: 64 65746831</t>

</section>
<section anchor="the-identityref-type" title="The ‘identityref’ Type">

<t>This specification supports two approaches for encoding identityref, a SID as defined in <xref target="I-D.somaraju-core-sid"/> or a name as defined in <xref target="I-D.ietf-netmod-yang-json"/> section 6.8.</t>

<t><spanx style="strong">SIDs as identityref</spanx></t>

<t>SIDs are globally unique and can be used as identityref. This approach is both compact and simple to implement. When SIDs are used, identityref MUST be encoded using a CBOR unsigned integer data item (major type 0) or CBOR signed integer (major type 1), depending on the actual value. The value represents the delta between the SID of the identity assigned to the leaf and the SID of the base identity defined for this leaf.</t>

<t><spanx style="strong">Name as identityref</spanx></t>

<t>Alternatively, an identityref may be encoded using a name as defined in <xref target="I-D.ietf-netmod-yang-json"/> section 6.8.  When names are used, identityref MUST be encoded using a CBOR text string data item (major type 3). If the identity is defined in another module than the leaf node containing the identityref value, the namespace-qualified form MUST be used. Otherwise, both the simple and namespace-qualified forms are permitted.</t>

<t>Definition example <xref target="RFC7317"/>:</t>

<figure><artwork type="yang"><![CDATA[
identity radius-authentication-type {
  description
    "Base identity for RADIUS authentication types.";
}

identity radius-chap {
  base radius-authentication-type;
}

identity radius-pap {
  base radius-authentication-type;
}

leaf authentication-type {
  type identityref {
    base radius-authentication-type;
  }
}
]]></artwork></figure>

<t><spanx style="strong">SIDs as identityref</spanx></t>

<t>This example represents the encoding of identity “radius-pap” (SID 1705) assuming the base identity “radius-authentication-type” (SID 1703).</t>

<t>CBOR diagnostic notation: 2</t>

<t>CBOR encoding: 02</t>

<t><spanx style="strong">Name as identityref</spanx></t>

<t>CBOR diagnostic notation: “ietf-system:radius-pap”</t>

<t>CBOR encoding: 76 696574662d73797374656d3a7261646975732d706170</t>

</section>
<section anchor="the-empty-type" title="The ‘empty’ Type">

<t>Leafs of type empty MUST be encoded using the CBOR null value (major type
7, additional information 22).</t>

<t>Definition example <xref target="RFC7277"/>:</t>

<figure><artwork type="yang"><![CDATA[
leaf is-router {
  type empty;
}
]]></artwork></figure>

<t>CBOR diagnostic notation: null</t>

<t>CBOR encoding: f6</t>

</section>
<section anchor="the-union-type" title="The ‘union’ Type">

<t>Leafs of type union MUST be encoded using the rules associated with one of the types listed.
When used in a union, the following YANG datatypes are prefixed by CBOR tag to avoid confusion
between different YANG datatypes encoded using the same CBOR major type.</t>

<t><list style="symbols">
  <t>bits</t>
  <t>decimal64</t>
  <t>enumeration</t>
  <t>identityref</t>
  <t>instance-identifier</t>
  <t>leafref  (Only when the datatype of the leaf referenced using the ‘path’ YANG statement require a CBOR tag)</t>
</list></t>

<t>See <xref target="tag-registry"/> for more information about these CBOR tags.</t>

<t>Definition example <xref target="RFC7317"/>:</t>

<figure><artwork type="yang"><![CDATA[
typedef ipv4-address {
  type string {
  pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}
           ([0-9][1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}
           \p{L}]+)?';
  }
}

typedef ipv6-address {
  type string {
    pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a
             -fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0
             -9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0
             -9]?[0-9])))(%[\p{N}\p{L}]+)?';
    pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|((([^:]+:)*[^:]+)
             ?::(([^:]+:)*[^:]+)?)(%.+)?';
  }
}

typedef ip-address {
  type union {
    type ipv4-address;
    type ipv6-address;
  }
}

leaf address {
  type inet:ip-address;
}
]]></artwork></figure>

<t>CBOR diagnostic notation: “2001:db8:a0b:12f0::1”</t>

<t>CBOR encoding: 74 323030313a6462383a6130623a313266303a3a31</t>

</section>
<section anchor="the-instance-identifier-type" title="The ‘instance-identifier’ Type">

<t>This specification supports three approaches for encoding an instance-identifier, one based on SIDs as defined in <xref target="I-D.somaraju-core-sid"/>, one based on names as defined in <xref target="I-D.ietf-netmod-yang-json"/> section 6.13 and one based on YANG hashes as defined in <xref target="I-D.vanderstok-core-comi"/>.</t>

<t><spanx style="strong">SIDs as instance-identifier</spanx></t>

<t>SIDs uniquely identify a data node. For a single instance data node, the SID is sufficient to identify this instance. For a multi-instance data node, a SID is combined with the list key(s) to identify each instance of this data node within the YANG list(s).</t>

<t>Single instance data nodes MUST be encoded using a CBOR unsigned integer data item (major type 0) and set to the targeted data node SID.</t>

<t>Multi-instances data nodes MUST be encoded using a CBOR array data item (major type 4) containing the following entries:</t>

<t><list style="symbols">
  <t>The first entry MUST be encoded as a CBOR unsigned integer data item (major type 0) and set to the targeted data node SID.</t>
  <t>The following entries MUST contain the value of each key required to identify the instance of the targeted data node. These keys MUST be ordered as defined in the ‘key’ YANG statement, starting from top level list, and follow by each of the subordinate list(s).</t>
</list></t>

<t><spanx style="strong">Names as instance-identifier</spanx></t>

<t>The use of names as instance-identifier is defined in <xref target="I-D.ietf-netmod-yang-json"/> section 6.11. The resulting xpath MUST be encoded using a CBOR text string data item (major type 3).</t>

<t><spanx style="strong">YANG hashes as instance-identifier</spanx></t>

<t>When YANG hashes are used, xpath can be compressed based on the method defined by <xref target="I-D.vanderstok-core-comi"/> sections 4.1.4.1 and 4.1.4.2. The resulting hash MUST be encoded using a CBOR byte string data item (major type 2).</t>

<t>Definition example <xref target="RFC7317"/>:</t>

<figure><artwork type="yang"><![CDATA[
container system {

  leaf contact {
    type string;
  }

  leaf hostname {
    type inet:domain-name;
  }
}
]]></artwork></figure>

<t><spanx style="strong">First example based on SID</spanx></t>

<t>In this example, a field of type instance-identifier identifies the data node “/system/contact” (SID 1728).</t>

<figure><artwork type="CBORdiag"><![CDATA[
1728
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
19 06c0
]]></artwork></figure>

<t><spanx style="strong">First example based on name</spanx></t>

<t>Same example as above based on names.</t>

<figure><artwork type="CBORdiag"><![CDATA[
"/ietf-system:system/contact"
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
78 1c 2f20696574662d73797374656d3a73797374656d2f636f6e74616374
]]></artwork></figure>

<t><spanx style="strong">First example based on YANG hash</spanx></t>

<t>Same example assuming data node “/system/contact” is associated to YANG hash 0x09b06d17 or “JsG0X” in base64.</t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
"/JsG0X"
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
66 2f4a73473058
]]></artwork></figure>

<t>Definition example <xref target="RFC7317"/>:</t>

<figure><artwork type="yang"><![CDATA[
list user {
  key name;

  leaf name {
    type string;
  }
  leaf password {
    type ianach:crypt-hash;
  }

  list authorized-key {
    key name;

    leaf name {
      type string;
    }
    leaf algorithm {
      type string;
    }
    leaf key-data {
      type binary;
  }
}
]]></artwork></figure>

<t><spanx style="strong">Second example based on SID</spanx></t>

<t>In this example, a field of type instance-identifier identify the data node “/system/authentication/user/authorized-key/key-data” (SID 1721) for the user name “bob” and the authorized-key name “admin”.</t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
[1721, "bob", "admin"]
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
83                      # array(3)
   19 06b9              # unsigned(1721)
   63                   # text(3)
      626f62            # "bob"
   65                   # text(5)
      61646d696e        # "admin"
]]></artwork></figure>

<t><spanx style="strong">Second example based on name</spanx></t>

<t>Same example as above based on names.</t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
"/ietf-system:system/authentication/user[name='bob']/authorized-key
[name='admin']/key-data"
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
78 59
   2f696574662d73797374656d3a73797374656d2f61757468656e74696361
   74696f6e2f757365725b6e616d653d27626f62275d2f617574686f72697a
   65642d6b65795b6e616d653d2761646d696e275d2f6b65792d64617461
]]></artwork></figure>

<t><spanx style="strong">Second example based on YANG hash</spanx></t>

<t>Same example assuming data node “/ietf-system:system/authentication/user/authorized-key/key-data” is associated to YANG hash 0x0d6e7afb or  “Nbnr7” in base64.</t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
"/Nbnr7?keys=\"bob\",\"admin\""
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
78 19 2f4e626e72373f6b6579733d22626f62222c2261646d696e22
]]></artwork></figure>

<t><spanx style="strong">Third example based on SID</spanx></t>

<t>This third example identify an instance within the list “/system/authentication/user” (SID 1717) corresponding to the user name “jack”.</t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
[1717, "jack"]
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
82                      # array(2)
   19 06b5              # unsigned(1717)
   64                   # text(4)
      6a61636b          # "jack"
]]></artwork></figure>

<t><spanx style="strong">Third example based on name</spanx></t>

<t>Same example as above based on names.</t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
"/ietf-system:system/authentication/user[name='bob']"
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
78 33
   2f696574662d73797374656d3a73797374656d2f61757468656e74696361
   74696f6e2f757365725b6e616d653d27626f62275d
]]></artwork></figure>

<t><spanx style="strong">Third example based on YANG hash</spanx></t>

<t>Same example assuming data node “/ietf-system:system/authentication/user” is associated to YANG hash 0x2677c6c1 or “md8bB” in base64.</t>

<t>CBOR diagnostic notation:</t>

<figure><artwork type="CBORdiag"><![CDATA[
"/md8bB?keys=\"bob\""
]]></artwork></figure>

<t>CBOR encoding:</t>

<figure><artwork type="CBORbytes"><![CDATA[
71 2f6d643862423f6b6579733d22626f6222
]]></artwork></figure>

</section>
</section>
<section anchor="security-considerations" title="Security Considerations">

<t>The security considerations of <xref target="RFC7049"/> and <xref target="I-D.ietf-netmod-rfc6020bis"/> apply.</t>

<t>This document defines an alternative encoding for data modeled in the YANG data modeling language. As such, this encoding does not contribute any new security issues in addition of those identified for the specific protocol or context for which it is used.</t>

<t>To minimize security risks, software on the receiving side SHOULD reject all messages that do not comply to the rules of this document and reply with an appropriate error message to the sender.</t>

</section>
<section anchor="iana-considerations" title="IANA Considerations">

<section anchor="tag-registry" title="Tags Registry">

<t>This specification requires the assignment of CBOR tags for the following YANG datatypes.
These tags are added to the Tags Registry as defined in section 7.2 of <xref target="RFC7049"/>.</t>

<texttable align="left">
      <ttcol align='left'>Tag</ttcol>
      <ttcol align='left'>Data Item</ttcol>
      <ttcol align='left'>Semantics</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>40</c>
      <c>bits</c>
      <c>YANG bits datatype</c>
      <c>RFC XXXX</c>
      <c>41</c>
      <c>decimal64</c>
      <c>YANG decimal64 datatype</c>
      <c>RFC XXXX</c>
      <c>42</c>
      <c>enumeration</c>
      <c>YANG enumeration datatype</c>
      <c>RFC XXXX</c>
      <c>43</c>
      <c>identityref</c>
      <c>YANG identityref datatype</c>
      <c>RFC XXXX</c>
      <c>44</c>
      <c>instance-identifier</c>
      <c>YANG instance-identifier datatype</c>
      <c>RFC XXXX</c>
</texttable>

<t>// RFC Ed.: update Tag values using allocated tags if needed and remove this note
// RFC Ed.: replace XXXX with RFC number and remove this note</t>

</section>
</section>
<section anchor="acknowledgments" title="Acknowledgments">

<t>This document has been largely inspired by the extensive works done by Andy Bierman and Peter van der Stok on <xref target="I-D.vanderstok-core-comi"/>. <xref target="I-D.ietf-netmod-yang-json"/> has also been a critical input to this work. The authors would like to thank the authors and contributors to these two drafts.</t>

<t>The authors would also like to acknowledge the review, feedback, and comments from Ladislav Lhotka and Juergen Schoenwaelder.</t>

</section>


  </middle>

  <back>

    <references title='Normative References'>





<reference anchor='I-D.ietf-netmod-rfc6020bis'>
<front>
<title>The YANG 1.1 Data Modeling Language</title>

<author initials='M' surname='Bjorklund' fullname='Martin Bjorklund'>
    <organization />
</author>

<date month='June' day='17' year='2016' />

<abstract><t>YANG is a data modeling language used to model configuration data, state data, remote procedure calls, and notifications for network management protocols.  This document describes the syntax and semantics of version 1.1 of the YANG language.  YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification.  There are a small number of backward incompatibilities from YANG version 1.  This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-netmod-rfc6020bis-14' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-netmod-rfc6020bis-14.txt' />
</reference>



<reference  anchor='RFC2119' target='http://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='S. Bradner'><organization /></author>
<date year='1997' month='March' />
<abstract><t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='2119'/>
<seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>



<reference  anchor='RFC7049' target='http://www.rfc-editor.org/info/rfc7049'>
<front>
<title>Concise Binary Object Representation (CBOR)</title>
<author initials='C.' surname='Bormann' fullname='C. Bormann'><organization /></author>
<author initials='P.' surname='Hoffman' fullname='P. Hoffman'><organization /></author>
<date year='2013' month='October' />
<abstract><t>The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation.  These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack.</t></abstract>
</front>
<seriesInfo name='RFC' value='7049'/>
<seriesInfo name='DOI' value='10.17487/RFC7049'/>
</reference>




    </references>

    <references title='Informative References'>





<reference anchor='I-D.somaraju-core-sid'>
<front>
<title>Structure Identifier (SID)</title>

<author initials='A' surname='Somaraju' fullname='Abhinav Somaraju'>
    <organization />
</author>

<author initials='M' surname='Veillette' fullname='Michel Veillette'>
    <organization />
</author>

<author initials='A' surname='Pelov' fullname='Alexander Pelov'>
    <organization />
</author>

<author initials='R' surname='Turner' fullname='Randy Turner'>
    <organization />
</author>

<author initials='A' surname='Minaburo' fullname='Ana Minaburo'>
    <organization />
</author>

<date month='March' day='11' year='2016' />

<abstract><t>Structured IDentifiers (SID) are used to identify different YANG items when encoded in CBOR.  This document defines the registration and assignment processes of SIDs.  To enable the implementation of these processes, this document also defines a file format used to persist and publish assigned SIDs.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-somaraju-core-sid-00' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-somaraju-core-sid-00.txt' />
</reference>



<reference anchor='I-D.ietf-netmod-yang-json'>
<front>
<title>JSON Encoding of Data Modeled with YANG</title>

<author initials='L' surname='Lhotka' fullname='Ladislav Lhotka'>
    <organization />
</author>

<date month='March' day='28' year='2016' />

<abstract><t>This document defines encoding rules for representing configuration data, state data, parameters of RPC operations or actions, and notifications defined using YANG as JavaScript Object Notation (JSON) text.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-netmod-yang-json-10' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-netmod-yang-json-10.txt' />
</reference>



<reference anchor='I-D.vanderstok-core-comi'>
<front>
<title>CoAP Management Interface</title>

<author initials='P' surname='Stok' fullname='Peter Van der Stok'>
    <organization />
</author>

<author initials='A' surname='Bierman' fullname='Andy Bierman'>
    <organization />
</author>

<date month='March' day='7' year='2016' />

<abstract><t>This document describes a network management interface for constrained devices, called CoMI.  CoMI is an adaptation of the RESTCONF protocol for use in constrained devices and networks.  The Constrained Application Protocol (CoAP) is used to access management data resources specified in YANG, or SMIv2 converted to YANG.  CoMI use the YANG to CBOR mapping and encodes YANG names to reduce payload size.  Note  Discussion and suggestions for improvement are requested, and should be sent to core@ietf.org.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-vanderstok-core-comi-09' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-vanderstok-core-comi-09.txt' />
<format type='PDF'
        target='http://www.ietf.org/internet-drafts/draft-vanderstok-core-comi-09.pdf' />
</reference>



<reference  anchor='RFC7159' target='http://www.rfc-editor.org/info/rfc7159'>
<front>
<title>The JavaScript Object Notation (JSON) Data Interchange Format</title>
<author initials='T.' surname='Bray' fullname='T. Bray' role='editor'><organization /></author>
<date year='2014' month='March' />
<abstract><t>JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format.  It was derived from the ECMAScript Programming Language Standard.  JSON defines a small set of formatting rules for the portable representation of structured data.</t><t>This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.</t></abstract>
</front>
<seriesInfo name='RFC' value='7159'/>
<seriesInfo name='DOI' value='10.17487/RFC7159'/>
</reference>



<reference  anchor='RFC7223' target='http://www.rfc-editor.org/info/rfc7223'>
<front>
<title>A YANG Data Model for Interface Management</title>
<author initials='M.' surname='Bjorklund' fullname='M. Bjorklund'><organization /></author>
<date year='2014' month='May' />
<abstract><t>This document defines a YANG data model for the management of network interfaces.  It is expected that interface-type-specific data models augment the generic interfaces data model defined in this document. The data model includes configuration data and state data (status information and counters for the collection of statistics).</t></abstract>
</front>
<seriesInfo name='RFC' value='7223'/>
<seriesInfo name='DOI' value='10.17487/RFC7223'/>
</reference>



<reference  anchor='RFC7228' target='http://www.rfc-editor.org/info/rfc7228'>
<front>
<title>Terminology for Constrained-Node Networks</title>
<author initials='C.' surname='Bormann' fullname='C. Bormann'><organization /></author>
<author initials='M.' surname='Ersue' fullname='M. Ersue'><organization /></author>
<author initials='A.' surname='Keranen' fullname='A. Keranen'><organization /></author>
<date year='2014' month='May' />
<abstract><t>The Internet Protocol Suite is increasingly used on small devices with severe constraints on power, memory, and processing resources, creating constrained-node networks.  This document provides a number of basic terms that have been useful in the standardization work for constrained-node networks.</t></abstract>
</front>
<seriesInfo name='RFC' value='7228'/>
<seriesInfo name='DOI' value='10.17487/RFC7228'/>
</reference>



<reference  anchor='RFC7277' target='http://www.rfc-editor.org/info/rfc7277'>
<front>
<title>A YANG Data Model for IP Management</title>
<author initials='M.' surname='Bjorklund' fullname='M. Bjorklund'><organization /></author>
<date year='2014' month='June' />
<abstract><t>This document defines a YANG data model for management of IP implementations.  The data model includes configuration data and state data.</t></abstract>
</front>
<seriesInfo name='RFC' value='7277'/>
<seriesInfo name='DOI' value='10.17487/RFC7277'/>
</reference>



<reference  anchor='RFC7317' target='http://www.rfc-editor.org/info/rfc7317'>
<front>
<title>A YANG Data Model for System Management</title>
<author initials='A.' surname='Bierman' fullname='A. Bierman'><organization /></author>
<author initials='M.' surname='Bjorklund' fullname='M. Bjorklund'><organization /></author>
<date year='2014' month='August' />
<abstract><t>This document defines a YANG data model for the configuration and identification of some common system properties within a device containing a Network Configuration Protocol (NETCONF) server.  This document also includes data node definitions for system identification, time-of-day management, user management, DNS resolver configuration, and some protocol operations for system management.</t></abstract>
</front>
<seriesInfo name='RFC' value='7317'/>
<seriesInfo name='DOI' value='10.17487/RFC7317'/>
</reference>




    </references>



  </back>
</rfc>

