<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc linkmailto="no" ?>
<?rfc rfcedstyle="yes"?>
<?rfc-ext allow-markup-in-artwork="yes" ?>
<?rfc-ext include-references-in-index="yes" ?>
<rfc category="exp" docName="draft-irtf-icnrg-icnlowpan-00" ipr="trust200902"
     submissionType="IRTF">
  <front>
    <title abbrev="ICN Adaptation to LowPANs">ICN Adaptation to LowPAN
    Networks (ICN LoWPAN)</title>

    <author fullname="Cenk Gundogan" initials="C." surname="Gundogan">
      <organization abbrev="HAW Hamburg">HAW Hamburg</organization>

      <address>
        <postal>
          <street>Berliner Tor 7</street>

          <city>Hamburg</city>

          <code>D-20099</code>

          <country>Germany</country>
        </postal>

        <phone>+4940428758067</phone>

        <email>cenk.guendogan@haw-hamburg.de</email>

        <uri>http://inet.haw-hamburg.de/members/cenk-gundogan</uri>
      </address>
    </author>

    <author fullname="Thomas C. Schmidt" initials="TC." surname="Schmidt">
      <organization abbrev="HAW Hamburg">HAW Hamburg</organization>

      <address>
        <postal>
          <street>Berliner Tor 7</street>

          <city>Hamburg</city>

          <code>D-20099</code>

          <country>Germany</country>
        </postal>

        <email>t.schmidt@haw-hamburg.de</email>

        <uri>http://inet.haw-hamburg.de/members/schmidt</uri>
      </address>
    </author>

    <author fullname="Matthias Waehlisch" initials="M." surname="Waehlisch">
      <organization abbrev="link-lab &amp; FU Berlin">link-lab &amp; FU
      Berlin</organization>

      <address>
        <postal>
          <street>Hoenower Str. 35</street>

          <city>Berlin</city>

          <code>D-10318</code>

          <country>Germany</country>
        </postal>

        <email>mw@link-lab.net</email>

        <uri>http://www.inf.fu-berlin.de/~waehl</uri>
      </address>
    </author>

    <author fullname="Christopher Scherb" initials="C." surname="Scherb">
      <organization abbrev="University of Basel">University of
      Basel</organization>

      <address>
        <postal>
          <street>Spiegelgasse 1</street>

          <city>Basel</city>

          <code>CH-4051</code>

          <country>Switzerland</country>
        </postal>

        <email>christopher.scherb@unibas.ch</email>
      </address>
    </author>

    <author fullname="Claudio Marxer" initials="C." surname="Marxer">
      <organization abbrev="University of Basel">University of
      Basel</organization>

      <address>
        <postal>
          <street>Spiegelgasse 1</street>

          <city>Basel</city>

          <code>CH-4051</code>

          <country>Switzerland</country>
        </postal>

        <email>claudio.marxer@unibas.ch</email>
      </address>
    </author>

    <author fullname="Christian Tschudin" initials="C." surname="Tschudin">
      <organization abbrev="University of Basel">University of
      Basel</organization>

      <address>
        <postal>
          <street>Spiegelgasse 1</street>

          <city>Basel</city>

          <code>CH-4051</code>

          <country>Switzerland</country>
        </postal>

        <email>christian.tschudin@unibas.ch</email>
      </address>
    </author>

    <date/>

    <workgroup>ICN Research Group</workgroup>

    <abstract>
      <t>In this document, a convergence layer for CCNx and NDN over IEEE
      802.15.4 LoWPAN networks is defined. A new frame format is specified to
      adapt CCNx and NDN packets to the small MTU size of IEEE 802.15.4. For
      that, syntactic and semantic changes to the TLV-based header formats are
      described. To support compatibility with other LoWPAN technologies that
      may coexist on a wireless medium, the dispatching scheme provided by
      6LoWPAN is extended to include new dispatch types for CCNx and NDN.
      Additionally, the link fragmentation component of the 6LoWPAN
      dispatching framework is applied to ICN chunks. Basic improvements in
      efficiency are advised by stateless and stateful compression
      schemes.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>The Internet of Things (IoT) has been identified as a promising
      deployment area for Information Centric Networks (ICN), as
      infrastructureless access to content, resilient forwarding, and
      in-network data replication have shown noteable advantages over the
      traditional host-to-host approach on the Internet <xref
      target="NDN-EXP1"/>, <xref target="NDN-EXP2"/>. Recent studies <xref
      target="NDN-MAC"/> have shown that an appropriate mapping to link layer
      technologies has a large impact on the practical performance of an ICN.
      This will be even more relevant in the context of IoT communication
      where nodes often exchange messages via low-power wireless links under
      lossy conditions. In this memo, we address the base adaptation of data
      chunks to such link layers for the ICN flavors NDN <xref target="NDN"/>
      and CCNx.</t>

      <t>The IEEE 802.15.4 <xref target="ieee802.15.4"/> link layer is used in
      low-power and lossy networks (see <spanx style="verb">LLN</spanx> in
      <xref target="RFC7228"/>), in which devices are typically
      battery-operated and constrained in resources. Characteristics of LLNs
      include an unreliable environment, low bandwidth transmissions, and
      increased latencies. IEEE 802.15.4 admits a maximum physical layer
      packet size of 127 octets. The maximum frame header size is 25 octets,
      which leaves 102 octets for the payload. IEEE 802.15.4 security features
      further reduce this payload length by up to 21 octets, yielding a net of
      81 octets for CCNx or NDN packet headers, signatures and content.</t>

      <t>6LoWPAN <xref target="RFC4944"/><xref target="RFC6282"/> is a
      convergence layer that provides frame formats, header compression and
      link fragmentation for IPv6 packets in IEEE 802.15.4 networks. The
      6LoWPAN adaptation introduces a dispatching framework that prepends
      further information to 6LoWPAN packets, including a protocol identifier
      for IEEE 802.15.4 payload and meta information about link
      fragmentation.</t>

      <t>Prevalent Type-Length-Value (TLV) based packet formats such as in
      CCNx and NDN are designed to be generic and extensible. This leads to
      header verbosity which is inappropriate in constrained environments of
      IEEE 802.15.4 links. This document presents ICN LoWPAN, a convergence
      layer for IEEE 802.15.4 motivated by 6LoWPAN that compresses packet
      headers of CCNx as well as NDN and allows for an increased payload size
      per packet. Additionally by reusing the dispatching framwork defined by
      6LoWPAN, compatibility between coexisting wireless networks of competing
      technologies is enabled. This also allows to reuse the link
      fragmentation scheme specified by 6LoWPAN for ICN LoWPAN.</t>

      <t>ICN LoWPAN utilizes a more space efficient representation of CCNx and
      NDN packet formats. This syntactic change is described for CCNx and NDN
      separately, as the header formats and TLV encodings differ largely. For
      further reductions, default header values suitable for constrained IoT
      networks are selected in order to elide corresponding TLVs.</t>

      <t>In a typical IoT scenario (see <xref target="fig-iot_network">
      </xref>), embedded devices are interconnected via quasi-stationary
      infrastructure whith a border router (BR) interconnecting the
      constrained LoWPAN networks via some Gateway with the public Internet.
      In ICN based IoT networks, Interest and Data messages transparently
      travel through the BR up and down between a Gateway and the embedded
      devices within the constrained LoWPANs.</t>

      <figure anchor="fig-iot_network" title="IoT Stub Network">
        <artwork align="center"><![CDATA[
               |Gateway Services|
               -------------------------
                     |
                 ,--------,
                 |        |
                 |   BR   |
                 |        |
                 '--------'
                              LoWPAN
               O            O
                      O
             O                O   embedded
               O      O     O     devices
                O         O
                     ]]></artwork>
      </figure>
    </section>

    <section title="Terminology">
      <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 RFC 2119 <xref
      target="RFC2119"/>. The use of the term, "silently ignore" is not
      defined in RFC 2119. However, the term is used in this document and can
      be similarly construed.</t>

      <t>This document uses the terminology of <xref target="RFC7476"/>, <xref
      target="RFC7927"/>, and <xref target="RFC7945"/> for ICN entities.</t>

      <t>The following terms are used in the document and defined as follows:
      <list hangIndent="14" style="hanging">
          <t hangText="ICN LoWPAN:">Information-Centric Networking over
          Low-power Wireless Personal Area Network</t>

          <t hangText="LLN">Low-Power and Lossy Network</t>

          <t hangText="CCNx:">Content-Centric Networking Architecture</t>

          <t hangText="NDN:">Named Data Networking</t>
        </list></t>
    </section>

    <section anchor="ICNLoWPAN" title="Overview of ICN LoWPAN ">
      <section title="Link-Layer Convergence">
        <t>ICN LoWPAN provides a convergence layer that maps ICN packets onto
        constrained link-layer technologies. This includes features such as
        link-layer fragmentation, protocol separation on the link-layer level,
        and link-layer address mappings. The stack traversal is visualized in
        <xref target="fig.intro.hbh"/>.</t>

        <figure anchor="fig.intro.hbh"
                title="ICN LoWPAN convergence layer for IEEE 802.15.4">
          <artwork align="center"><![CDATA[
      Device 1                                         Device 2
,------------------,           Router            ,------------------,
|  Application   . |     __________________      | ,-> Application  |
|----------------|-|    |    NDN / CCNx    |     |-|----------------|
|  NDN / CCNx    | |    | ,--------------, |     | |    NDN / CCNx  |
|----------------|-|    |-|--------------|-|     |-|----------------|
|  ICN LoWPAN    | |    | |  ICN LoWPAN  | |     | |    ICN LoWPAN  |
|----------------|-|    |-|--------------|-|     |-|----------------|
|  Link-Layer    | |    | |  Link-Layer  | |     | |    Link-Layer  |
'----------------|-'    '-|--------------|-'     '-|----------------'
                 '--------'              '---------'
                    ]]></artwork>
        </figure>

        <t><xref target="sec.lowpan_adaptation"/> of this document defines the
        convergence layer for IEEE 802.15.4.</t>
      </section>

      <section title="Stateless Header Compression">
        <t>ICN LoWPAN also defines a stateless header compression scheme with
        the main purpose of reducing header overhead of ICN packets. This is
        of particular importance for link-layers with small MTUs. The
        stateless compression does not require pre-configuration of global
        state.</t>

        <t>The CCNx and NDN header formats are composed of Type-Length-Value
        (TLV) fields to encode header data. The advantage of TLVs is its
        native support of variable-sized data. The main disadvantage of TLVs
        is the verbosity that results from storing the type and length of the
        encoded data.</t>

        <t>The stateless header compression scheme makes use of compact bit
        fields to indicate the presence of mandatory and optional TLVs in the
        uncompressed packet. The order of set bits in the bit fields
        corresponds to the order of each TLV in the packet. Further
        compression is achieved by specifying default values and reducing the
        codomain of certain header fields.</t>

        <t><xref target="fig.TLV.compressed"/> demonstrates the stateless
        header compression idea. In this example, the first type of the first
        TLV is removed and the corresponding bit in the bit field is set. The
        second TLV represents a fixed-length TLV (e.g. the Nonce TLV in NDN),
        so that the type and the length fields are removed. The third TLV
        represents a boolean TLV (e.g. the MustBeFresh selector in NDN) and is
        missing the type, length and the value field.</t>

        <figure anchor="fig.TLV.compressed"
                title="Compression using a compact bit field to encode context information.">
          <artwork align="center"><![CDATA[
  +---+---+---+---+---+---+---+---+
  | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |  Bit field
  +---+---+---+---+---+---+---+---+
    |       |                   |
 ,--'       '-----------,       '- boolean
 |                      |
+-------+--------------+-------------+
|  LEN  |     VALUE    |    VALUE    |
+-------+--------------+-------------+
                    ]]></artwork>
        </figure>
      </section>

      <section title="Stateful Header Compression">
        <t>ICN LoWPAN further employs 2 stateful compression schemes to
        enhance size reductions. These mechanisms rely on shared contexts that
        are either distributed and maintained in the whole LoWPAN, or are
        generated on-demand for a particular Interest-data path.</t>

        <section title="LoWPAN-local State" toc="exclude">
          <t>A context identifier (CID) is a 1-octet wide number that refers
          to a particular conceptual context between network devices and MAY
          be used to replace frequently appearing information, like name
          prefixes, suffixes, or meta information, such as Interest
          lifetime.</t>

          <t>The initial distribution and maintenance of shared context is out
          of scope. Frames containing unknown or invalid CIDs are silently
          discarded.</t>
        </section>

        <section title="En-route State" toc="exclude">
          <t>In CCNx and NDN, Name TLVs are included in Interest messages, and
          they return in data messages. Returning Name TLVs either equal to
          the original Name TLV, or they contain the original Name TLV as a
          prefix. ICN LoWPAN reduces this duplication in responses by
          replacing Name TLVs with 1-octet wide HopIDs. While an Interest is
          forwarded, each hop generates an ephemeral HopID that is tied to a
          PIT entry. Each HopID MUST be unique within the local PIT and only
          exist during the lifetime of a PIT entry. To maintain HopIDs, the
          local PIT is extended by two new columns: HIDi (inbound HopIDs) and
          HIDo (outbound HopIDs).</t>

          <t>HopIDs are included in Interests and stored on the next hop with
          the resulting PIT entry in the HIDi column. The HopID is replaced
          with a newly generated local HopID before the Interest is forwarded.
          This new HopID is stored in the HIDo column of the local PIT (see
          <xref target="fig.enroute-a"/>). <figure anchor="fig.enroute-a"
              title="Setting compression state en-route (Interest).">
              <artwork align="center"><![CDATA[
    PIT of B      PIT Extension          PIT of C      PIT Extension
+--------+------++------+------+     +--------+------++------+------+
| Prefix | Face || HIDi | HIDo |     | Prefix | Face || HIDi | HIDo |
+========+======++======+======+     +========+======++======+======+
|  /p0   | F_A  || h_A  | h_B  |     |  /p0   | F_A  || h_A  |      |
+--------+------++------+------+     +--------+------++------+------+
                    ^       |                            ^
              store |       '----------------------, ,---' store
                    |                 send         v |
,---,         /p0, h_A          ,---,         /p0, h_B          ,---,
| A | ------------------------> | B | ------------------------> | C |
'---'                           '---'                           '---'
                  ]]></artwork>
            </figure></t>

          <t>Responses include HopIDs that were obtained from Interests. If
          the returning Name TLV equals the original Name TLV, then the name
          is elided fully. Otherwise, the distinct suffix is included along
          with the HopID. When a response is forwarded, the contained HopID is
          extracted and used to match against the correct PIT entry by
          performing a lookup on the HIDo column. The HopID is then replaced
          with the corresponding HopID from the HIDi column before forwarding
          the reponse (<xref target="fig.enroute-b"/>). <figure
              anchor="fig.enroute-b"
              title="Eliding Name TLVs using en-route state (data).">
              <artwork align="center"><![CDATA[
    PIT of B      PIT Extension          PIT of C      PIT Extension
+--------+------++------+------+     +--------+------++------+------+
| Prefix | Face || HIDi | HIDo |     | Prefix | Face || HIDi | HIDo |
+========+======++======+======+     +========+======++======+======+
|  /p0   | F_A  || h_A  | h_B  |     |  /p0   | F_A  || h_A  |      |
+--------+------++------+------+     +--------+------++------+------+
                    |       ^                            |
               send |       '----------------------, ,---' send
                    v                 match        | v
,---,              h_A          ,---,              h_B          ,---,
| A | <------------------------ | B | <------------------------ | C |
'---'                           '---'                           '---'
                    ]]></artwork>
            </figure></t>
        </section>
      </section>
    </section>

    <section anchor="sec.lowpan_adaptation" title="IEEE 802.15.4 Adaptation">
      <section anchor="sec.lowpan_encap" title="LoWPAN Encapsulation">
        <t>The IEEE 802.15.4 frame header does not provide a protocol
        identifier for its payload. This causes problems of misinterpreting
        frames when several networks coexist on the same link layer. To
        mitigate errors, 6LoWPAN defines dispatches as encapsulation headers
        for IEEE 802.15.4 frames (see Section 5 of <xref target="RFC4944"/>).
        Multiple LoWPAN encapsulation headers can prepend the actual payload
        and each encapsulation header is identified by a dispatch type.</t>

        <t><xref target="RFC8025"/> further specifies dispatch pages to switch
        between different contexts. When a LoWPAN parser encounters a <spanx
        style="verb">Page switch</spanx> LoWPAN encapsulation header, then all
        following encapsulation headers are interpreted by using a dispatch
        table as specified by the <spanx style="verb">Page switch</spanx>
        header. Page 0 and page 1 are reserved for 6LoWPAN. This document uses
        page 2 (<spanx style="verb">1111 0010 (0xF2)</spanx>) for NDN and page
        3 (<spanx style="verb">1111 0011 (0xF3)</spanx>) for CCNx.</t>

        <t>The base dispatch format (<xref target="fig.disp.base"/>) is used
        and extended by CCNx and NDN in <xref target="sec.ndn"/> and <xref
        target="sec.ccnx"/>.</t>

        <figure anchor="fig.disp.base" title="Base dispatch format for NDN">
          <artwork align="center"><![CDATA[
  0   1   2        ...        7
+---+---+-----------------------+
| C | M |                       |
+---+---+-----------------------+
           ]]></artwork>
        </figure>

        <t><list hangIndent="4" style="hanging">
            <t hangText="C: Compression"><list hangIndent="12" style="hanging">
                <t hangText="0:">The message is uncompressed.</t>

                <t hangText="1:">The message is compressed.</t>
              </list></t>

            <t hangText="M: Message Type"><list hangIndent="12"
                style="hanging">
                <t hangText="0:">The payload contains a Interest message.</t>

                <t hangText="1:">The payload contains a Data message.</t>
              </list></t>
          </list></t>

        <t>The encapsulation format for ICN LoWPAN identifying an NDN Interest
        message is exemplarily displayed in <xref
        target="fig.CCN-LoWPAN.header"/>.</t>

        <figure anchor="fig.CCN-LoWPAN.header"
                title="LoWPAN Encapsulation of NDN Interest with ICN LoWPAN">
          <artwork align="center"><![CDATA[
+---------------+------------+--------+----------------+-------+
| IEEE 802.15.4 | Dispatches | Page 2 | NDN Dispatches | Payl. /
+---------------+------------+--------+----------------+-------+
          ]]></artwork>
        </figure>

        <t><list hangIndent="16" style="hanging">
            <t hangText="IEEE 802.15.4:">The IEEE 802.15.4 header.</t>

            <t hangText="Dispatches:">Optional additional dispatch types.</t>

            <t hangText="Page 2:">Page Switch 2 (0xF2) for NDN.</t>

            <t hangText="NDN Dispatches:">NDN dispatches as defined in <xref
            target="sec.ndn"/>.</t>

            <t hangText="Payload:">The actual (un-)compressed NDN
            Interest.</t>
          </list></t>
      </section>

      <section anchor="sec.Fragmentation" title="Link Fragmentation">
        <t>Section 5.3 of <xref target="RFC4944"/> defines a protocol
        independent fragmentation dispatch type, a fragmentation header for
        the first fragment and a separate fragmentation header for subsequent
        fragments. ICN LoWPAN adopts the fragmentation handling of <xref
        target="RFC4944"/>.</t>

        <t>The Fragmentation LoWPAN header can encapsulate other dispatch
        headers. The order of dispatch types is adopted from <xref
        target="RFC4944"/>. <xref target="fig.fr_first"/> shows the
        fragmentation scheme. The reassembled ICN LoWPAN frame does not
        contain any fragmentation headers and is depicted in <xref
        target="fig.fr_done"/>.</t>

        <figure anchor="fig.fr_first" title="Fragmentation scheme">
          <artwork align="center"><![CDATA[
+---------------+-----------+--------+----------------+-------------+
| IEEE 802.15.4 | Frag. 1st | Page 2 |   ICN LoWPAN   | Payload ... /
+---------------+-----------+--------+----------------+-------------+

+---------------+-----------+-------------+
| IEEE 802.15.4 | Frag. 2nd | ... Payload /
+---------------+-----------+-------------+

                .
                .
                .

+---------------+-----------+-------------+
| IEEE 802.15.4 | Frag. Nth | ... Payload /
+---------------+-----------+-------------+
                  ]]></artwork>
        </figure>

        <figure anchor="fig.fr_done" title="Reassembled ICN LoWPAN frame">
          <artwork align="center"><![CDATA[
+---------------+--------+----------------+---------+
| IEEE 802.15.4 | Page 2 |   ICN LoWPAN   | Payload /
+---------------+--------+----------------+---------+
                  ]]></artwork>
        </figure>
      </section>

      <section title="Integrating Stateful Header Compression">
        <section title="LoWPAN-Local State" toc="exclude">
          <t>A CID is appended to the last ICN LoWPAN dispatch octet. Multiple
          CIDs are chained together, whereas the most significant bit
          indicates the presence of a subsequent CID (<xref
          target="fig.cid"/>).</t>

          <figure anchor="fig.cid"
                  title="Multiple 1-octet wide context identifiers.">
            <artwork align="center"><![CDATA[
 +-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+
 |1|     CID     | --> |1|     CID     | --> |0|     CID     |
 +-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+
                    ]]></artwork>
          </figure>
        </section>

        <section title="En-Route State" toc="exclude">
          <t>The HopID is included as the very first CID. To distinguish the
          HopID from a typical LoWPAN-local CID, the 1st bit MUST be set
          (<xref target="fig.hopid"/>). This yields 64 distinct HopIDs. If
          this range (0..63) is exhausted, the messages MUST be sent without
          en-route state compression until new HopIDs are available.</t>

          <figure anchor="fig.hopid" title="Context Identifier as HopID.">
            <artwork align="center"><![CDATA[
  0   1   2   3   4   5   6   7
+---+---+---+---+---+---+---+---+
| X | 1 |         HopID         |
+---+---+---+---+---+---+---+---+
                    ]]></artwork>
          </figure>
        </section>
      </section>
    </section>

    <section anchor="sec.ndn" title="ICN LoWPAN for NDN">
      <section anchor="sec.tlvencoding" title="TLV Encoding">
        <t>The NDN packet format consists of TLV fields using the TLV encoding
        that is described in <xref target="NDN-PACKET-SPEC"/>. Type and length
        fields are of variable size, where numbers greater than 252 are
        encoded using multiple octets. <xref target="fig.ndntlvs"/> shows the
        NDN TLV encoding scheme.</t>

        <t>If the type or length number is less than <spanx style="verb">253</spanx>,
        then that number is encoded into the actual type or length field
        (<xref target="fig.ndntlvs"/> a). If the number is greater or equals
        <spanx style="verb">253</spanx> and fits into 2 octets, then the type
        or lengh field is set to <spanx style="verb">253</spanx> and the
        number is encoded in the next following 2 octets in network byte
        order, i.e., from the most significant byte (MSB) to the least
        significant byte (LSB) (<xref target="fig.ndntlvs"/> b). If the number
        is greater than 2 octets and fits into 4 octets, then the type or
        length field is set to <spanx style="verb">254</spanx> and the number
        is encoded in the subsequent 4 octets in network byte order (<xref
        target="fig.ndntlvs"/> c). For greater numbers, the type or length
        field is set to <spanx style="verb">255</spanx> and the number is
        encoded in the subsequent 8 octets in network byte order (<xref
        target="fig.ndntlvs"/> d).</t>

        <figure anchor="fig.ndntlvs" title="NDN TLV encoding scheme">
          <artwork align="center"><![CDATA[
    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
a) |     < 253     |
   +-+-+-+-+-+-+-+-+

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
b) |      253      |      MSB             LSB      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      254      |      MSB                                      /
c) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      LSB      |
   +-+-+-+-+-+-+-+-+

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      255      |      MSB                                      /
   +-+-+-+-+-+-+-+-+                                               +
