SHA256
1
0

Compare commits

..

2 Commits

Author SHA256 Message Date
brent saner
d3ca61b7ce
reorder protonum to beginning of bcast section 2025-09-03 16:12:53 -04:00
brent saner
066c281ed8
mention ethernet frame padding 2025-09-03 10:50:05 -04:00
2 changed files with 35 additions and 26 deletions

View File

@ -342,6 +342,12 @@ E:T:: EtherType (`0x88b5` or `0x88b6`) _(2 Bytes)_
=== AnnNet Broadcast
AnnNet Broadcast operates on layer 3, making use of <<spec_bcast_v4>> (EtherType `0x0800`) and/or <<spec_bcast_v6>> (EtherType `0x86dd`).
[id="spec_bcast_protonum"]
==== Internet Protocol Number
AnnNet currently uses the __IPv4 protocol__/__IPv6 Next Header__ protocol number `253` (`0xfd`) by default, as AnnNet is still in experimental stages and this protocol is https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml[reserved for experimentation^] per IANA. (`254`, `0xfe`, is another viable option for your implementation as it too is reserved by IANA for experimentation.)
If AnnNet is allocated a dedicated IANA-registered Protocol/Next Header, it will be implemented in a new major version release.
[id="spec_bcast_v4"]
==== IPv4
If IPv4, the AnnNet Broadcast sender _may_ send to:
@ -440,18 +446,14 @@ IP:H:: Hop Limit _(1 Byte)_
IP:S:: Source IPv6 Address _(128 Bits/16 Bytes)_
IP:D:: Destination IPv6 Address _(128 Bits/16 Bytes)_
[id="spec_bcast_protonum"]
==== Internet Protocol Number
AnnNet currently uses the __IPv4 protocol__/__IPv6 Next Header__ protocol number `253` (`0xfd`) by default, as AnnNet is still in experimental stages and this protocol is https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml[reserved for experimentation^] per IANA. (`254`, `0xfe`, is another viable option for your implementation as it too is reserved by IANA for experimentation.)
If AnnNet is allocated a dedicated IANA-registered Protocol/Next Header, it will be implemented in a new major version release.
[id="limits"]
== Limitations
. AnnNet messages *must* fit into a single frame on the network it is being sent/received on. If message continuation or longer messages are wanted/desired, then it is up to the implementer to add a mechanism for this within their implementation's payload.
.. Likewise for checksumming; while most NICs will automatically handle the standard CRC32 https://en.wikipedia.org/wiki/Frame_check_sequence[Frame Check Sequence^] at the end of the entire frame (AnnNet Link is still Ethernet II), if you require checksumming within your application for *payloads* it must be accounted for by your application. If you are using hardware that doesn't automatically append/strip the FCS, your application must also account for that as well.
... Per https://standards.ieee.org/ieee/802.3/10422/[IEEE 802.3-2022^] (and previous revisions) and e.g. https://datatracker.ietf.org/doc/html/rfc894[RFC 894^], the *ethernet frame* (layer 2 packet) needs to be padded to 46 bytes if less than 46 bytes, but just like the FCS, *this is almost always handed directly in the NIC*. If you are using hardware that doesn't automatically append/strip the ethernet frame padding, your application must account for that also.
.. For AnnNet Broadcast over IPv4, ensure that you are including the 16-bit https://en.wikipedia.org/wiki/Internet_checksum["Internet checksum"^] of the header (see RFCs https://datatracker.ietf.org/doc/html/rfc1071[1071^], https://datatracker.ietf.org/doc/html/rfc1141[1141^], and https://datatracker.ietf.org/doc/html/rfc1624[1624^]). +
Most kernels can/will automatically insert this (e.g. on Linux, with `IPPROTO_RAW`/raw sockets with the `IP_HDRINCL` option, see https://man7.org/linux/man-pages/man7/raw.7.html[`raw(7)`^]), but if your implementation doesn't/can't use such a mechanism then you must do so yourself. +
IPv6 does not require a header checksum.

View File

@ -559,7 +559,7 @@ pre.rouge .gs {
<div class="details">
<span id="author" class="author">Brent Saner</span><br>
<span id="email" class="email"><a href="mailto:bts@square-r00t.net">bts@square-r00t.net</a></span><br>
<span id="revdate">Last rendered 2025-09-03 01:37:56 -0400</span>
<span id="revdate">Last rendered 2025-09-03 16:12:52 -0400</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
@ -596,17 +596,17 @@ pre.rouge .gs {
<li><a href="#spec_link">5.2. AnnNet Link</a></li>
<li><a href="#spec_bcast">5.3. AnnNet Broadcast</a>
<ul class="sectlevel3">
<li><a href="#spec_bcast_v4">5.3.1. IPv4</a>
<li><a href="#spec_bcast_protonum">5.3.1. Internet Protocol Number</a></li>
<li><a href="#spec_bcast_v4">5.3.2. IPv4</a>
<ul class="sectlevel4">
<li><a href="#spec_bcast_v4_msg">5.3.1.1. Message Format</a></li>
<li><a href="#spec_bcast_v4_msg">5.3.2.1. Message Format</a></li>
</ul>
</li>
<li><a href="#spec_bcast_v6">5.3.2. IPv6</a>
<li><a href="#spec_bcast_v6">5.3.3. IPv6</a>
<ul class="sectlevel4">
<li><a href="#spec_bcast_v6_msg">5.3.2.1. Message Format</a></li>
<li><a href="#spec_bcast_v6_msg">5.3.3.1. Message Format</a></li>
</ul>
</li>
<li><a href="#spec_bcast_protonum">5.3.3. Internet Protocol Number</a></li>
</ul>
</li>
</ul>
@ -1919,7 +1919,16 @@ Its source <em>must</em> be the MAC/PHYS address of the network interface it is
<p>AnnNet Broadcast operates on layer 3, making use of <a href="#spec_bcast_v4">IPv4</a> (EtherType <code>0x0800</code>) and/or <a href="#spec_bcast_v6">IPv6</a> (EtherType <code>0x86dd</code>).</p>
</div>
<div class="sect3">
<h4 id="spec_bcast_v4"><a class="link" href="#spec_bcast_v4">5.3.1. IPv4</a></h4>
<h4 id="spec_bcast_protonum"><a class="link" href="#spec_bcast_protonum">5.3.1. Internet Protocol Number</a></h4>
<div class="paragraph">
<p>AnnNet currently uses the <em>IPv4 protocol</em>/<em>IPv6 Next Header</em> protocol number <code>253</code> (<code>0xfd</code>) by default, as AnnNet is still in experimental stages and this protocol is <a href="https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml" target="_blank" rel="noopener">reserved for experimentation</a> per IANA. (<code>254</code>, <code>0xfe</code>, is another viable option for your implementation as it too is reserved by IANA for experimentation.)</p>
</div>
<div class="paragraph">
<p>If AnnNet is allocated a dedicated IANA-registered Protocol/Next Header, it will be implemented in a new major version release.</p>
</div>
</div>
<div class="sect3">
<h4 id="spec_bcast_v4"><a class="link" href="#spec_bcast_v4">5.3.2. IPv4</a></h4>
<div class="paragraph">
<p>If IPv4, the AnnNet Broadcast sender <em>may</em> send to:</p>
</div>
@ -1947,7 +1956,7 @@ Its source <em>must</em> be the MAC/PHYS address of the network interface it is
<p>If using any other address, the source address <strong>must</strong> be an address reachable by the network/host the message is being sent to.</p>
</div>
<div class="sect4">
<h5 id="spec_bcast_v4_msg"><a class="link" href="#spec_bcast_v4_msg">5.3.1.1. Message Format</a></h5>
<h5 id="spec_bcast_v4_msg"><a class="link" href="#spec_bcast_v4_msg">5.3.2.1. Message Format</a></h5>
<div class="paragraph">
<p>The <a href="#spec_msg">AnnNet Message</a> follows the Options value immediately:</p>
</div>
@ -2098,7 +2107,7 @@ Its source <em>must</em> be the MAC/PHYS address of the network interface it is
</div>
</div>
<div class="sect3">
<h4 id="spec_bcast_v6"><a class="link" href="#spec_bcast_v6">5.3.2. IPv6</a></h4>
<h4 id="spec_bcast_v6"><a class="link" href="#spec_bcast_v6">5.3.3. IPv6</a></h4>
<div class="paragraph">
<p>If IPv6, the AnnNet Broadcast sender <em>may</em> send to:</p>
</div>
@ -2151,7 +2160,7 @@ Its source <em>must</em> be the MAC/PHYS address of the network interface it is
<p>If using any other address, the source address <strong>must</strong> be an address reachable by the network/host the message is being sent to.</p>
</div>
<div class="sect4">
<h5 id="spec_bcast_v6_msg"><a class="link" href="#spec_bcast_v6_msg">5.3.2.1. Message Format</a></h5>
<h5 id="spec_bcast_v6_msg"><a class="link" href="#spec_bcast_v6_msg">5.3.3.1. Message Format</a></h5>
<div class="paragraph">
<p>The <a href="#spec_msg">AnnNet Message</a> follows the Destination Address value immediately:</p>
</div>
@ -2252,15 +2261,6 @@ Its source <em>must</em> be the MAC/PHYS address of the network interface it is
</div>
</div>
</div>
<div class="sect3">
<h4 id="spec_bcast_protonum"><a class="link" href="#spec_bcast_protonum">5.3.3. Internet Protocol Number</a></h4>
<div class="paragraph">
<p>AnnNet currently uses the <em>IPv4 protocol</em>/<em>IPv6 Next Header</em> protocol number <code>253</code> (<code>0xfd</code>) by default, as AnnNet is still in experimental stages and this protocol is <a href="https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml" target="_blank" rel="noopener">reserved for experimentation</a> per IANA. (<code>254</code>, <code>0xfe</code>, is another viable option for your implementation as it too is reserved by IANA for experimentation.)</p>
</div>
<div class="paragraph">
<p>If AnnNet is allocated a dedicated IANA-registered Protocol/Next Header, it will be implemented in a new major version release.</p>
</div>
</div>
</div>
</div>
</div>
@ -2275,6 +2275,13 @@ Its source <em>must</em> be the MAC/PHYS address of the network interface it is
<ol class="loweralpha" type="a">
<li>
<p>Likewise for checksumming; while most NICs will automatically handle the standard CRC32 <a href="https://en.wikipedia.org/wiki/Frame_check_sequence" target="_blank" rel="noopener">Frame Check Sequence</a> at the end of the entire frame (AnnNet Link is still Ethernet II), if you require checksumming within your application for <strong>payloads</strong> it must be accounted for by your application. If you are using hardware that doesn&#8217;t automatically append/strip the FCS, your application must also account for that as well.</p>
<div class="olist lowerroman">
<ol class="lowerroman" type="i">
<li>
<p>Per <a href="https://standards.ieee.org/ieee/802.3/10422/" target="_blank" rel="noopener">IEEE 802.3-2022</a> (and previous revisions) and e.g. <a href="https://datatracker.ietf.org/doc/html/rfc894" target="_blank" rel="noopener">RFC 894</a>, the <strong>ethernet frame</strong> (layer 2 packet) needs to be padded to 46 bytes if less than 46 bytes, but just like the FCS, <strong>this is almost always handed directly in the NIC</strong>. If you are using hardware that doesn&#8217;t automatically append/strip the ethernet frame padding, your application must account for that also.</p>
</li>
</ol>
</div>
</li>
<li>
<p>For AnnNet Broadcast over IPv4, ensure that you are including the 16-bit <a href="https://en.wikipedia.org/wiki/Internet_checksum" target="_blank" rel="noopener">"Internet checksum"</a> of the header (see RFCs <a href="https://datatracker.ietf.org/doc/html/rfc1071" target="_blank" rel="noopener">1071</a>, <a href="https://datatracker.ietf.org/doc/html/rfc1141" target="_blank" rel="noopener">1141</a>, and <a href="https://datatracker.ietf.org/doc/html/rfc1624" target="_blank" rel="noopener">1624</a>).<br>
@ -3163,7 +3170,7 @@ and the <a href="https://www.iana.org/assignments/ip-parameters/ip-parameters.xh
</div>
<div id="footer">
<div id="footer-text">
Last updated 2025-09-02 22:56:03 -0400
Last updated 2025-09-03 16:12:45 -0400
</div>
</div>
</body>