<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.21 (Ruby 3.0.2) -->
<?rfc comments="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-bonica-intarea-icmp-exten-hdr-len-02" category="std" consensus="true" updates="RFC 4884" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.24.0 -->
  <front>
    <title abbrev="icmp-eh-len">ICMP Extension Header Length Field</title>
    <seriesInfo name="Internet-Draft" value="draft-bonica-intarea-icmp-exten-hdr-len-02"/>
    <author initials="R." surname="Bonica" fullname="Ron Bonica">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <country>USA</country>
        </postal>
        <email>rbonica@juniper.net</email>
      </address>
    </author>
    <author initials="X." surname="He" fullname="Xiaoming He">
      <organization>China Telecom</organization>
      <address>
        <postal>
          <country>China</country>
        </postal>
        <email>hexm4@chinatelecom.cn</email>
      </address>
    </author>
    <author initials="X." surname="Min" fullname="Xiao Min">
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
          <country>China</country>
        </postal>
        <email>xiao.min2@zte.com.cn</email>
      </address>
    </author>
    <author initials="T." surname="Mizrahi" fullname="Tal Mizrahi">
      <organization>Huawei</organization>
      <address>
        <postal>
          <country>Israel</country>
        </postal>
        <email>tal.mizrahi.phd@gmail.com</email>
      </address>
    </author>
    <date year="2024" month="November" day="21"/>
    <area>Internet</area>
    <workgroup>INTAREA Group</workgroup>
    <keyword>ICMP</keyword>
    <abstract>
      <?line 47?>

<t>The ICMP Extension Structure does not have a length field. Therefore, unless the length of the Extension Structure can be inferred from other data in the ICMP message, the Extension Structure must be the last item in the ICMP message.</t>
      <t>This document defines a length field for the ICMP Extension Structure. When length information is provided, receivers can use it to parse ICMP messages. Specifically, receivers can use length information to determine the offset at which the item after the ICMP Extension Structure begins.</t>
    </abstract>
  </front>
  <middle>
    <?line 54?>