d) |                                                               /
   +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      LSB      |
   +-+-+-+-+-+-+-+-+
          ]]></artwork>
        </figure>

        <t>In this document, compressed NDN TLVs make use of a different TLV
        scheme that puts more emphasis on size reduction. Instead of using the
        first octet as a marker for the number of following octets, the
        compressed NDN TLV scheme uses a method to chain a variable number of
        octets together. If an octet equals <spanx style="verb">255 (0xFF)</spanx>,
        then the following octet will also be interpreted. The actual value of
        a chain equals the sum of all links.</t>

        <t>If the type or length number is less than <spanx style="verb">255</spanx>,
        then that number is encoded into the actual type or length field
        (<xref target="fig.ndntlvscompressed"/> a). If the type or length
        number (X) fits into 2 octets, then the first octet is set to <spanx
        style="verb">255</spanx> and the subsequent octet equals <spanx
        style="verb">X mod 255</spanx> (<xref target="fig.ndntlvscompressed"/>
        b). Following this scheme, a variable-sized number (X) is encoded
        using multiple octets of <spanx style="verb">255</spanx> with a
        trailing octet containing <spanx style="verb">X mod 255</spanx> (<xref
        target="fig.ndntlvscompressed"/> c).</t>

        <figure anchor="fig.ndntlvscompressed"
                title="Compressed NDN TLV encoding scheme">
          <artwork align="center"><![CDATA[
    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
a) |   < 255 (X)   | = X
   +-+-+-+-+-+-+-+-+

    0                   1
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
b) |      255      |   < 255 (X)   | = 255 + X
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    0
    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+-+-+-.....-+-+-+-+-+-+-+-+-+-+-+
