<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->
<!DOCTYPE rfc [
<!ENTITY nbsp "&#160;">
<!ENTITY zwsp "&#8203;">
<!ENTITY nbhy "&#8209;">
<!ENTITY wj "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="info" docName="draft-royer-bits-in-xdr-00" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" xml:lang="en" version="3">
  <front>
    <title abbrev="Abbreviated Title">Bits in XDR</title>
    <seriesInfo name="Internet-Draft" value="draft-royer-bits-in-xdr-00"/>
    <author fullname="Doug Royer" initials="DM" surname="Royer">
      <organization>RiverExplorer LLC</organization>
      <address>
        <postal>
          <!-- Reorder these if your country does things differently -->
          <street>848 N. Rainbow Blvd, Ste-1120</street>
          <city>Las Vegas</city>
          <region>Nevada</region>
          <code>89107</code>
          <country>US</country>
          <!-- Uses two letter country code -->
        </postal>
        <phone>+1-208-806-1358</phone>
        <email>DouglasRoyer@gmail.com</email>
        <!-- Can have more than one <email> element -->
        <uri>https://DougRoyer.US</uri>
      </address>
    </author>
    <date year="2025"/>
    <area>General</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>XDR</keyword>
    <keyword>bit</keyword>
    <abstract>
      <t>
				This is an extension to the XDR specification to allow
				for bits to be described and sent.
			</t>
      <t>
				With protocols that have a large number of boolean values
				the existing standard requires each to be individually
				packed into a 32-bit value.
			</t>
      <t>
				This addition does not alter any existing XDR data streams or
				effect existing implementations. 
			</t>
      <ul>
        <li>
					This specification describes how to pack a bit-boolean and
					short bit-width data values into the 32-bit XDR block chunks.
				</li>
        <li>
					And this specification describes how to describe them
					by extending "The XDR Language Specification" to include
					bits.
				</li>
        <li>
					And a new namespace declaration type is specified
					to aid in the reduction of name collisions in
					large projects.
				</li>
      </ul>
      <t>
				While in draft status, a new Open Source XDR generation tool
				is being developed <xref target="xdrgen"/>.
			</t>
    </abstract>
  </front>
  <middle>
    <section>
      <name>Introduction</name>
      <t>
				Definitions:
			</t>
      <ul>
        <li>
          <t>
						A value with 2 or more bits is called a bit-value.
					</t>
          <t>
						A bit-value value can be signed or unsigned.
						They often represent a set of possible conditions
						and not a numeric value and would be unsigned.
						And in other usages, the bits could represent a positive or
						negative value.
					</t>
        </li>
        <li>
					A single bit value is called a bit-boolean.
					A bit-boolean is a single bit representing
					a true or false value.
					A bit-boolean by itself has no sign.
					Up to 32 bit-boolean fit in a 32-bit XDR block.
				</li>
        <li>
					A scope is a way of extending a name of a item
					to uniquely identify it.
					As an example, file A variable 'a' and file B variable 'a'
					can be difficult to uniquely identify in code.
					By adding a 'namespace A' and a second 'namespace B',
					they can then be identified with 'A:a' and 'B:a'.
				</li>
      </ul>
      <t>
			</t>
      <t>
				All multi bit width values are placed into network byte
				order the same as their 32-bit or wider values
				as described in XDR <xref target="RFC4506"/>.
			</t>
    </section>
    <section>
      <name>The XDR Bit Language Specification</name>
      <t>
				With an large amount of bits and data packets
				it is easier to have name collisions between
				generated object.
				For this reason a new 'namespace' declaration'
				type is specified in <xref target="NamespaceSec"/>
			</t>
      <t>
				A new RFC-XDR type-specifier of 'bitobject'
				is added to the one shown
				in <xref target="RFC4506" section="6.3"/>.
				Resulting in 'type-specifier' becoming:
			</t>
      <figure anchor="NewTypeSpecifier">
        <name>Extended type-specifier ABNF</name>
        <artwork type="abnf" name="" align="left" alt=""><![CDATA[
type-specifier:
           [ "unsigned" ] "int"
         | [ "unsigned" ] "hyper"
         | "float"
         | "double"
         | "quadruple"
         | "bool"
         | enum-type-spec
         | struct-type-spec
         | union-type-spec
         | identifier
         | bitobject
]]></artwork>
      </figure>
      <t>
				 The properties of a bitobject are:
			 </t>
      <ul>
        <li>
          <t>A bitobject only consists of one or more of:</t>
          <ul>
            <li>A signed integer value: "sbits"</li>
            <li>An unsigned integer value: "ubits"</li>
            <li>A boolean "bit"</li>
          </ul>
        </li>
        <li>
					 Floating point numbers would be transmitted as
					 a float value as already described in <xref target="RFC4506"/>
					 as they have a sign, exponent and a mantissa.
					 No floating value is defined in a bitobject.
				 </li>
        <li>
					 Unused bits are set to zero (0).
				 </li>
        <li>
					 All bit widths that exceed 32-bits would be placed
					 into two or more bitobject values. With the ones
					 containing the most significant bits sent first
					 and the one with the least signification bits
					 sent last.
				 </li>
        <li>
					 A bitobject does not need to define 32-bits of data.
					 The undefined bits are at the most significant end
					 of the 32-bits object and and are set to zero.
				 </li>
        <li>
					 All <xref target="RFC4506"/> type-specifier objects
					 are at least 32-bits wide which means that "sbits",
					 "ubits", or "bit" can never occupy a 32-bit XDR block
					 with a  <xref target="RFC4506"/> type-specifier.
				 </li>
        <li>
					 A 32-bit wide "sbits" is the same as a
					 <xref target="RFC4506" section="4.1" sectionFormat="comma"/>
					 signed integer.
					 Except when they span 32-bit blocks.
					 See <xref target="WideBits"/>.
				 </li>
        <li>
					 A 32-bit wide "ubits" is the same as a
					 <xref target="RFC4506" section="4.2" sectionFormat="comma"/>
					 unsigned integer.
					 Except when they span 32-bit blocks.
					 See <xref target="WideBits"/>.
				 </li>
      </ul>
      <figure>
        <name>bitobject ABNF</name>
        <artwork type="abnf" name="" align="left" alt=""><![CDATA[
bitobject:
      "{"
         ( width-declaration ";" )
         ( width-declaration ";" )*
      "}"
				 
width-declaration:
      "bit"   identifier
      "sbits" identifier ":" %d
      "ubits" identifier ":" %d
]]></artwork>
      </figure>
      <t><xref target="bits1"/> is one example of a bitobject.
				 that is 32-bits wide.
			 </t>
      <figure anchor="bits1">
        <name>Multiple Bits Example</name>
        <artwork type="abnf" name="" align="left" alt=""><![CDATA[
bitobject AssemblyLineStatus
{
  bit   LightOn;
  ubits Status:3;
  ubits SwitchPosition:4;
  sbits Rotation:10;
  bit   Active;
  ubits UnitsPerMinute:8;
  ubits UnitID:5;
};
]]></artwork>
      </figure>
      <t>
				 Example <xref target="bits2"/> uses 11 bit-boolean
				 values and would be transmitted
				 in one 32-bit block.
			 </t>
      <figure anchor="bits2">
        <name>Flags Example</name>
        <artwork type="abnf" name="" align="left" alt=""><![CDATA[
bitobject EmailStatus
{
  bit Seen:1;
  bit Answered:1;
  bit Flagged:1
  bit Deleted:1
  bit Draft:1
  bit Recent:1
  bit Forwarded:1
  bit Ignored:1
  bit Watched:1
  bit Shared:1
  bit ReadOnly:1
};
]]></artwork>
      </figure>
      <t>
				 Example <xref target="bits3"/> contains two 42 bit-boolean
				 values and would be transmitted
				 in three 32-bit blocks.
			 </t>
      <figure anchor="bits3">
        <name>Wider than 32 bit example:</name>
        <artwork type="abnf" name="" align="left" alt=""><![CDATA[
bitobject Trajectory
{
  ubits Velocity:42;
  sbits VectorX:14;
  sbits VectorY:14;
  sbits VectorZ:14;
};
]]></artwork>
      </figure>
      <t>
				 In some cases, like in <xref target="bits1"/>
				 "AssemblyLineStatus" and in 
				 <xref target="bits3"/> "Trajectory",
				 the bits could represent the output of a hardware device
				 where the bits are defined by a manufacturer.
			 </t>
      <t>
				 And in other cases the bits could be logical software
				 flags that have a predefined bit-position in a bit stream
				 as exampled in <xref target="bits2"/>.
			 </t>
    </section>
    <section>
      <name>Packing Bits</name>
      <t>
				The bit-boolean and bit-value objects are processed
				from the top to the bottom as shown in their bitobject
				XDR language definition.
			</t>
      <t>
				The top most value would be packed into the least
				significant bits.
				The second from the top value would be placed
				next to it, and so on.
			</t>
      <t>
				bit-values are converted to network byte order
				and then bit packed.
			</t>
      <t>
				And a caution to the implementors for signed bit-value
				data.
				Many computer languages will convert a narrower bit value
				into a wider bit value and move the sign bit to the
				most significant position.
				So when preparing a signed bit-value, be sure to clamp the value
				and adjust the sign to the correct bit position before
				packing the bits.
				This would apply to "sbits" and not "ubits".
			</t>
      <section>
        <name>Packing bit-boolean</name>
        <t>
					This is how the XDR Language bitobject "EmailStatus" in
					<xref target="bits2"/> would be packed.
					"EmailStatus" is a bitobject that only
					contains bit-boolean values.
				</t>
        <figure>
          <name>How <xref target="bits2"/> would be packed.</name>
          <artset>
            <artwork type="ascii-art">
bit-object EmailStatus
{
  bit Seen; ----------------------------------------------------+
  bit Answered; ----------------------------------------------+ |
  bit Flagged; ---------------------------------------------+ | |
  bit Deleted; -------------------------------------------+ | | |
  bit Draft; -------------------------------------------+ | | | |
  bit Recent; ----------------------------------------+ | | | | |
  bit Forwarded; -----------------------------------+ | | | | | |
  bit Ignored; -----------------------------------+ | | | | | | |
  bit Watched; ---------------------------------+ | | | | | | | |
  bit Shared; --------------------------------+ | | | | | | | | |
  bit ReadOnly; ----------------------------+ | | | | | | | | | |
};                                          | | | | | | | | | | |
                                            | | | | | | | | | | |
                                            V V V V V V V V V V V
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0| | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 Most Significant Bits                      Least significant Bits
 unused bits in this example.
|                                                               |
 '---------------------------. .-------------------------------'
                              |
                         32-bits wide
						</artwork>
            <artwork type="svg">
              <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="416" width="536" viewBox="0 0 536 416" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                <path d="M 16,272 L 16,304" fill="none" stroke="black"/>
                <path d="M 32,272 L 32,304" fill="none" stroke="black"/>
                <path d="M 48,272 L 48,304" fill="none" stroke="black"/>
                <path d="M 64,272 L 64,304" fill="none" stroke="black"/>
                <path d="M 80,272 L 80,304" fill="none" stroke="black"/>
                <path d="M 96,272 L 96,304" fill="none" stroke="black"/>
                <path d="M 112,272 L 112,304" fill="none" stroke="black"/>
                <path d="M 128,272 L 128,304" fill="none" stroke="black"/>
                <path d="M 144,272 L 144,304" fill="none" stroke="black"/>
                <path d="M 160,272 L 160,304" fill="none" stroke="black"/>
                <path d="M 176,272 L 176,304" fill="none" stroke="black"/>
                <path d="M 192,272 L 192,304" fill="none" stroke="black"/>
                <path d="M 208,272 L 208,304" fill="none" stroke="black"/>
                <path d="M 224,272 L 224,304" fill="none" stroke="black"/>
                <path d="M 240,272 L 240,304" fill="none" stroke="black"/>
                <path d="M 256,272 L 256,304" fill="none" stroke="black"/>
                <path d="M 272,272 L 272,304" fill="none" stroke="black"/>
                <path d="M 288,272 L 288,304" fill="none" stroke="black"/>
                <path d="M 304,272 L 304,304" fill="none" stroke="black"/>
                <path d="M 320,272 L 320,304" fill="none" stroke="black"/>
                <path d="M 336,272 L 336,304" fill="none" stroke="black"/>
                <path d="M 352,272 L 352,304" fill="none" stroke="black"/>
                <path d="M 360,224 L 360,264" fill="none" stroke="black"/>
                <path d="M 368,272 L 368,304" fill="none" stroke="black"/>
                <path d="M 376,208 L 376,264" fill="none" stroke="black"/>
                <path d="M 384,272 L 384,304" fill="none" stroke="black"/>
                <path d="M 392,192 L 392,264" fill="none" stroke="black"/>
                <path d="M 400,272 L 400,304" fill="none" stroke="black"/>
                <path d="M 408,176 L 408,264" fill="none" stroke="black"/>
                <path d="M 416,272 L 416,304" fill="none" stroke="black"/>
                <path d="M 424,160 L 424,264" fill="none" stroke="black"/>
                <path d="M 432,272 L 432,304" fill="none" stroke="black"/>
                <path d="M 440,144 L 440,264" fill="none" stroke="black"/>
                <path d="M 448,272 L 448,304" fill="none" stroke="black"/>
                <path d="M 456,128 L 456,264" fill="none" stroke="black"/>
                <path d="M 464,272 L 464,304" fill="none" stroke="black"/>
                <path d="M 472,112 L 472,264" fill="none" stroke="black"/>
                <path d="M 480,272 L 480,304" fill="none" stroke="black"/>
                <path d="M 488,96 L 488,264" fill="none" stroke="black"/>
                <path d="M 496,272 L 496,304" fill="none" stroke="black"/>
                <path d="M 504,80 L 504,264" fill="none" stroke="black"/>
                <path d="M 512,272 L 512,304" fill="none" stroke="black"/>
                <path d="M 520,64 L 520,264" fill="none" stroke="black"/>
                <path d="M 528,272 L 528,304" fill="none" stroke="black"/>
                <path d="M 104,48 L 504,48" fill="none" stroke="black"/>
                <path d="M 136,64 L 488,64" fill="none" stroke="black"/>
                <path d="M 128,80 L 472,80" fill="none" stroke="black"/>
                <path d="M 128,96 L 456,96" fill="none" stroke="black"/>
                <path d="M 112,112 L 440,112" fill="none" stroke="black"/>
                <path d="M 120,128 L 424,128" fill="none" stroke="black"/>
                <path d="M 144,144 L 408,144" fill="none" stroke="black"/>
                <path d="M 128,160 L 392,160" fill="none" stroke="black"/>
                <path d="M 128,176 L 376,176" fill="none" stroke="black"/>
                <path d="M 120,192 L 360,192" fill="none" stroke="black"/>
                <path d="M 136,208 L 344,208" fill="none" stroke="black"/>
                <path d="M 16,272 L 528,272" fill="none" stroke="black"/>
                <path d="M 16,304 L 528,304" fill="none" stroke="black"/>
                <path d="M 24,368 L 232,368" fill="none" stroke="black"/>
                <path d="M 264,368 L 504,368" fill="none" stroke="black"/>
                <path d="M 504,48 C 512.83064,48 520,55.16936 520,64" fill="none" stroke="black"/>
                <path d="M 488,64 C 496.83064,64 504,71.16936 504,80" fill="none" stroke="black"/>
                <path d="M 472,80 C 480.83064,80 488,87.16936 488,96" fill="none" stroke="black"/>
                <path d="M 456,96 C 464.83064,96 472,103.16936 472,112" fill="none" stroke="black"/>
                <path d="M 440,112 C 448.83064,112 456,119.16936 456,128" fill="none" stroke="black"/>
                <path d="M 424,128 C 432.83064,128 440,135.16936 440,144" fill="none" stroke="black"/>
                <path d="M 408,144 C 416.83064,144 424,151.16936 424,160" fill="none" stroke="black"/>
                <path d="M 392,160 C 400.83064,160 408,167.16936 408,176" fill="none" stroke="black"/>
                <path d="M 376,176 C 384.83064,176 392,183.16936 392,192" fill="none" stroke="black"/>
                <path d="M 360,192 C 368.83064,192 376,199.16936 376,208" fill="none" stroke="black"/>
                <path d="M 344,208 C 352.83064,208 360,215.16936 360,224" fill="none" stroke="black"/>
                <path d="M 24,368 C 15.16936,368 8,360.83064 8,352" fill="none" stroke="black"/>
                <path d="M 232,368 C 240.83064,368 248,375.16936 248,384" fill="none" stroke="black"/>
                <path d="M 264,368 C 255.16936,368 248,375.16936 248,384" fill="none" stroke="black"/>
                <path d="M 504,368 C 512.83064,368 520,360.83064 520,352" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="528,264 516,258.4 516,269.6" fill="black" transform="rotate(90,520,264)"/>
                <polygon class="arrowhead" points="512,264 500,258.4 500,269.6" fill="black" transform="rotate(90,504,264)"/>
                <polygon class="arrowhead" points="496,264 484,258.4 484,269.6" fill="black" transform="rotate(90,488,264)"/>
                <polygon class="arrowhead" points="480,264 468,258.4 468,269.6" fill="black" transform="rotate(90,472,264)"/>
                <polygon class="arrowhead" points="464,264 452,258.4 452,269.6" fill="black" transform="rotate(90,456,264)"/>
                <polygon class="arrowhead" points="448,264 436,258.4 436,269.6" fill="black" transform="rotate(90,440,264)"/>
                <polygon class="arrowhead" points="432,264 420,258.4 420,269.6" fill="black" transform="rotate(90,424,264)"/>
                <polygon class="arrowhead" points="416,264 404,258.4 404,269.6" fill="black" transform="rotate(90,408,264)"/>
                <polygon class="arrowhead" points="400,264 388,258.4 388,269.6" fill="black" transform="rotate(90,392,264)"/>
                <polygon class="arrowhead" points="384,264 372,258.4 372,269.6" fill="black" transform="rotate(90,376,264)"/>
                <polygon class="arrowhead" points="368,264 356,258.4 356,269.6" fill="black" transform="rotate(90,360,264)"/>
                <g class="text">
                  <text x="92" y="20">bit-object EmailStatus</text>
                  <text x="8" y="36">{</text>
                  <text x="56" y="52">bit Seen;</text>
                  <text x="72" y="68">bit Answered;</text>
                  <text x="68" y="84">bit Flagged;</text>
                  <text x="68" y="100">bit Deleted;</text>
                  <text x="60" y="116">bit Draft;</text>
                  <text x="64" y="132">bit Recent;</text>
                  <text x="76" y="148">bit Forwarded;</text>
                  <text x="68" y="164">bit Ignored;</text>
                  <text x="68" y="180">bit Watched;</text>
                  <text x="64" y="196">bit Shared;</text>
                  <text x="72" y="212">bit ReadOnly;</text>
                  <text x="12" y="228">};</text>
                  <text x="24" y="292">0</text>
                  <text x="40" y="292">0</text>
                  <text x="56" y="292">0</text>
                  <text x="72" y="292">0</text>
                  <text x="88" y="292">0</text>
                  <text x="104" y="292">0</text>
                  <text x="120" y="292">0</text>
                  <text x="136" y="292">0</text>
                  <text x="152" y="292">0</text>
                  <text x="168" y="292">0</text>
                  <text x="184" y="292">0</text>
                  <text x="200" y="292">0</text>
                  <text x="216" y="292">0</text>
                  <text x="232" y="292">0</text>
                  <text x="248" y="292">0</text>
                  <text x="264" y="292">0</text>
                  <text x="280" y="292">0</text>
                  <text x="296" y="292">0</text>
                  <text x="312" y="292">0</text>
                  <text x="328" y="292">0</text>
                  <text x="344" y="292">0</text>
                  <text x="96" y="324">Most Significant Bits</text>
                  <text x="444" y="324">Least significant Bits</text>
                  <text x="124" y="340">unused bits in this example.</text>
                  <text x="252" y="404">32-bits wide</text>
                </g>
              </svg>
            </artwork>
          </artset>
        </figure>
      </section>
      <section>
        <name>Packing bit-values</name>
        <t>
					This example has both bit-boolean and bit-value data
					being packed together.
				</t>
        <t>
					Here is how the XDR Language bitobject "AssemblyLineStatus"
					shown in <xref target="bits1"/> would be packed:
				</t>
        <figure>
          <name>How <xref target="bits1"/> would be packed.</name>
          <artset>
            <artwork type="ascii-art">
bit-object AssemblyLineStatus
{
  bit   LightOn; ----------------------------------------------.
  ubits Status:3; -----------------------------------------.    |
  ubits SwitchPosition:4; --------------------------.       |   |
  sbits Rotation:10; ------------------.             |      |   |
  bit   Active; ----------------.       |            |      |   |
  ubits UnitsPerMinute:8; ---.   |      |            |      |   |
  ubits UnitID:5; ---.        |  |      |            |      |   |
};                    |      /   |      |            |      |   |
                      |     /    |      |            |      |   |
       .-------------'     /     |      |            |      |   |
      |                   |      |      |            |      |   |
      |              .---'   .--'       |            |      |   |
      |             |       |           |            |      |   |
   .--+--.   .------+----.  |  .--------+------.   .-+-.   .+.  |
  |       | |             | | |                 | |     | |   | |
  v       v v             v v v                 v v     v v   v v
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 Most Significant Bits                      Least significant Bits

|                                                               |
 '---------------------------. .-------------------------------'
                              |
                         32-bits wide
						</artwork>
            <artwork type="svg">
              <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="448" width="536" viewBox="0 0 536 448" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                <path d="M 16,304 L 16,336" fill="none" stroke="black"/>
                <path d="M 24,272 L 24,296" fill="none" stroke="black"/>
                <path d="M 32,304 L 32,336" fill="none" stroke="black"/>
                <path d="M 48,304 L 48,336" fill="none" stroke="black"/>
                <path d="M 56,208 L 56,256" fill="none" stroke="black"/>
                <path d="M 64,304 L 64,336" fill="none" stroke="black"/>
                <path d="M 80,304 L 80,336" fill="none" stroke="black"/>
                <path d="M 88,272 L 88,296" fill="none" stroke="black"/>
                <path d="M 96,304 L 96,336" fill="none" stroke="black"/>
                <path d="M 104,272 L 104,296" fill="none" stroke="black"/>
                <path d="M 112,304 L 112,336" fill="none" stroke="black"/>
                <path d="M 128,304 L 128,336" fill="none" stroke="black"/>
                <path d="M 144,304 L 144,336" fill="none" stroke="black"/>
                <path d="M 160,304 L 160,336" fill="none" stroke="black"/>
                <path d="M 168,240 L 168,256" fill="none" stroke="black"/>
                <path d="M 176,304 L 176,336" fill="none" stroke="black"/>
                <path d="M 184,160 L 184,176" fill="none" stroke="black"/>
                <path d="M 192,304 L 192,336" fill="none" stroke="black"/>
                <path d="M 208,304 L 208,336" fill="none" stroke="black"/>
                <path d="M 216,272 L 216,296" fill="none" stroke="black"/>
                <path d="M 224,304 L 224,336" fill="none" stroke="black"/>
                <path d="M 232,240 L 232,296" fill="none" stroke="black"/>
                <path d="M 240,304 L 240,336" fill="none" stroke="black"/>
                <path d="M 248,272 L 248,296" fill="none" stroke="black"/>
                <path d="M 256,304 L 256,336" fill="none" stroke="black"/>
                <path d="M 272,128 L 272,208" fill="none" stroke="black"/>
                <path d="M 272,304 L 272,336" fill="none" stroke="black"/>
                <path d="M 288,304 L 288,336" fill="none" stroke="black"/>
                <path d="M 304,304 L 304,336" fill="none" stroke="black"/>
                <path d="M 320,304 L 320,336" fill="none" stroke="black"/>
                <path d="M 328,112 L 328,256" fill="none" stroke="black"/>
                <path d="M 336,304 L 336,336" fill="none" stroke="black"/>
                <path d="M 352,304 L 352,336" fill="none" stroke="black"/>
                <path d="M 368,304 L 368,336" fill="none" stroke="black"/>
                <path d="M 384,304 L 384,336" fill="none" stroke="black"/>
                <path d="M 392,272 L 392,296" fill="none" stroke="black"/>
                <path d="M 400,304 L 400,336" fill="none" stroke="black"/>
                <path d="M 408,272 L 408,296" fill="none" stroke="black"/>
                <path d="M 416,304 L 416,336" fill="none" stroke="black"/>
                <path d="M 432,96 L 432,256" fill="none" stroke="black"/>
                <path d="M 432,304 L 432,336" fill="none" stroke="black"/>
                <path d="M 448,304 L 448,336" fill="none" stroke="black"/>
                <path d="M 456,272 L 456,296" fill="none" stroke="black"/>
                <path d="M 464,304 L 464,336" fill="none" stroke="black"/>
                <path d="M 472,272 L 472,296" fill="none" stroke="black"/>
                <path d="M 480,304 L 480,336" fill="none" stroke="black"/>
                <path d="M 488,80 L 488,256" fill="none" stroke="black"/>
                <path d="M 496,304 L 496,336" fill="none" stroke="black"/>
                <path d="M 504,272 L 504,296" fill="none" stroke="black"/>
                <path d="M 512,304 L 512,336" fill="none" stroke="black"/>
                <path d="M 520,64 L 520,296" fill="none" stroke="black"/>
                <path d="M 528,304 L 528,336" fill="none" stroke="black"/>
                <path d="M 144,48 L 504,48" fill="none" stroke="black"/>
                <path d="M 152,64 L 472,64" fill="none" stroke="black"/>
                <path d="M 216,80 L 416,80" fill="none" stroke="black"/>
                <path d="M 176,96 L 312,96" fill="none" stroke="black"/>
                <path d="M 136,112 L 256,112" fill="none" stroke="black"/>
                <path d="M 216,128 L 232,128" fill="none" stroke="black"/>
                <path d="M 152,144 L 168,144" fill="none" stroke="black"/>
                <path d="M 72,192 L 168,192" fill="none" stroke="black"/>
                <path d="M 184,224 L 200,224" fill="none" stroke="black"/>
                <path d="M 248,224 L 256,224" fill="none" stroke="black"/>
                <path d="M 40,256 L 72,256" fill="none" stroke="black"/>
                <path d="M 120,256 L 200,256" fill="none" stroke="black"/>
                <path d="M 264,256 L 376,256" fill="none" stroke="black"/>
                <path d="M 424,256 L 440,256" fill="none" stroke="black"/>
                <path d="M 16,304 L 528,304" fill="none" stroke="black"/>
                <path d="M 16,336 L 528,336" fill="none" stroke="black"/>
                <path d="M 24,400 L 232,400" fill="none" stroke="black"/>
                <path d="M 264,400 L 504,400" fill="none" stroke="black"/>
                <path d="M 216,208 L 248,144" fill="none" stroke="black"/>
                <path d="M 504,48 C 512.83064,48 520,55.16936 520,64" fill="none" stroke="black"/>
                <path d="M 472,64 C 480.83064,64 488,71.16936 488,80" fill="none" stroke="black"/>
                <path d="M 416,80 C 424.83064,80 432,87.16936 432,96" fill="none" stroke="black"/>
                <path d="M 312,96 C 320.83064,96 328,103.16936 328,112" fill="none" stroke="black"/>
                <path d="M 256,112 C 264.83064,112 272,119.16936 272,128" fill="none" stroke="black"/>
                <path d="M 232,128 C 240.83064,128 248,135.16936 248,144" fill="none" stroke="black"/>
                <path d="M 168,144 C 176.83064,144 184,151.16936 184,160" fill="none" stroke="black"/>
                <path d="M 72,192 C 63.16936,192 56,199.16936 56,208" fill="none" stroke="black"/>
                <path d="M 168,192 C 176.83064,192 184,184.83064 184,176" fill="none" stroke="black"/>
                <path d="M 184,224 C 175.16936,224 168,231.16936 168,240" fill="none" stroke="black"/>
                <path d="M 200,224 C 208.83064,224 216,216.83064 216,208" fill="none" stroke="black"/>
                <path d="M 248,224 C 239.16936,224 232,231.16936 232,240" fill="none" stroke="black"/>
                <path d="M 256,224 C 264.83064,224 272,216.83064 272,208" fill="none" stroke="black"/>
                <path d="M 40,256 C 31.16936,256 24,263.16936 24,272" fill="none" stroke="black"/>
                <path d="M 72,256 C 80.83064,256 88,263.16936 88,272" fill="none" stroke="black"/>
                <path d="M 120,256 C 111.16936,256 104,263.16936 104,272" fill="none" stroke="black"/>
                <path d="M 200,256 C 208.83064,256 216,263.16936 216,272" fill="none" stroke="black"/>
                <path d="M 264,256 C 255.16936,256 248,263.16936 248,272" fill="none" stroke="black"/>
                <path d="M 376,256 C 384.83064,256 392,263.16936 392,272" fill="none" stroke="black"/>
                <path d="M 424,256 C 415.16936,256 408,263.16936 408,272" fill="none" stroke="black"/>
                <path d="M 440,256 C 448.83064,256 456,263.16936 456,272" fill="none" stroke="black"/>
                <path d="M 488,256 C 479.16936,256 472,263.16936 472,272" fill="none" stroke="black"/>
                <path d="M 488,256 C 496.83064,256 504,263.16936 504,272" fill="none" stroke="black"/>
                <path d="M 24,400 C 15.16936,400 8,392.83064 8,384" fill="none" stroke="black"/>
                <path d="M 232,400 C 240.83064,400 248,407.16936 248,416" fill="none" stroke="black"/>
                <path d="M 264,400 C 255.16936,400 248,407.16936 248,416" fill="none" stroke="black"/>
                <path d="M 504,400 C 512.83064,400 520,392.83064 520,384" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="528,296 516,290.4 516,301.6" fill="black" transform="rotate(90,520,296)"/>
                <polygon class="arrowhead" points="512,296 500,290.4 500,301.6" fill="black" transform="rotate(90,504,296)"/>
                <polygon class="arrowhead" points="480,296 468,290.4 468,301.6" fill="black" transform="rotate(90,472,296)"/>
                <polygon class="arrowhead" points="464,296 452,290.4 452,301.6" fill="black" transform="rotate(90,456,296)"/>
                <polygon class="arrowhead" points="416,296 404,290.4 404,301.6" fill="black" transform="rotate(90,408,296)"/>
                <polygon class="arrowhead" points="400,296 388,290.4 388,301.6" fill="black" transform="rotate(90,392,296)"/>
                <polygon class="arrowhead" points="256,296 244,290.4 244,301.6" fill="black" transform="rotate(90,248,296)"/>
                <polygon class="arrowhead" points="240,296 228,290.4 228,301.6" fill="black" transform="rotate(90,232,296)"/>
                <polygon class="arrowhead" points="224,296 212,290.4 212,301.6" fill="black" transform="rotate(90,216,296)"/>
                <polygon class="arrowhead" points="112,296 100,290.4 100,301.6" fill="black" transform="rotate(90,104,296)"/>
                <polygon class="arrowhead" points="96,296 84,290.4 84,301.6" fill="black" transform="rotate(90,88,296)"/>
                <polygon class="arrowhead" points="32,296 20,290.4 20,301.6" fill="black" transform="rotate(90,24,296)"/>
                <g class="text">
                  <text x="120" y="20">bit-object AssemblyLineStatus</text>
                  <text x="8" y="36">{</text>
                  <text x="32" y="52">bit</text>
                  <text x="100" y="52">LightOn;</text>
                  <text x="80" y="68">ubits Status:3;</text>
                  <text x="112" y="84">ubits SwitchPosition:4;</text>
                  <text x="92" y="100">sbits Rotation:10;</text>
                  <text x="32" y="116">bit</text>
                  <text x="96" y="116">Active;</text>
                  <text x="112" y="132">ubits UnitsPerMinute:8;</text>
                  <text x="80" y="148">ubits UnitID:5;</text>
                  <text x="12" y="164">};</text>
                  <text x="96" y="356">Most Significant Bits</text>
                  <text x="444" y="356">Least significant Bits</text>
                  <text x="252" y="436">32-bits wide</text>
                </g>
              </svg>
            </artwork>
          </artset>
        </figure>
        <section anchor="WideBits">
          <name>Packing wider than 32-bit-values or spanning blocks</name>
          <t>
						This shows how to pack values that are wider
						than 32-bits.
					</t>
          <t>
						The values would be converted to network byte order like
						with 
						<xref target="RFC4506" section="4.5" sectionFormat="comma"/>
						Hyper Integer and Unsigned Hyper Integer values.
						With their values clamped to the width defined
						and sbits values having their sign at their own
						most significant bit position.
					</t>
          <t>
						Here is how the XDR Language bitobject "Trajectory"
						shown in <xref target="bits3"/> would be packed into
						three 32-bit XDR blocks:
					</t>
          <figure anchor="bits3-again">
            <name>Trajectory - shown again</name>
            <artset>
              <artwork type="ascii-art">
bit-object Trajectory
{
  ubits Velocity:42;
  sbits VectorX:14;
  sbits VectorY:14;
  sbits VectorZ:14;
};
							</artwork>
              <artwork type="svg">
                <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="128" width="176" viewBox="0 0 176 128" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                  <g class="text">
                    <text x="88" y="20">bit-object Trajectory</text>
                    <text x="8" y="36">{</text>
                    <text x="92" y="52">ubits Velocity:42;</text>
                    <text x="88" y="68">sbits VectorX:14;</text>
                    <text x="88" y="84">sbits VectorY:14;</text>
                    <text x="88" y="100">sbits VectorZ:14;</text>
                    <text x="12" y="116">};</text>
                  </g>
                </svg>
              </artwork>
            </artset>
          </figure>
          <section>
            <name>Most significant 32-bit block of
							<xref target="bits3-again"/> "Trajectory"
							</name>
            <ul>
              <li>11 unused bits set to zero (0).</li>
              <li>14-bit "VectorZ:14"</li>
              <li>The most significant 7 bits of 14-bit "VectorY:14"</li>
            </ul>
            <figure anchor="bit3-a">
              <name>
								How <xref target="bits3-again"/> "Trajectory" most
								signification 32-bit block would be packed.
							</name>
              <artset>
                <artwork type="ascii-art">
                                                 Most significant
                                                     7-bits of
                            14-bit VectorZ:14        VectorY:14
                                   |                     |
                       .----------' '------------. .----' '---.
                      |                           |            |
											
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0|0|0|0|0|0|0|0|0|0| | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Most significant of 32-bits        Least signification of 32-bits
|                                                               |
 '---------------------------. .-------------------------------'
                              |
                         32-bits wide
                Most significant 32-bit block
                -----------------------------

								</artwork>
                <artwork type="svg">
                  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="304" width="528" viewBox="0 0 528 304" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                    <path d="M 8,128 L 8,160" fill="none" stroke="black"/>
                    <path d="M 24,128 L 24,160" fill="none" stroke="black"/>
                    <path d="M 40,128 L 40,160" fill="none" stroke="black"/>
                    <path d="M 56,128 L 56,160" fill="none" stroke="black"/>
                    <path d="M 72,128 L 72,160" fill="none" stroke="black"/>
                    <path d="M 88,128 L 88,160" fill="none" stroke="black"/>
                    <path d="M 104,128 L 104,160" fill="none" stroke="black"/>
                    <path d="M 120,128 L 120,160" fill="none" stroke="black"/>
                    <path d="M 136,128 L 136,160" fill="none" stroke="black"/>
                    <path d="M 152,128 L 152,160" fill="none" stroke="black"/>
                    <path d="M 168,128 L 168,160" fill="none" stroke="black"/>
                    <path d="M 184,128 L 184,160" fill="none" stroke="black"/>
                    <path d="M 200,128 L 200,160" fill="none" stroke="black"/>
                    <path d="M 216,128 L 216,160" fill="none" stroke="black"/>
                    <path d="M 232,128 L 232,160" fill="none" stroke="black"/>
                    <path d="M 248,128 L 248,160" fill="none" stroke="black"/>
                    <path d="M 264,128 L 264,160" fill="none" stroke="black"/>
                    <path d="M 280,128 L 280,160" fill="none" stroke="black"/>
                    <path d="M 296,128 L 296,160" fill="none" stroke="black"/>
                    <path d="M 312,128 L 312,160" fill="none" stroke="black"/>
                    <path d="M 328,128 L 328,160" fill="none" stroke="black"/>
                    <path d="M 344,128 L 344,160" fill="none" stroke="black"/>
                    <path d="M 360,128 L 360,160" fill="none" stroke="black"/>
                    <path d="M 376,128 L 376,160" fill="none" stroke="black"/>
                    <path d="M 392,128 L 392,160" fill="none" stroke="black"/>
                    <path d="M 408,128 L 408,160" fill="none" stroke="black"/>
                    <path d="M 424,128 L 424,160" fill="none" stroke="black"/>
                    <path d="M 440,128 L 440,160" fill="none" stroke="black"/>
                    <path d="M 456,128 L 456,160" fill="none" stroke="black"/>
                    <path d="M 472,128 L 472,160" fill="none" stroke="black"/>
                    <path d="M 488,128 L 488,160" fill="none" stroke="black"/>
                    <path d="M 504,128 L 504,160" fill="none" stroke="black"/>
                    <path d="M 520,128 L 520,160" fill="none" stroke="black"/>
                    <path d="M 200,80 L 272,80" fill="none" stroke="black"/>
                    <path d="M 304,80 L 392,80" fill="none" stroke="black"/>
                    <path d="M 424,80 L 448,80" fill="none" stroke="black"/>
                    <path d="M 480,80 L 496,80" fill="none" stroke="black"/>
                    <path d="M 8,128 L 520,128" fill="none" stroke="black"/>
                    <path d="M 8,160 L 520,160" fill="none" stroke="black"/>
                    <path d="M 24,208 L 232,208" fill="none" stroke="black"/>
                    <path d="M 264,208 L 504,208" fill="none" stroke="black"/>
                    <path d="M 136,272 L 360,272" fill="none" stroke="black"/>
                    <path d="M 200,80 C 191.16936,80 184,87.16936 184,96" fill="none" stroke="black"/>
                    <path d="M 272,80 C 280.83064,80 288,72.83064 288,64" fill="none" stroke="black"/>
                    <path d="M 304,80 C 295.16936,80 288,72.83064 288,64" fill="none" stroke="black"/>
                    <path d="M 392,80 C 400.83064,80 408,87.16936 408,96" fill="none" stroke="black"/>
                    <path d="M 424,80 C 415.16936,80 408,87.16936 408,96" fill="none" stroke="black"/>
                    <path d="M 448,80 C 456.83064,80 464,72.83064 464,64" fill="none" stroke="black"/>
                    <path d="M 480,80 C 471.16936,80 464,72.83064 464,64" fill="none" stroke="black"/>
                    <path d="M 496,80 C 504.83064,80 512,87.16936 512,96" fill="none" stroke="black"/>
                    <path d="M 24,208 C 15.16936,208 8,200.83064 8,192" fill="none" stroke="black"/>
                    <path d="M 232,208 C 240.83064,208 248,215.16936 248,224" fill="none" stroke="black"/>
                    <path d="M 264,208 C 255.16936,208 248,215.16936 248,224" fill="none" stroke="black"/>
                    <path d="M 504,208 C 512.83064,208 520,200.83064 520,192" fill="none" stroke="black"/>
                    <g class="text">
                      <text x="460" y="20">Most significant</text>
                      <text x="464" y="36">7-bits of</text>
                      <text x="296" y="52">14-bit VectorZ:14</text>
                      <text x="468" y="52">VectorY:14</text>
                      <text x="48" y="116">											</text>
                      <text x="16" y="148">0</text>
                      <text x="32" y="148">0</text>
                      <text x="48" y="148">0</text>
                      <text x="64" y="148">0</text>
                      <text x="80" y="148">0</text>
                      <text x="96" y="148">0</text>
                      <text x="112" y="148">0</text>
                      <text x="128" y="148">0</text>
                      <text x="144" y="148">0</text>
                      <text x="160" y="148">0</text>
                      <text x="176" y="148">0</text>
                      <text x="112" y="180">Most significant of 32-bits</text>
                      <text x="404" y="180">Least signification of 32-bits</text>
                      <text x="252" y="244">32-bits wide</text>
                      <text x="248" y="260">Most significant 32-bit block</text>
                    </g>
                  </svg>
                </artwork>
              </artset>
            </figure>
          </section>
          <section>
            <name>
							How <xref target="bits3-again"/> "Trajectory" middle
							signification 32-bit block would be packed.
						</name>
            <t>
							The middle signification 32-bit block of "Trajectory" would
							have:
						</t>
            <ul>
              <li>The least significant 7 bits of 14-bit "VectorY:14.</li>
              <li>14-bit "VectorX:14"</li>
              <li>The most significant 10 bits of 42-bit "Velocity:42"</li>
            </ul>
            <figure anchor="bits3-b">
              <name>
								How <xref target="bits3-again"/> "Trajectory" middle
								signification 32-bit block would be packed.
							</name>
              <artset>
                <artwork type="ascii-art">
  Least significant                            Most significant
    7-bits of                                    10-bits of
   VectorY:14          14-bit VectorX:14         Velocity:42
       |                      |                       |
 .----' '------. .-----------' '-----------. .-------' '-------.
|               |                           |                   |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Most significant of 32-bits        Least signification of 32-bits
|                                                               |
 '---------------------------. .-------------------------------'
                              |
                         32-bits wide
              Middle significant 32-bit block
              -------------------------------
								</artwork>
                <artwork type="svg">
                  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="288" width="528" viewBox="0 0 528 288" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                    <path d="M 8,128 L 8,160" fill="none" stroke="black"/>
                    <path d="M 24,128 L 24,160" fill="none" stroke="black"/>
                    <path d="M 40,128 L 40,160" fill="none" stroke="black"/>
                    <path d="M 56,128 L 56,160" fill="none" stroke="black"/>
                    <path d="M 72,128 L 72,160" fill="none" stroke="black"/>
                    <path d="M 88,128 L 88,160" fill="none" stroke="black"/>
                    <path d="M 104,128 L 104,160" fill="none" stroke="black"/>
                    <path d="M 120,128 L 120,160" fill="none" stroke="black"/>
                    <path d="M 136,128 L 136,160" fill="none" stroke="black"/>
                    <path d="M 152,128 L 152,160" fill="none" stroke="black"/>
                    <path d="M 168,128 L 168,160" fill="none" stroke="black"/>
                    <path d="M 184,128 L 184,160" fill="none" stroke="black"/>
                    <path d="M 200,128 L 200,160" fill="none" stroke="black"/>
                    <path d="M 216,128 L 216,160" fill="none" stroke="black"/>
                    <path d="M 232,128 L 232,160" fill="none" stroke="black"/>
                    <path d="M 248,128 L 248,160" fill="none" stroke="black"/>
                    <path d="M 264,128 L 264,160" fill="none" stroke="black"/>
                    <path d="M 280,128 L 280,160" fill="none" stroke="black"/>
                    <path d="M 296,128 L 296,160" fill="none" stroke="black"/>
                    <path d="M 312,128 L 312,160" fill="none" stroke="black"/>
                    <path d="M 328,128 L 328,160" fill="none" stroke="black"/>
                    <path d="M 344,128 L 344,160" fill="none" stroke="black"/>
                    <path d="M 360,128 L 360,160" fill="none" stroke="black"/>
                    <path d="M 376,128 L 376,160" fill="none" stroke="black"/>
                    <path d="M 392,128 L 392,160" fill="none" stroke="black"/>
                    <path d="M 408,128 L 408,160" fill="none" stroke="black"/>
                    <path d="M 424,128 L 424,160" fill="none" stroke="black"/>
                    <path d="M 440,128 L 440,160" fill="none" stroke="black"/>
                    <path d="M 456,128 L 456,160" fill="none" stroke="black"/>
                    <path d="M 472,128 L 472,160" fill="none" stroke="black"/>
                    <path d="M 488,128 L 488,160" fill="none" stroke="black"/>
                    <path d="M 504,128 L 504,160" fill="none" stroke="black"/>
                    <path d="M 520,128 L 520,160" fill="none" stroke="black"/>
                    <path d="M 24,80 L 48,80" fill="none" stroke="black"/>
                    <path d="M 80,80 L 120,80" fill="none" stroke="black"/>
                    <path d="M 152,80 L 232,80" fill="none" stroke="black"/>
                    <path d="M 264,80 L 344,80" fill="none" stroke="black"/>
                    <path d="M 376,80 L 424,80" fill="none" stroke="black"/>
                    <path d="M 456,80 L 504,80" fill="none" stroke="black"/>
                    <path d="M 8,128 L 520,128" fill="none" stroke="black"/>
                    <path d="M 8,160 L 520,160" fill="none" stroke="black"/>
                    <path d="M 24,208 L 232,208" fill="none" stroke="black"/>
                    <path d="M 264,208 L 504,208" fill="none" stroke="black"/>
                    <path d="M 120,272 L 360,272" fill="none" stroke="black"/>
                    <path d="M 24,80 C 15.16936,80 8,87.16936 8,96" fill="none" stroke="black"/>
                    <path d="M 48,80 C 56.83064,80 64,72.83064 64,64" fill="none" stroke="black"/>
                    <path d="M 80,80 C 71.16936,80 64,72.83064 64,64" fill="none" stroke="black"/>
                    <path d="M 120,80 C 128.83064,80 136,87.16936 136,96" fill="none" stroke="black"/>
                    <path d="M 152,80 C 143.16936,80 136,87.16936 136,96" fill="none" stroke="black"/>
                    <path d="M 232,80 C 240.83064,80 248,72.83064 248,64" fill="none" stroke="black"/>
                    <path d="M 264,80 C 255.16936,80 248,72.83064 248,64" fill="none" stroke="black"/>
                    <path d="M 344,80 C 352.83064,80 360,87.16936 360,96" fill="none" stroke="black"/>
                    <path d="M 376,80 C 367.16936,80 360,87.16936 360,96" fill="none" stroke="black"/>
                    <path d="M 424,80 C 432.83064,80 440,72.83064 440,64" fill="none" stroke="black"/>
                    <path d="M 456,80 C 447.16936,80 440,72.83064 440,64" fill="none" stroke="black"/>
                    <path d="M 504,80 C 512.83064,80 520,87.16936 520,96" fill="none" stroke="black"/>
                    <path d="M 24,208 C 15.16936,208 8,200.83064 8,192" fill="none" stroke="black"/>
                    <path d="M 232,208 C 240.83064,208 248,215.16936 248,224" fill="none" stroke="black"/>
                    <path d="M 264,208 C 255.16936,208 248,215.16936 248,224" fill="none" stroke="black"/>
                    <path d="M 504,208 C 512.83064,208 520,200.83064 520,192" fill="none" stroke="black"/>
                    <g class="text">
                      <text x="88" y="20">Least significant</text>
                      <text x="444" y="20">Most significant</text>
                      <text x="72" y="36">7-bits of</text>
                      <text x="436" y="36">10-bits of</text>
                      <text x="68" y="52">VectorY:14</text>
                      <text x="256" y="52">14-bit VectorX:14</text>
                      <text x="440" y="52">Velocity:42</text>
                      <text x="112" y="180">Most significant of 32-bits</text>
                      <text x="404" y="180">Least signification of 32-bits</text>
                      <text x="252" y="244">32-bits wide</text>
                      <text x="240" y="260">Middle significant 32-bit block</text>
                    </g>
                  </svg>
                </artwork>
              </artset>
            </figure>
          </section>
          <section>
            <name>
							How <xref target="bits3-again"/> "Trajectory" least
							signification 32-bit block would be packed.
						</name>
            <figure anchor="bits3-c">
              <name>
								How <xref target="bits3-again"/> "Trajectory" least
								signification 32-bit block would be packed.
							</name>
              <artset>
                <artwork type="ascii-art">

              Lest significant 32-bits of Velocity:42
                              | 
 .---------------------------' '-------------------------------.
|                                                               |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 Most Significant Bits                     Least significant Bits
|                                                               |
 '---------------------------. .-------------------------------'
                              |
                         32-bits wide
              Least significant 32-bit block
              ------------------------------
								</artwork>
                <artwork type="svg">
                  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="272" width="528" viewBox="0 0 528 272" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                    <path d="M 8,112 L 8,144" fill="none" stroke="black"/>
                    <path d="M 24,112 L 24,144" fill="none" stroke="black"/>
                    <path d="M 40,112 L 40,144" fill="none" stroke="black"/>
                    <path d="M 56,112 L 56,144" fill="none" stroke="black"/>
                    <path d="M 72,112 L 72,144" fill="none" stroke="black"/>
                    <path d="M 88,112 L 88,144" fill="none" stroke="black"/>
                    <path d="M 104,112 L 104,144" fill="none" stroke="black"/>
                    <path d="M 120,112 L 120,144" fill="none" stroke="black"/>
                    <path d="M 136,112 L 136,144" fill="none" stroke="black"/>
                    <path d="M 152,112 L 152,144" fill="none" stroke="black"/>
                    <path d="M 168,112 L 168,144" fill="none" stroke="black"/>
                    <path d="M 184,112 L 184,144" fill="none" stroke="black"/>
                    <path d="M 200,112 L 200,144" fill="none" stroke="black"/>
                    <path d="M 216,112 L 216,144" fill="none" stroke="black"/>
                    <path d="M 232,112 L 232,144" fill="none" stroke="black"/>
                    <path d="M 248,112 L 248,144" fill="none" stroke="black"/>
                    <path d="M 264,112 L 264,144" fill="none" stroke="black"/>
                    <path d="M 280,112 L 280,144" fill="none" stroke="black"/>
                    <path d="M 296,112 L 296,144" fill="none" stroke="black"/>
                    <path d="M 312,112 L 312,144" fill="none" stroke="black"/>
                    <path d="M 328,112 L 328,144" fill="none" stroke="black"/>
                    <path d="M 344,112 L 344,144" fill="none" stroke="black"/>
                    <path d="M 360,112 L 360,144" fill="none" stroke="black"/>
                    <path d="M 376,112 L 376,144" fill="none" stroke="black"/>
                    <path d="M 392,112 L 392,144" fill="none" stroke="black"/>
                    <path d="M 408,112 L 408,144" fill="none" stroke="black"/>
                    <path d="M 424,112 L 424,144" fill="none" stroke="black"/>
                    <path d="M 440,112 L 440,144" fill="none" stroke="black"/>
                    <path d="M 456,112 L 456,144" fill="none" stroke="black"/>
                    <path d="M 472,112 L 472,144" fill="none" stroke="black"/>
                    <path d="M 488,112 L 488,144" fill="none" stroke="black"/>
                    <path d="M 504,112 L 504,144" fill="none" stroke="black"/>
                    <path d="M 520,112 L 520,144" fill="none" stroke="black"/>
                    <path d="M 24,64 L 232,64" fill="none" stroke="black"/>
                    <path d="M 264,64 L 504,64" fill="none" stroke="black"/>
                    <path d="M 8,112 L 520,112" fill="none" stroke="black"/>
                    <path d="M 8,144 L 520,144" fill="none" stroke="black"/>
                    <path d="M 24,192 L 232,192" fill="none" stroke="black"/>
                    <path d="M 264,192 L 504,192" fill="none" stroke="black"/>
                    <path d="M 120,256 L 352,256" fill="none" stroke="black"/>
                    <path d="M 24,64 C 15.16936,64 8,71.16936 8,80" fill="none" stroke="black"/>
                    <path d="M 232,64 C 240.83064,64 248,56.83064 248,48" fill="none" stroke="black"/>
                    <path d="M 264,64 C 255.16936,64 248,56.83064 248,48" fill="none" stroke="black"/>
                    <path d="M 504,64 C 512.83064,64 520,71.16936 520,80" fill="none" stroke="black"/>
                    <path d="M 24,192 C 15.16936,192 8,184.83064 8,176" fill="none" stroke="black"/>
                    <path d="M 232,192 C 240.83064,192 248,199.16936 248,208" fill="none" stroke="black"/>
                    <path d="M 264,192 C 255.16936,192 248,199.16936 248,208" fill="none" stroke="black"/>
                    <path d="M 504,192 C 512.83064,192 520,184.83064 520,176" fill="none" stroke="black"/>
                    <g class="text">
                      <text x="272" y="36">Lest significant 32-bits of Velocity:42</text>
                      <text x="96" y="164">Most Significant Bits</text>
                      <text x="436" y="164">Least significant Bits</text>
                      <text x="252" y="228">32-bits wide</text>
                      <text x="236" y="244">Least significant 32-bit block</text>
                    </g>
                  </svg>
                </artwork>
              </artset>
            </figure>
          </section>
          <section>
					</section>
        </section>
      </section>
    </section>
    <section anchor="NamespaceSec">
      <name>Reducing Namespace Collision in Generated Code</name>
      <t>
				When gathering specifications and definitions from multiple
				specifications it can be much more convenient to be able
				to name each identifier in a way the most resembles the
				original specification.
				However it can be confusing to uniquely identify them
				in generated code, and match them up to the XDR
				Language file that generated them.
			</t>
      <t>
				For this reason a new 'namespace' declaration type
				is being defined.
			</t>
      <figure anchor="Namespace">
        <name>namespace declaration type</name>
        <artwork type="abnf" name="" align="left" alt=""><![CDATA[
namespace = 'namespace' identifier *( ':' identifier) ';'
]]></artwork>
      </figure>
      <t>
				A namespace may have several scope levels.
				Each scope name separated by a colon (:).
			</t>
      <t>
				As each 'namespace' is encountered, all objects
				that follow will be in that scoped namespace.
				Zero or more 'namespaces' declarations may be in
				one XDR Language source.
			</t>
      <t><xref target="RFC4506" section="6.3"/> 'declaration'
				is modified to:
			</t>
      <figure anchor="NewDeclaration">
        <name>Extended declaration ABNF</name>
        <artwork type="abnf" name="" align="left" alt=""><![CDATA[
declaration:
           type-specifier identifier
         | type-specifier identifier "[" value "]"
         | type-specifier identifier "<" [ value ] ">"
         | "opaque" identifier "[" value "]"
         | "opaque" identifier "<" [ value ] ">"
         | "string" identifier "<" [ value ] ">"
         | type-specifier "*" identifier
         | "void"
         | namespace
]]></artwork>
      </figure>
      <t>
				Examples:
			</t>
      <figure anchor="NamespaceAbnf">
        <name>namespace type-specifier</name>
        <artwork type="abnf" name="" align="left" alt=""><![CDATA[
namespace ietf:xdr:example_namespace;

namespace RiverExplorer:Phoenix:xdrgen;
]]></artwork>
      </figure>
      <t>
				Multiple namespaces in one definition could look like this:
			</t>
      <figure anchor="NamespaceEx">
        <name>Namespace Example</name>
        <artwork type="abnf" name="" align="left" alt=""><![CDATA[
namespace MyCompany:LauchPad;
				 
bitobject Status
{
  bit   OffLine;
  bit   LightOn;
  ubits Status:3;
  ubits SwitchPosition:4;
  sbits Rotation:10;
  bit   Active;
  ubits UnitsPerMinute:8;
  ubits UnitID:5;
};
	
namspace MyCompany:Projectile;

bitobject Status
{
  bit   OffLine;
  ubits Status:3;
  sbits Rotation:14;
  ubits Velocity:42;
  sbits VectorX:14;
  sbits VectorY:14;
  sbits VectorZ:14;
};
]]></artwork>
      </figure>
      <t>
				The result would be two 'Status' data types.
				They are similar, and unique.
				Perhaps they came from different specifications.
				And each uniquely identifiable by their scope.
				And the variables produced could be referenced
				with:
			</t>
      <ul>
        <li>'MyCompany:LaunchPad:Status'</li>
        <li>'MyCompany:Projectile:Status'</li>
      </ul>
      <t>
				This also makes it easier to identify an object
				in an XDR <xref target="RFC4506" section="4.15"/> union:
			</t>
      <t>
				Multiple namespaces used in one definition could look like this:
			</t>
      <figure anchor="NamespaceUnion">
        <name>Namespace Example</name>
        <artwork type="abnf" name="" align="left" alt=""><![CDATA[
enum Type = {
 LaunchPadType = 1,
 ProjectileType = 2
};

union ObjectStatus (Type WhichType)
{
  case LaunchPadType:
   MyCompany:LaunchPad:Status PadStatus;
	
  case ProjectilePadType:
   MyCompany:ProjectilePad:Status ProjectileStatus;

  default:
   void;
};
]]></artwork>
      </figure>
    </section>
    <section anchor="IANA">
      <!-- All drafts are required to have an IANA considerations section. See RFC 8126 for a guide.-->
      <name>IANA Considerations</name>
      <t>This memo includes no request to IANA. [CHECK]</t>
    </section>
    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Security Considerations</name>
      <t>This document should not affect the security of the Internet. [CHECK]</t>
    </section>
    <!-- NOTE: The Acknowledgements and Contributors sections are at the end of this template -->
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC4506" target="https://www.rfc-editor.org/info/rfc4506" xml:base="References/reference.RFC.4506.xml">
        <front>
          <title>XDR: External Data Representation Standard</title>
          <author fullname="M. Eisler" initials="M." role="editor" surname="Eisler"/>
          <date month="May" year="2006"/>
          <abstract>
            <t>This document describes the External Data Representation Standard (XDR) protocol as it is currently deployed and accepted. This document obsoletes RFC 1832. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="67"/>
        <seriesInfo name="RFC" value="4506"/>
        <seriesInfo name="DOI" value="10.17487/RFC4506"/>
      </reference>
    </references>
    <references>
      <name>Informative References</name>
      <reference anchor="xdrgen" target="https://github.com/RiverExplorer/Phoenix">
        <front>
          <title>XDR Code Generator, Open Source</title>
          <author initials="DM" surname="Royer">
            <organization>RiverExplorer LLC</organization>
          </author>
          <date year="2025"/>
        </front>
      </reference>
    </references>
    <section>
      <name>Appendix 1 Full XDR Language Grammar</name>
      <t>TODO</t>
    </section>
    <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgments</name>
    </section>
    <section anchor="Contributors" numbered="false">
      <name>Contributors</name>
    </section>
  </back>
</rfc>