<section anchor="intro">
      <name>Introduction</name>
      <t>The ICMP Extension Structure <xref target="RFC4884"/> does not have a length field. Therefore, unless the length of the Extension Structure can be inferred from other data in the ICMP message, the Extension Structure must be the last item in the ICMP message.</t>
      <t>This document defines a length field for the ICMP Extension Structure. When length information is provided, receivers can use it to parse ICMP messages. Specifically, receivers can use length information to determine the offset at which the item after the ICMP Extension Structure begins.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="the-icmp-extension-structure">
      <name>The ICMP Extension Structure</name>
      <t><xref target="box-fig"/>  depicts the ICMP Extension Header.</t>
      <figure anchor="box-fig">
        <name>ICMP Extension Header</name>
        <artwork><![CDATA[
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |Version|  Rsvd |     Length    |           Checksum            |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <t>Version: 4 bits</t>
      <ul spacing="normal">
        <li>
          <t>Defined in <xref target="RFC4884"/></t>
        </li>
      </ul>
      <t>Reserved (Rsvd): 4 bits</t>
      <ul spacing="normal">
        <li>
          <t>Defined in <xref target="RFC4884"/></t>
        </li>
      </ul>
      <t>Length: 8 bits</t>
      <ul spacing="normal">
        <li>
          <t>This field represents the length of the ICMP Extension Structure, including all options and optional padding, but excluding the ICMP Extension Header. The length is measured in 4-byte words. Legacy implementations set this field to 0.</t>
        </li>
      </ul>
      <t>Checksum: 16 bits</t>
      <ul spacing="normal">
        <li>
          <t>Defined in <xref target="RFC4884"/></t>
        </li>
      </ul>
      <t>The ICMP Extension Structure <bcp14>MUST</bcp14> be zero-padded so that it ends on a 4-byte boundary.</t>
    </section>
    <section anchor="backwards-compatibility">
      <name>Backwards Compatibility</name>
      <t>Legacy implementations set the length field to 0. When the length field is set to 0, it conveys no information and cannot be used to parse the ICMP packet.</t>
      <t>In these cases, one of the following statements <bcp14>MUST</bcp14> be true:</t>
      <ul spacing="normal">
        <li>
          <t>The ICMP Extension Structure is the final item in the ICMP packet.</t>
        </li>
        <li>
          <t>The length of the ICMP Extension Structure can be inferred from other fields in the packet.</t>
        </li>
      </ul>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document requires no IANA actions.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>This document introduces no security vulnerabilities.</t>
    </section>
    <section anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>Thanks to Tom Herbert for his review and helpful suggestion.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-normative-references">
      <name>Normative References</name>
      <reference anchor="RFC4884">
        <front>
          <title>Extended ICMP to Support Multi-Part Messages</title>
          <author fullname="R. Bonica" initials="R." surname="Bonica"/>
          <author fullname="D. Gan" initials="D." surname="Gan"/>
          <author fullname="D. Tappan" initials="D." surname="Tappan"/>
          <author fullname="C. Pignataro" initials="C." surname="Pignataro"/>
          <date month="April" year="2007"/>
          <abstract>
            <t>This document redefines selected ICMP messages to support multi-part operation. A multi-part ICMP message carries all of the information that ICMP messages carried previously, as well as additional information that applications may require.</t>
            <t>Multi-part messages are supported by an ICMP extension structure. The extension structure is situated at the end of the ICMP message. It includes an extension header followed by one or more extension objects. Each extension object contains an object header and object payload. All object headers share a common format.</t>
            <t>This document further redefines the above mentioned ICMP messages by specifying a length attribute. All of the currently defined ICMP messages to which an extension structure can be appended include an "original datagram" field. The "original datagram" field contains the initial octets of the datagram that elicited the ICMP error message. Although the original datagram field is of variable length, the ICMP message does not include a field that specifies its length. Therefore, in order to facilitate message parsing, this document allocates eight previously reserved bits to reflect the length of the "original datagram" field.</t>
            <t>The proposed modifications change the requirements for ICMP compliance. The impact of these changes on compliant implementations is discussed, and new requirements for future implementations are presented.</t>
            <t>This memo updates RFC 792 and RFC 4443. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="4884"/>
        <seriesInfo name="DOI" value="10.17487/RFC4884"/>
      </reference>
      <reference anchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <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="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA+1XbXMbNRD+rl+xOF+g5Dxxatr0prRxnZSEyUuxHWjpdBj5
bu0TvpMOSWfHdfpf+C38MlaSXxM3gYFv4E4n0kr78uyudveiKGKJSoUcxlDZ
QXSw2pmIm0QIxqywOcZw2j5/A8fXFqURSsIJ8hQ1nKEc2gxeC8xTxvt9jeMY
RFKUEWZRjpKlKpG8IP5U84GN+kqKhEdCWq6R/vqbTmiUpdoxRHv7LOEWh0pP
YzA2ZVWZ0t7E0HndhubBQZMxY7lMf+G5kiR4ioaVIob3ViW7YJS2GgeGVtMi
LBJVFCit+cCYKHUMVlfG7u/tPSNVzgrCJi1qiZZNCPnpRa/VOW7Bd1pVJRtN
AnTGeGUzpWMGENF/ACGdTXV45SF5UkDaIfesEZUmod9XUpTkrwu0E6VHxp8k
qpLWwbzqtjwBCy7yGHTw0uGvganuLNvQ+rZO/l/T+FZwVVDYFlSvsp0JyaGH
OZIDNvX5o3WNGV4XzcPEkW1gqCfyjs5zIW8pXZK8xp97x9BWulSaW8qRB3Re
E3+drN4//Gixvk1lz6n8qHkm1tT2eL5B9ZpPKj5Bsanw1GiO+bpGy3NS6Fnr
ZZYeDh3ZaWb0i6IIeN9YzRPLWC/D2xnfpbxJbKURUoUGpLKQ8TEChzw8goF7
BHUgVso7pXEXKpmjMWBJ2PyOGvjdNqkJl9BHQj5ArTGFgVYFKLqtgR4ApwPP
6q0qSCwfkobPCSsoxZ00r5rTWlgstomoO6zCEKakcq8EUhwISfg2YQEBWvFu
0ViHnzKUCx4CoXThswBIeKnVWKSY7oLGBMUYtfFwK0N4LVgFJddm0zBTh26J
iRjQS8jz6TbWLcpIVIr0mCmvAng1GBi0wC1MMpFknuZ9QdUI74dE/htSHtbn
yVGINM2RsR1XLrRK6ZK7P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