c) |      255      |      255      |   < 255 (X)   | = (N * 255) + X
   +-+-+-+-+-+-+-+-+-+-+-.....-+-+-+-+-+-+-+-+-+-+-+
                        (N - 1)
          ]]></artwork>
        </figure>
      </section>

      <section anchor="sec.ndn.namecompression" title="Name TLV Compression">
        <t>This Name TLV compression encodes length fields of two consecutive
        NameComponent TLVs into one octet, using 4 bits each. This process
        limits the length of a NameComponent TLV to 15 octets. A length of 0
        marks the end of the compressed Name TLV.</t>

        <figure anchor="fig.ndnshortnco"
                title="Name TLV compression for /HAW/Room/481/Humid/99">
          <artwork align="center"><![CDATA[
                Name: /HAW/Room/481/Humid/99

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 1 1|0 1 0 0|       H       |       A       |       W       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       R       |       o       |       o       |       m       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 1 1|0 1 0 1|       4       |       8       |       1       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       H       |       u       |       m       |       i       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       d       |0 0 1 0|0 0 0 0|       9       |       9       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
               ]]></artwork>
        </figure>
      </section>

      <section title="Interest Messages">
        <section title="Uncompressed Interest Messages" toc="exclude">
          <t>An uncompressed Interest message uses the base dispatch format
          (see <xref target="fig.disp.base"/>) and sets the C as well as the M
          flag to <spanx style="verb">0</spanx> (<xref
          target="fig.ndn.int.uncompr"/>). <spanx style="verb">resv</spanx>
          MUST be set to 0. The Interest message is handed to the NDN network
          stack without modifications.</t>

          <figure anchor="fig.ndn.int.uncompr"
                  title="Dispatch format for uncompressed NDN Interest messages">
            <artwork align="center"><![CDATA[
  0   1   2        ...        7
+---+---+-----------------------+
| 0 | 0 |         resv          |
+---+---+-----------------------+
               ]]></artwork>
          </figure>
        </section>

        <section title="Compressed Interest Messages" toc="exclude">
          <t>The compressed Interest message uses the base dispatch format and
          sets the C flag to <spanx style="verb">1</spanx> and the M flag to
          <spanx style="verb">0</spanx>. By default, the Interest message is
          compressed with the following base rule set: <list style="numbers">
              <t>The <spanx style="verb">Type</spanx> field of the outermost
              MessageType TLV is removed.</t>

              <t>The Name TLV is compressed according to <xref
              target="sec.ndn.namecompression"/>. For this, all NameComponents
              are expected to be of type GenericNameComponent. Otherwise, the
              message MUST be sent uncompressed.</t>

              <t>The InterestLifetime TLV length is set to 2. Messages with
              lifetimes that require more than 2 octets MUST be sent
              uncompressed.</t>

              <t>The Nonce TLV, InterestLifetime TLV and HopLimit TLV MUST be
              moved to the end of the compressed Interest, keeping the order
              1) Nonce TLV, 2) InterestLifetime TLV and 3) HopLimit TLV.</t>

              <t>The Type and Length fields of Nonce TLV, InterestLifetime TLV
              and HopLimit TLV are elided. The presence of each TLV is deduced
              from the remaining length to parse. The Nonce TLV has a fixed
              length of 4, the InterestLifetime TLV has a fixed length of 2
              and the HopLimit TLV has a fixed length of 1. Any combination
              yields a distinct value that matches the remaining length to
              parse.</t>
            </list> Further TLV compression is indicated by the ICN LoWPAN
          dispatch in <xref target="fig.ndn.intcompr"/>.</t>

          <figure anchor="fig.ndn.intcompr"
                  title="Dispatch format for compressed NDN Interest messages">
            <artwork align="center"><![CDATA[
  0   1   2   3   4   5   6   7
+---+---+---+---+---+---+---+---+
| 1 | 0 |DIG|PFX|FRE|FWD|PRM|CID|
+---+---+---+---+---+---+---+---+
               ]]></artwork>
          </figure>

          <t><list hangIndent="4" style="hanging">
              <t hangText="DIG: ImplicitSha256DigestComponent TLV"><list
                  hangIndent="12" style="hanging">
                  <t hangText="0:">The name does not include an
                  ImplicitSha256DigestComponent as the last TLV.</t>

                  <t hangText="1:">The name does include an
                  ImplicitSha256DigestComponent as the last TLV. The Type and
                  Length fields are omitted.</t>
                </list></t>

              <t hangText="PFX: CanBePrefix TLV"><list hangIndent="12"
                  style="hanging">
                  <t hangText="0:">The uncompressed message does not include a
                  CanBePrefix TLV.</t>

                  <t hangText="1:">The uncompressed message does include a
                  CanBePrefix TLV and is removed from the compressed
                  message.</t>
                </list></t>

              <t hangText="FRE: MustBeFresh TLV"><list hangIndent="12"
                  style="hanging">
                  <t hangText="0:">The uncompressed message does not include a
                  MustBeFresh TLV.</t>

                  <t hangText="1:">The uncompressed message does include a
                  MustBeFresh TLV and is removed from the compressed
                  message.</t>
                </list></t>

              <t hangText="FWD: ForwardingHint TLV"><list hangIndent="12"
                  style="hanging">
                  <t hangText="0:">The uncompressed message does not include a
                  ForwardingHint TLV.</t>

                  <t hangText="1:">The uncompressed message does include a
                  ForwardingHint TLV. The Type field is removed from the
                  compressed message.</t>
                </list></t>

              <t hangText="PRM: Parameters TLV"><list hangIndent="12"
                  style="hanging">
                  <t hangText="0:">The uncompressed message does not include a
                  Parameters TLV.</t>

                  <t hangText="1:">The uncompressed message does include a
                  Parameters TLV. The Type field is removed from the
                  compressed message.</t>
                </list></t>

              <t hangText="CID: Context Identifiers"><list hangIndent="12"
                  style="hanging">
                  <t hangText="0:">CID(s) are not appended to the dispatch
                  octet.</t>

                  <t hangText="1:">CID(s) are appended to the dispatch
                  octet.</t>
                </list></t>
            </list></t>
        </section>
      </section>

      <section title="Data Messages">
        <section title="Uncompressed Data Messages" toc="exclude">
          <t>An uncompressed Data message uses the base dispatch format and
          sets the C flag to <spanx style="verb">0</spanx> and the M flag to
          <spanx style="verb">1</spanx> (<xref
          target="fig.ndn.data.uncompr"/>). <spanx style="verb">resv</spanx>
          MUST be set to 0. The Data message is handed to the NDN network
          stack without modifications.</t>

          <figure anchor="fig.ndn.data.uncompr"
                  title="Dispatch format for uncompressed NDN Data messages">
            <artwork align="center"><![CDATA[
  0   1   2        ...        7
+---+---+-----------------------+
| 0 | 1 |         resv          |
+---+---+-----------------------+
                   ]]></artwork>
          </figure>
        </section>

        <section title="Compressed Data Messages" toc="exclude">
          <t>The compressed Data message uses the base dispatch format and
          sets the C flag as well as the M flag to <spanx style="verb">1</spanx>.
          By default, the Data message is compressed with the following base
          rule set: <list style="numbers">
              <t>The <spanx style="verb">Type</spanx> field of the outermost
              MessageType TLV is removed.</t>

              <t>The Name TLV is compressed according to <xref
              target="sec.ndn.namecompression"/>. For this, all NameComponents
              are expected to be of type GenericNameComponent. Otherwise, the
              message MUST be sent uncompressed.</t>

              <t>The MetaInfo Type and Length fields are elided from the
              compressed Data message.</t>

              <t>If present, the FinalBlockId TLV is encoded according to
              <xref target="sec.ndn.namecompression"/>.</t>

              <t>The ContentType TLV length is set to 1. Messages with
              ContentTypes that require more than 1 octet MUST be sent
              uncompressed.</t>

              <t>The FreshnessPeriod TLV length is set to 2. Messages with
              FreshnessPeriods that require more than 2 octets MUST be sent
              uncompressed.</t>

              <t>The FreshnessPeriod TLV and ContntType TLV MUST be moved to
              the end of the compressed Data, keeping the order 1)
              FreshnessPeriod TLV and 2) ContentType TLV.</t>

              <t>The Type and Length fields of ContentType TLV and
              FreshnessPeriod TLV are elided. The presence of each TLV is
              deduced from the remaining length to parse. The FreshnessPeriod
              TLV has a fixed length of 2 and the ContentType TLV has a fixed
              length of 1. Any combination yields a distinct value that
              matches the remaining length to parse.</t>
            </list> Further TLV compression is indicated by the ICN LoWPAN
          dispatch in <xref target="fig.ndn.datacompr"/>.</t>

          <figure anchor="fig.ndn.datacompr"
                  title="Dispatch format for compressed NDN Data messages">
            <artwork align="center"><![CDATA[
  0   1   2   3   4   5   6   7
+---+---+---+---+---+---+---+---+
| 1 | 1 |DIG|FBI|CON|  SIG  |CID|
+---+---+---+---+---+---+---+---+
               ]]></artwork>
          </figure>

          <t><list hangIndent="4" style="hanging">
              <t hangText="DIG: ImplicitSha256DigestComponent TLV"><list
                  hangIndent="12" style="hanging">
                  <t hangText="0:">The name does not include an
                  ImplicitSha256DigestComponent as the last TLV.</t>

                  <t hangText="1:">The name does include an
                  ImplicitSha256DigestComponent as the last TLV. The Type and
                  Length fields are omitted.</t>
                </list></t>

              <t hangText="FBI: FinalBlockId TLV"><list hangIndent="12"
                  style="hanging">
                  <t hangText="0:">The uncompressed message does not include a
                  FinalBlockId TLV.</t>

                  <t hangText="1:">The uncompressed message does include a
                  FinalBlockId.</t>
                </list></t>

              <t hangText="CON: Content TLV"><list hangIndent="12"
                  style="hanging">
                  <t hangText="0:">The uncompressed message does not include a
                  Content TLV.</t>

                  <t hangText="1:">The uncompressed message does include a
                  Content TLV. The Type field is removed from the compressed
                  message.</t>
                </list></t>

              <t hangText="SIG: Signature TLV"><list hangIndent="12"
                  style="hanging">
                  <t hangText="00:">The Type fields of the SignatureInfo TLV,
                  SignatureType TLV and SignatureValue TLV are removed.</t>

                  <t hangText="01:">Reserved.</t>

                  <t hangText="10:">Reserved.</t>

                  <t hangText="11:">Reserved.</t>
                </list></t>

              <t hangText="CID: Context Identifiers"><list hangIndent="12"
                  style="hanging">
                  <t hangText="0:">CID(s) are not appended to the dispatch
                  octet.</t>

                  <t hangText="1:">CID(s) are appended to the dispatch
                  octet.</t>
                </list></t>
            </list></t>
        </section>
      </section>
    </section>

    <section anchor="sec.ccnx" title="ICN LoWPAN for CCNx">
      <section title="TLV Encoding">
        <t>The CCNx TLV encoding is described in <xref
        target="I-D.irtf-icnrg-ccnxmessages"/>. Type and Length fields attain
        the common fixed length of 2 octets.</t>

        <t>In this document, the TLV encoding is changed to the more space
        efficient encoding described in <xref target="sec.tlvencoding"/>. Type
        and Length fields MUST be encoded as in <xref
        target="fig.ndntlvscompressed"/>.</t>
      </section>

      <section title="Name TLV Compression">
        <t>Name TLVs are compressed using the same approach outlined in <xref
        target="sec.ndn.namecompression"/>. If a Name TLV contains T_IPID,
        T_APP, or organizational TLVs, then the name remains uncompressed.</t>
      </section>

      <section title="Interest Messages">
        <section title="Uncompressed Interest Messages" toc="exclude">
          <t>An uncompressed Interest message uses the base dispatch format
          (see <xref target="fig.disp.base"/>) and sets the C as well as the M
          flag to <spanx style="verb">0</spanx> (<xref
          target="fig.ccnx.int.uncompr"/>). <spanx style="verb">resv</spanx>
          MUST be set to 0. The Interest message is handed to the CCNx network
          stack without modifications.</t>

          <figure anchor="fig.ccnx.int.uncompr"
                  title="Dispatch format for uncompressed CCNx Interest messages">
            <artwork align="center"><![CDATA[
  0   1   2        ...        7
+---+---+-----------------------+
| 0 | 0 |         resv          |
+---+---+-----------------------+
               ]]></artwork>
          </figure>
        </section>

        <section anchor="sec.ccnxintcompbaseheader"
                 title="Compressed Interest Messages" toc="exclude">
          <t>The compressed Interest message uses the base dispatch format and
          sets the C flag to <spanx style="verb">1</spanx> and the M flag to
          <spanx style="verb">0</spanx>. By default, the Interest message is
          compressed with the following base rule set: <list style="numbers">
              <t>The Type and Length fields of the CCNx Message TLV are elided
              and are obtained from the Fixed Header on decompression.</t>
            </list> Further TLV compression is indicated by the ICN LoWPAN
          dispatch in <xref target="fig.ccnx.intcompr"/>.</t>

          <figure anchor="fig.ccnx.intcompr"
                  title="Dispatch format for compressed CCNx Interest messages">
            <artwork align="center"><![CDATA[
  0                                       1
  0   1   2   3   4   5   6   7   8   9   0   1   2   3   4   5
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| 1 | 0 |FLG|  HBH  |PTY|HPL|FRS|MSG|PAY|VAL|EXT|   RESVD   |CID|
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
                 ]]></artwork>
          </figure>

          <t><list hangIndent="4" style="hanging">
              <t hangText="FLG: Flags field in the Fixed Header"><list
                  hangIndent="8" style="hanging">
                  <t hangText="0:">The Flags field equals 0 and is removed
                  from the Interest message.</t>

                  <t hangText="1:">The Flags field is carried in-line.</t>
                </list></t>

              <t hangText="HBH: Optional Hop-By-Hop Header TLVs"><list
                  hangIndent="8" style="hanging">
                  <t hangText="00:">No Hop-By-Hop Header TLVs are present in
                  the Interest message. Also, the HeaderLength field in the
                  fixed header is elided from the Interest message and assumed
                  to be <spanx style="verb">8</spanx>.</t>

                  <t hangText="01:">Uncompressed Hop-By-Hop Header TLVs are
                  present in the Interest message.</t>

                  <t hangText="10:">Hop-By-Hop Header TLVs are present in the
                  Interest message. An additional octet follows immediately
                  that handles Hop-By-Hop Header TLV compressions and is
                  described in <xref target="sec.ccnxhbhint"/>.</t>

                  <t hangText="10:">Reserved.</t>
                </list></t>

              <t hangText="PTY: PacketType field in the fixed header"><list
                  hangIndent="8" style="hanging">
                  <t hangText="0:">The PacketType field is elided and assumed
                  to be <spanx style="verb">PT_INTEREST</spanx></t>

                  <t hangText="1:">The PacketType field is elided and assumed
                  to be <spanx style="verb">PT_RETURN</spanx></t>
                </list></t>

              <t hangText="HPL: HopLimit field in the fixed header"><list
                  hangIndent="8" style="hanging">
                  <t hangText="0:">The HopLimit field is carried in-line</t>

                  <t hangText="1:">The HopLimit field is elided and assumed to
                  be <spanx style="verb">1</spanx></t>
                </list></t>

              <t hangText="FRS: Reserved field in the fixed header"><list
                  hangIndent="8" style="hanging">
                  <t hangText="0:">The Reserved field is carried in-line</t>

                  <t hangText="1:">The Reserved field is elided and assumed to
                  be <spanx style="verb">0</spanx></t>
                </list></t>

              <t hangText="MSG: Optional Interest Message TLVs"><list
                  hangIndent="8" style="hanging">
                  <t hangText="0:">No Interest Message TLVs are present in the
                  Interest message.</t>

                  <t hangText="1:">Interest Message TLVs are present in the
                  Interest message. An additional octet follows immediately
                  that handles Interest Message TLV compressions and is
                  described in <xref target="sec.ccnxmsgint"/>.</t>
                </list></t>

              <t hangText="PAY: Optional Payload TLV"><list hangIndent="8"
                  style="hanging">
                  <t hangText="0:">The Payload TLV is absent.</t>

                  <t hangText="1:">The Payload TLV is present and the type
                  field is elided.</t>
                </list></t>

              <t
              hangText="VAL: Optional ValidationAlgorithm and ValidationPayload TLVs"><list
                  hangIndent="8" style="hanging">
                  <t hangText="0:">No validation related TLVs are present in
                  the Interest message.</t>

                  <t hangText="1:">Validation related TLVs are present in the
                  Interest message. An additional octet follows immediately
                  that handles validation related TLV compressions and is
                  described in <xref target="sec.ccnx.intval"/>.</t>
                </list></t>

              <t hangText="EXT: Extension"><list hangIndent="8"
                  style="hanging">
                  <t hangText="0:">No extension octet follows.</t>

                  <t hangText="1:">An extension octet follows immediately.
                  Extension octets are used to extend the compression scheme,
                  but are out of scope of this document.</t>
                </list></t>

              <t hangText="CID: Context Identifiers"><list hangIndent="8"
                  style="hanging">
                  <t hangText="0:">CID(s) are not appended to the last
                  dispatch octet.</t>

                  <t hangText="1:">CID(s) are appended to the last dispatch
                  octet.</t>
                </list></t>
            </list></t>
        </section>

        <section anchor="sec.ccnxhbhint"
                 title="Hop-By-Hop Header TLVs Compression" toc="exclude">
          <t>Hop-By-Hop Header TLVs are unordered. For an Interest message,
          two optional Hop-By-Hop Header TLVs are defined in <xref
          target="I-D.irtf-icnrg-ccnxmessages"/>, but several more can be
          defined in higher level specifications. For better compression, an
          ordering of Hop-By-Hop TLVs is required as follows: <list
              style="numbers">
              <t>Interest Lifetime TLV</t>

              <t>Message Hash TLV</t>
            </list> With this ordering in place, Type fields are elided from
          the Interest Lifetime TLV and the Message Hash TLV.</t>

          <t>Note: If the original Interest message includes Hop-By-Hop Header
          TLVs that follow a different ordering, then they remain
          uncompressed.</t>

          <figure anchor="fig.ccnx.hbhdispatch"
                  title="Dispatch for HBH Compression">
            <artwork align="center"><![CDATA[
    0       1       2       3       4       5       6       7
+-------+-------+-------+-------+-------+-------+-------+-------+
|  IntLifetime  |    MsgHash    |           Reserved            |
+-------+-------+-------+-------+-------+-------+-------+-------+
          ]]></artwork>
          </figure>

          <t><list hangIndent="4" style="hanging">
              <t
              hangText="IntLifetime: InterstLifetime Hop-By-Hop Header TLV"><list
                  hangIndent="8" style="hanging">
                  <t hangText="00:">The Interest Lifetime TLV is absent.</t>

                  <t hangText="01:">The Interest Lifetime TLV is present and
                  the type field is removed.</t>

                  <t hangText="10:">The Interest Lifetime TLV is absent and a
                  default value of 0 seconds is assumed.</t>

                  <t hangText="11:">The Interest Lifetime TLV is absent and a
                  default value of 10 minutes is assumed.</t>
                </list></t>

              <t hangText="MsgHash: Message Hash Hop-By-Hop Header TLV"><list
                  hangIndent="8" style="hanging">
                  <t hangText="00:">The Message Hash TLV is absent.</t>

                  <t hangText="01:">The Message Hash TLV is present and
                  uncompressed.</t>

                  <t hangText="10:">A T_SHA-256 TLV is present and the type
                  field as well as the length fields are removed. The length
                  field is assumed to represent 32 octets. The outer Message
                  Hash TLV is omitted.</t>

                  <t hangText="11:">A T_SHA-512 TLV is present and the type
                  field as well as the length fields are removed. The length
                  field is assumed to represent 64 octets. The outer Message
                  Hash TLV is omitted.</t>
                </list></t>
            </list></t>
        </section>

        <section anchor="sec.ccnxmsgint"
                 title="Interest Message TLVs Compression" toc="exclude">
          <figure anchor="fig.ccnx.dispatchintmsg"
                  title="Dispatch for Interest Messages">
            <artwork align="center"><![CDATA[
    0       1       2       3       4       5       6       7
+-------+-------+-------+-------+-------+-------+-------+-------+
|  KeyIDRestr   |   CObHRestr   |           Reserved            |
+-------+-------+-------+-------+-------+-------+-------+-------+
          ]]></artwork>
          </figure>

          <t><list hangIndent="4" style="hanging">
              <t
              hangText="KeyIDRestr: Optional KeyIdRestriction TLV within a CCNx Message TLV"><list
                  hangIndent="8" style="hanging">
                  <t hangText="00:">The KeyIdRestriction TLV is absent.</t>

                  <t hangText="01:">The KeyIdRestriction TLV is present and
                  uncompressed.</t>

                  <t hangText="10:">A T_SHA-256 TLV is present and the type
                  field as well as the length fields are removed. The length
                  field is assumed to represent 32 octets. The outer
                  KeyIdRestriction TLV is omitted.</t>

                  <t hangText="11:">A T_SHA-512 TLV is present and the type
                  field as well as the length fields are removed. The length
                  field is assumed to represent 64 octets. The outer
                  KeyIdRestriction TLV is omitted.</t>
                </list></t>

              <t
              hangText="CObHRestr: Optional ContentObjectHashRestriction TLV within a CCNx Message TLV"><list
                  hangIndent="8" style="hanging">
                  <t hangText="00:">The ContentObjectHashRestriction TLV is
                  absent.</t>

                  <t hangText="01:">The ContentObjectHashRestriction TLV is
                  present and uncompressed.</t>

                  <t hangText="10:">A T_SHA-256 TLV is present and the type
                  field as well as the length fields are removed. The length
                  field is assumed to represent 32 octets. The outer
                  ContentObjectHashRestriction TLV is omitted.</t>

                  <t hangText="11:">A T_SHA-512 TLV is present and the type
                  field as well as the length fields are removed. The length
                  field is assumed to represent 64 octets. The outer
                  ContentObjectHashRestriction TLV is omitted.</t>
                </list></t>
            </list></t>
        </section>

        <section anchor="sec.ccnx.intval" title="Validation" toc="exclude">
          <figure anchor="fig.ccnx.dispatchintval"
                  title="Dispatch for Interset Validations">
            <artwork align="center"><![CDATA[
0       1       2       3       4       5       6       7       8
+-------+-------+-------+-------+-------+-------+-------+-------+
|         ValidationAlg         |     KeyID     |   Reserved    |
+-------+-------+-------+-------+-------+-------+-------+-------+
                        ]]></artwork>
          </figure>

          <t><list hangIndent="4" style="hanging">
              <t
              hangText="ValidationALg: Optional ValidationAlgorithm TLV"><list
                  hangIndent="8" style="hanging">
                  <t hangText="0000:">An uncompressed ValidationAlgorithm TLV
                  is included.</t>

                  <t hangText="0001:">A T_CRC32C ValidationAlgorithm TLV is
                  assumed, but no ValidationAlgorithm TLV is included.</t>

                  <t hangText="0010:">A T_CRC32C ValidationAlgorithm TLV is
                  assumed, but no ValidationAlgorithm TLV is included.
                  Additionally, a Sigtime TLV is inlined without a type and a
                  length field.</t>

                  <t hangText="0011:">A T_HMAC-SHA256 ValidationAlgorithm TLV
                  is assumed, but no ValidationAlgorithm TLV is included.</t>

                  <t hangText="0100:">A T_HMAC-SHA256 ValidationAlgorithm TLV
                  is assumed, but no ValidationAlgorithm TLV is inclued.
                  Additionally, a Sigtime TLV is inlined without a type and a
                  length field.</t>

                  <t hangText="0101:">Reserved.</t>

                  <t hangText="0110:">Reserved.</t>

                  <t hangText="0111:">Reserved.</t>

                  <t hangText="1000:">Reserved.</t>

                  <t hangText="1001:">Reserved.</t>

                  <t hangText="1010:">Reserved.</t>

                  <t hangText="1011:">Reserved.</t>

                  <t hangText="1100:">Reserved.</t>

                  <t hangText="1101:">Reserved.</t>

                  <t hangText="1110:">Reserved.</t>

                  <t hangText="1111:">Reserved.</t>
                </list></t>

              <t
              hangText="KeyID: Optional KeyID TLV within the ValidationAlgorithm TLV"><list
                  hangIndent="8" style="hanging">
                  <t hangText="00:">The KeyId TLV is absent.</t>

                  <t hangText="01:">The KeyId TLV is present and
                  uncompressed.</t>

                  <t hangText="10:">A T_SHA-256 TLV is present and the type
                  field as well as the length fields are removed. The length
                  field is assumed to represent 32 octets. The outer KeyId TLV
                  is omitted.</t>

                  <t hangText="11:">A T_SHA-512 TLV is present and the type
                  field as well as the length fields are removed. The length
                  field is assumed to represent 64 octets. The outer KeyId TLV
                  is omitted.</t>
                </list></t>
            </list></t>

          <t>The ValidationPayload TLV is present if the ValidationAlgorithm
          TLV is present. The type field is omitted.</t>
        </section>
      </section>

      <section title="Content Objects">
        <section title="Uncompressed Content Objects" toc="exclude">
          <t>An uncompressed Content object uses the base dispatch format (see
          <xref target="fig.disp.base"/>) and sets the C flag to <spanx
          style="verb">0</spanx> and the M flag to <spanx style="verb">1</spanx>
          (<xref target="fig.ccnx.data.uncompr"/>). <spanx style="verb">resv</spanx>
          MUST be set to 0. The Content object is handed to the CCNx network
          stack without modifications.</t>

          <figure anchor="fig.ccnx.data.uncompr"
                  title="Dispatch format for uncompressed CCNx Content objects">
            <artwork align="center"><![CDATA[
  0   1   2        ...        7
+---+---+-----------------------+
| 0 | 1 |         resv          |
+---+---+-----------------------+
               ]]></artwork>
          </figure>
        </section>

        <section title="Compressed Content Objects" toc="exclude">
          <t>The compressed Content object uses the base dispatch format and
          sets the C flag as well as the M flag to <spanx style="verb">1</spanx>.
          By default, the Content object is compressed with the following base
          rule set: <list style="numbers">
              <t>The PacketType field is elided from the Fixed Header.</t>

              <t>The Type and Length fields of the CCNx Message TLV are elided
              and are obtained from the Fixed Header on decompression.</t>
            </list> Further TLV compression is indicated by the ICN LoWPAN
          dispatch in <xref target="fig.ccnx.datacompr"/>.</t>

          <figure anchor="fig.ccnx.datacompr"
                  title="Dispatch format for compressed CCNx Content objects">
            <artwork align="center"><![CDATA[
  0                                       1
  0   1   2   3   4   5   6   7   8   9   0   1   2   3   4   5
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| 1 | 1 |FLG|  HBH  |FRS|MSG|PAY|VAL|EXT|       RESVD       |CID|
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
           ]]></artwork>
          </figure>

          <t><list hangIndent="4" style="hanging">
              <t hangText="FLG: Flags field in the fixed header">See <xref
              target="sec.ccnxintcompbaseheader"/>.</t>

              <t hangText="HBH: Optional Hop-By-Hop Header TLVs">See HBH
              handling in <xref target="sec.ccnxintcompbaseheader"/>. An
              additional octet that handles the Hop-By-Hop Header TLV
              compression is described in <xref
              target="sec.ccnxhbhdata"/>.</t>

              <t hangText="FRS: Reserved field in the Fixed Header">See <xref
              target="sec.ccnxintcompbaseheader"/>.</t>

              <t hangText="MSG: Optional Content Object Message TLVs"><list
                  hangIndent="8" style="hanging">
                  <t hangText="0:">No Content Object Message TLVs are present
                  in the Content Object message.</t>

                  <t hangText="1:">Content Object Message TLVs are present in
                  the Content Object message. An additional octet follows
                  immediately that handles Content Object Message TLV
                  compressions and is described in <xref
                  target="sec.ccnx.msgdata"/>.</t>
                </list></t>

              <t hangText="PAY: Optional Payload TLV">See <xref
              target="sec.ccnxintcompbaseheader"/>.</t>

              <t
              hangText="VAL: Optional ValidationAlgorithm and ValidationPayload TLVs">See
              <xref target="sec.ccnxintcompbaseheader"/>.</t>

              <t hangText="EXT: Extension">See <xref
              target="sec.ccnxintcompbaseheader"/>.</t>

              <t hangText="CID: Context Identifiers"><list hangIndent="8"
                  style="hanging">
                  <t hangText="0:">CID(s) are not appended to the last
                  dispatch octet.</t>

                  <t hangText="1:">CID(s) are appended to the last dispatch
                  octet.</t>
                </list></t>
            </list></t>
        </section>

        <section anchor="sec.ccnxhbhdata"
                 title="Hop-By-Hop Header TLVs Compression" toc="exclude">
          <t>Hop-By-Hop Header TLVs are unordered. For a Content Object
          message, two optional Hop-By-Hop Header TLVs are defined in <xref
          target="I-D.irtf-icnrg-ccnxmessages"/>, but several more can be
          defined in higher level specifications. For better compression, an
          ordering of Hop-By-Hop TLVs is required as follows: <list
              style="numbers">
              <t>Recommended Cache Time TLV</t>

              <t>Message Hash TLV</t>
            </list> With this ordering in place, Type fields are elided from
          the Recommended Cache Time TLV and Message Hash TLV.</t>

          <t>Note: If the original Content Object message includes Hop-By-Hop
          Header TLVs with a different ordering, then they remain
          uncompressed.</t>

          <figure anchor="fig.ccnx.data.hbhdispatch"
                  title="Dispatch for HBH Compression">
            <artwork align="center"><![CDATA[
    0       1       2       3       4       5       6       7
+-------+-------+-------+-------+-------+-------+-------+-------+
|  RCT  |    MsgHash    |               Reserved                |
+-------+-------+-------+-------+-------+-------+-------+-------+
          ]]></artwork>
          </figure>

          <t><list hangIndent="4" style="hanging">
              <t
              hangText="RCT: Recommended Cache Time Hop-By-Hop Header TLV"><list
                  hangIndent="8" style="hanging">
                  <t hangText="0:">The Recommended Cache Time TLV is
                  absent.</t>

                  <t hangText="1:">The Recommended Cache Time TLV is present
                  and the type as well as the length fields are elided.</t>
                </list></t>

              <t hangText="MsgHash: Message Hash Hop-By-Hop Header TLV">See
              <xref target="sec.ccnxhbhint"/>.</t>
            </list></t>
        </section>

        <section anchor="sec.ccnx.msgdata"
                 title="Content Object Message TLVs Compression" toc="exclude">
          <figure anchor="fig.ccnx.data.msgdata"
                  title="Dispatch for Message TLVs">
            <artwork align="center"><![CDATA[
    0       1       2       3       4       5       6       7
+-------+-------+-------+-------+-------+-------+-------+-------+
|  PayloadType  |ExpTime|               Reserved                |
+-------+-------+-------+-------+-------+-------+-------+-------+
          ]]></artwork>
          </figure>

          <t><list hangIndent="4" style="hanging">
              <t
              hangText="PayloadType: Optional PayloadType TLV within a CCNx Message TLV"><list
                  hangIndent="8" style="hanging">
                  <t hangText="00:">The PayloadType TLV is absent and
                  T_PAYLOADTYPE_DATA is assumed.</t>

                  <t hangText="01:">The PayloadType TLV is absent and
                  T_PAYLOADTYPE_KEY is assumed.</t>

                  <t hangText="10:">The PayloadType TLV is absent and
                  T_PAYLOADTYPE_LINK is assumed.</t>

                  <t hangText="11:">The PayloadType TLV is present and
                  uncompressed.</t>
                </list></t>

              <t
              hangText="ExpTime: Optional ExpiryTime TLV within a CCNx Message TLV"><list
                  hangIndent="8" style="hanging">
                  <t hangText="0:">The ExpiryTime TLV is absent.</t>

                  <t hangText="1:">The ExpiryTime TLV is present and the type
                  as well as the length fields are elided.</t>
                </list></t>
            </list></t>
        </section>
      </section>
    </section>

    <section anchor="security.considerations" title="Security Considerations">
      <t>Main memory is typically a constrained resource of constrained
      networked devices. Fragmentation as described in this memo preserves
      fragments and purges them only after a packet is reassembled. This
      scheme is able to handle fragments for distinctive packets
      simultaneously, which can lead to overflowing packet buffers that cannot
      hold all necessary fragments for packet reassembly. Users are thus urged
      to make use of appropriate buffer replacement strategies for
      fragments.</t>

      <t>The stateful header compression generates ephemeral HopIDs for
      incoming and outgoing Interests and consumes them on returning Data
      packets. Forged Interests can deplete the number of available HopIDs,
      thus leading to a denial of compression service for subsequent content
      requests.</t>

      <t>To further alleviate the problems caused by forged fragments or
      Interest initiations, proper security mechanisms for accessing the
      link-layer may strengthen robustness in real deployments.</t>
    </section>

    <section anchor="iana" title="IANA Considerations">
      <section title="Page Switch Dispatch Type">
        <t>This document makes use of <spanx style="verb">Page 2</spanx> from
        the existing paging dispatches in <xref target="RFC8025"/>.</t>
      </section>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include="reference.RFC.4944"?>

      <?rfc include="reference.RFC.6282"?>

      <reference anchor="ieee802.15.4"
                 target="https://standards.ieee.org/findstds/standard/802.15.4-2015.html">
        <front>
          <title>IEEE Std. 802.15.4-2015</title>

          <author surname="IEEE Computer Society"/>

          <date month="April" year="2016"/>
        </front>
      </reference>
    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.7476"?>

      <?rfc include="reference.RFC.7927"?>

      <?rfc include="reference.RFC.7945"?>

      <?rfc include="reference.RFC.7228"?>

      <!--<?rfc include="reference.RFC.7400"?>-->

      <?rfc include="reference.RFC.8025"?>

      <?rfc include="reference.I-D.irtf-icnrg-ccnxmessages"?>

      <?rfc include="reference.I-D.irtf-icnrg-ccnxsemantics"?>

      <reference anchor="CCN-LITE" target="http://ccn-lite.net/">
        <front>
          <title>CCN-lite: A lightweight CCNx and NDN implementation</title>

          <author/>

          <date/>
        </front>
      </reference>

      <reference anchor="NDN-EXP1"
                 target="http://dx.doi.org/10.1145/10.1145/2660129.2660144">
        <front>
          <title>Information Centric Networking in the IoT: Experiments with
          NDN in the Wild</title>

          <author initials="E." surname="Baccelli">
            <organization>INRIA</organization>
          </author>

          <author initials="C." surname="Mehlis">
            <organization>FU Berlin</organization>
          </author>

          <author initials="O." surname="Hahm">
            <organization>INRIA</organization>
          </author>

          <author initials="TC." surname="Schmidt">
            <organization>HAW Hamburg</organization>
          </author>

          <author initials="M." surname="Waehlisch">
            <organization>FU Berlin</organization>
          </author>

          <date month="September" year="2014"/>
        </front>

        <seriesInfo name="Proc. of 1st ACM Conf. on Information-Centric Networking (ICN-2014)"
                    value="ACM DL, pp. 77-86"/>
      </reference>

      <reference anchor="NDN-EXP2" target="http://dx.doi.org/">
        <front>
          <title>NDN, CoAP, and MQTT: A Comparative Measurement Study in the
          IoT</title>

          <author initials="C." surname="Gundogan">
            <organization>HAW Hamburg</organization>
          </author>

          <author initials="P." surname="Kietzmann">
            <organization>HAW Hamburg</organization>
          </author>

          <author initials="M." surname="Lenders">
            <organization>FU Berlin</organization>
          </author>

          <author initials="H." surname="Petersen">
            <organization>FU Berlin</organization>
          </author>

          <author initials="TC." surname="Schmidt">
            <organization>HAW Hamburg</organization>
          </author>

          <author initials="M." surname="Waehlisch">
            <organization>FU Berlin</organization>
          </author>

          <date month="September" year="2018"/>
        </front>

        <seriesInfo name="Proc. of 5th ACM Conf. on Information-Centric Networking (ICN-2018)"
                    value="ACM DL, pp. "/>
      </reference>

      <reference anchor="NDN-MAC"
                 target="https://doi.org/10.1145/3125719.3125737">
        <front>
          <title>The Need for a Name to MAC Address Mapping in NDN: Towards
          Quantifying the Resource Gain</title>

          <author initials="P." surname="Kietzmann">
            <organization>HAW Hamburg</organization>
          </author>

          <author initials="C." surname="Gundogan">
            <organization>HAW Hamburg</organization>
          </author>

          <author initials="TC." surname="Schmidt">
            <organization>HAW Hamburg</organization>
          </author>

          <author initials="O." surname="Hahm">
            <organization>riot-os.org</organization>
          </author>

          <author initials="M." surname="Waehlisch">
            <organization>FU Berlin</organization>
          </author>

          <date month="September" year="2017"/>
        </front>

        <seriesInfo name="Proc. of 4th ACM Conf. on Information-Centric Networking (ICN-2017)"
                    value="ACM DL, pp. 36-42"/>
      </reference>

      <reference anchor="NDN" target="https://doi.org/10.1145/1658939.1658941">
        <front>
          <title>Networking Named Content</title>

          <author initials="V." surname="Jacobson"/>

          <author initials="D." surname="Smetters"/>

          <author initials="J." surname="Thornton"/>

          <author initials="M." surname="Plass"/>

          <date year="2009"/>
        </front>

        <seriesInfo name="5th Int. Conf. on emerging Networking Experiments and Technologies"
                    value="(ACM CoNEXT)"/>
      </reference>

      <reference anchor="NDN-PACKET-SPEC"
                 target="http://named-data.net/doc/NDN-packet-spec/0.3/">
        <front>
          <title>NDN Packet Format Specification</title>

          <author/>

          <date/>
        </front>
      </reference>

      <reference anchor="TLV-ENC-802.15.4"
                 target="https://datatracker.ietf.org/meeting/interim-2015-icnrg-01/materials/slides-interim-2015-icnrg-1-2">
        <front>
          <title>CCN and NDN TLV encodings in 802.15.4 packets</title>

          <author/>

          <date/>
        </front>
      </reference>

      <reference anchor="WIRE-FORMAT-CONSID"
                 target="https://datatracker.ietf.org/meeting/interim-2015-icnrg-01/materials/slides-interim-2015-icnrg-1-8">
        <front>
          <title>CCN/NDN Protocol Wire Format and Functionality
          Considerations</title>

          <author/>

          <date/>
        </front>
      </reference>
    </references>

    <section anchor="sec.EstimatedSizeReduction"
             title="Estimated Size Reduction">
      <t>In the following a theoretical evaluation is given to estimate the
      gains of ICN LoWPAN compared to uncompressed CCNx and NDN messages.</t>

      <t>We assume that <spanx style="verb">n</spanx> is the number of name
      components, <spanx style="verb">comps_n</spanx> denotes the sum of n
      name component lengths. We also assume that the length of each name
      component is lower than 16 bytes. The length of the content is given by
      <spanx style="verb">clen</spanx>. The lengths of TLV components is
      specific to the CCNx or NDN encoding and outlined below.</t>

      <section title="NDN">
        <t>The NDN TLV encoding has variable-sized TLV fields. For simplicity,
        the 1 octet form of each TLV component is assumed. A typical TLV
        component therefore is of size 2 (type field + length field) + the
        actual value.</t>

        <section title="Interest">
          <t><xref target="fig.Size.NDN.interest.uncompressed"/> depicts the
          size requirements for a basic, uncompressed NDN Interest containing
          a CanBePrefix TLV, a MustBeFresh TLV, a InterestLifetime TLV set to
          4 seconds and a HopLimit TLV set to 6. Numbers below represent the
          amount of octets.</t>

          <figure anchor="fig.Size.NDN.interest.uncompressed"
                  title="Estimated size of an uncompressed NDN Interest">
            <artwork align="center"><![CDATA[
------------------------------------,
Interest TLV            = 2         |
  ---------------------,            |
  Name                 |  2 +       |
    NameComponents      = 2n +      |
                       |  comps_n   |
  ---------------------'             = 21 + 2n + comps_n
  CanBePrefix           = 2         |
  MustBeFresh           = 2         |
  Nonce                 = 6         |
  InterestLifetime      = 4         |
  HopLimit              = 3         |
------------------------------------'
            ]]></artwork>
          </figure>

          <t><xref target="fig.Size.NDN.interest.compressed"/> depicts the
          size requirements after compression.</t>

          <figure anchor="fig.Size.NDN.interest.compressed"
                  title="Estimated size of a compressed NDN Interest">
            <artwork align="center"><![CDATA[
------------------------------------,
Dispatch Page Switch    = 1         |
NDN Interset Dispatch   = 1         |
Interest TLV            = 1         |
-----------------------,            |
Name                   |             = 9 + n/2 + comps_n
  NameComponents        = n/2 +     |
                       |  comps_n   |
-----------------------'            |
Nonce                   = 4         |
InterestLifetime        = 2         |
------------------------------------'
                        ]]></artwork>
          </figure>

          <t>The size difference is: <vspace/> 12 + 1.5n octets.</t>

          <t>For the name <spanx style="verb">/DE/HH/HAW/BT7</spanx>, the
          total size gain is 18 octets, which is 46% of the uncompressed
          packet.</t>
        </section>

        <section title="Data">
          <t><xref target="fig.Size.NDN.Data.uncompressed"/> depicts the size
          requirements for a basic, uncompressed NDN Data containing a
          FreshnessPeriod as MetaInfo. A FreshnessPeriod of 1 minute is
          assumed. The value is thereby encoded using 2 octets. An
          HMACWithSha256 is assumed as signature. The key locator is assumed
          to contain a Name TLV of length klen.</t>

          <figure anchor="fig.Size.NDN.Data.uncompressed"
                  title="Estimated size of an uncompressed NDN Data">
            <artwork align="center"><![CDATA[
------------------------------------,
Data TLV                = 2         |
  ---------------------,            |
  Name                 |  2 +       |
    NameComponents      = 2n +      |
                       |  comps_n   |
  ---------------------'            |
  ---------------------,            |
  MetaInfo             |            |
    FreshnessPeriod     = 6          = 53 + 2n + comps_n +
                       |            |  clen + klen
  ---------------------'            |
  Content               = 2 + clen  |
  ---------------------,            |
  SignatureInfo        |            |
    SignatureType      |            |
      KeyLocator        = 41 + klen |
  SignatureValue       |            |
    DigestSha256       |            |
  ---------------------'            |
------------------------------------'
                        ]]></artwork>
          </figure>

          <t><xref target="fig.Size.NDN.Data.compressed"/> depicts the size
          requirements for the compressed version of the above Data
          packet.</t>

          <figure anchor="fig.Size.NDN.Data.compressed"
                  title="Estimated size of a compressed NDN Data">
            <artwork align="center"><![CDATA[
------------------------------------,
Dispatch Page Switch    = 1         |
NDN Data Dispatch       = 1         |
-----------------------,            |
Name                   |             = 38 + n/2 + comps_n +
  NameComponents        = n/2 +     |  clen + klen
                       |  comps_n   |
-----------------------'            |
Content                 = 1 + clen  |
KeyLocator              = 1 + klen  |
DigestSha256            = 32        |
FreshnessPeriod         = 2         |
------------------------------------'
                        ]]></artwork>
          </figure>

          <t>The size difference is: <vspace/> 15 + 1.5n octets.</t>

          <t>For the name <spanx style="verb">/DE/HH/HAW/BT7</spanx>, the
          total size gain is 21 octets.</t>
        </section>
      </section>

      <section title="CCNx">
        <t>The CCNx TLV encoding defines a 2-octet encoding for type and
        length fields, summing up to 4 octets in total without a value.</t>

        <section title="Interest">
          <t><xref target="fig.Size.CCNx.interest.uncompressed"/> depicts the
          size requirements for a basic, uncompressed CCNx Interest. No
          Hop-By-Hop TLVs are included and the protocol version as well as the
          reserved field are assumed to be 0. A KeyIdRestriction TLV with
          T_SHA-256 is included to limit the responses to Content Objects
          containing the specific key.</t>

          <figure anchor="fig.Size.CCNx.interest.uncompressed"
                  title="Estimated size of an uncompressed CCNx Interest">
            <artwork align="center"><![CDATA[
------------------------------------,
Fixed Header            = 8         |
Message                 = 4         |
  ---------------------,            |
  Name                 |  4 +        = 56 + 4n + comps_n
    NameSegments        = 4n +      |
                       |  comps_n   |
  ---------------------'            |
  KeyIdRestriction      = 40        |
------------------------------------'
                        ]]></artwork>
          </figure>

          <t><xref target="fig.Size.CCNx.interest.compressed"/> depicts the
          size requirements after compression.</t>

          <figure anchor="fig.Size.CCNx.interest.compressed"
                  title="Estimated size of a compressed CCNx Interest">
            <artwork align="center"><![CDATA[
------------------------------------,
Dispatch Page Switch    = 1         |
CCNx Interest Dispatch  = 3         |
Fixed Header            = 3         |
-----------------------,            |
Name                   |             = 39 + n/2 + comps_n
  NameSegments          = n/2 +     |
                       |  comps_n   |
-----------------------'            |
T_SHA-256               = 32        |
------------------------------------'
                        ]]></artwork>
          </figure>

          <t>The size difference is: <vspace/> 17 + 3.5n octets.</t>

          <t>For the name <spanx style="verb">/DE/HH/HAW/BT7</spanx>, the
          total size gain is 31 octets, which is 38% of the uncompressed
          packet.</t>
        </section>

        <section title="Data">
          <t><xref target="fig.Size.CCNx.Data.uncompressed"/> depicts the size
          requirements for a basic, uncompressed CCNx Data containing an
          ExpiryTime Message TLV, an HMAC_SHA-256 signature, the signature
          time and a hash of the shared secret key.</t>

          <figure anchor="fig.Size.CCNx.Data.uncompressed"
                  title="Estimated size of an uncompressed CCNx Data Object">
            <artwork align="center"><![CDATA[
------------------------------------,
Fixed Header            = 8         |
Message                 = 4         |
  ---------------------,            |
  Name                 |  4 +       |
    NameSegments        = 4n +      |
                       |  comps_n   |
  ---------------------'            |
  ExpiryTime            = 12         = 124 + 4n + comps_n + clen
  Payload               = 4 + clen  |
  ---------------------,            |
  ValidationAlgorithm  |            |
    T_HMAC-256          = 56        |
      KeyId            |            |
    SignatureTime      |            |
  ---------------------'            |
  ValidationPayload     = 36        |
------------------------------------'
                        ]]></artwork>
          </figure>

          <t><xref target="fig.Size.CCNx.Data.compressed"/> depicts the size
          requirements for a basic, compressed CCNx Data.</t>

          <figure anchor="fig.Size.CCNx.Data.compressed"
                  title="Estimated size of a compressed CCNx Data Object">
            <artwork align="center"><![CDATA[
------------------------------------,
Dispatch Page Switch    = 1         |
CCNx Content Dispatch   = 4         |
Fixed Header            = 2         |
-----------------------,            |
Name                   |            |
  NameSegments          = n/2 +     |
                       |  comps_n    = 91 + n/2 + comps_n + clen
-----------------------'            |
ExpiryTime              = 8         |
Payload                 = 1 + clen  |
T_HMAC-SHA256           = 32        |
SignatureTime           = 8         |
ValidationPayload       = 34        |
------------------------------------'
                        ]]></artwork>
          </figure>

          <t>The size difference is: <vspace/> 33 + 3.5n octets.</t>

          <t>For the name <spanx style="verb">/DE/HH/HAW/BT7</spanx>, the
          total size gain is 47 octets.</t>
        </section>
      </section>
    </section>

    <section numbered="no" title="Acknowledgments">
      <t>This work was stimulated by fruitful discussions in the ICNRG
      research group and the communities of RIOT and CCNlite. We would like to
      thank all active members for constructive thoughts and feedback. In
      particular, the authors would like to thank (in alphabetical order)
      Peter Kietzmann, Dirk Kutscher, Martine Lenders, +++. The hop-wise
      stateful name compression was brought up in a discussion by Dave Oran,
      which is gratefully acknowledged. Larger parts of this work are inspired
      by <xref target="RFC4944"/> and <xref target="RFC6282"/>. Special
      mentioning goes to Mark Mosko as well as G.Q. Wang and Ravi Ravindran as
      their previous work in <xref target="TLV-ENC-802.15.4"/> and <xref
      target="WIRE-FORMAT-CONSID"/> provided a good base for our discussions
      on stateless header compression mechanisms. This work was supported in
      part by the German Federal Ministry of Research and Education within the
      projects I3 and RAPstore.</t>
    </section>
  </back>
</rfc>
