<div class="section-content">
<p class="p">
- The version date of this specification is <code class="code">2023/11/14</code>.
+ The version date of this specification is <code class="code">2024/06/05</code>.
</p>
<p class="p">
- This is a network packet format that contains <code class="code">fss-000e (Payload)</code> within it.
+ This is a network packet format that often contains <code class="code">fss-000e (Payload)</code> within it.
+ </p>
+ <p class="p">
+ The <strong class="strong">Magic Block</strong> when containing <code class="code">FSS-000e (Payload)</code> in the <strong class="strong">Payload Block</strong> is: <code class="code">11010010100111101111010000111110</code>.
+ </p>
+ <p class="p">
+ The <strong class="strong">Magic Block</strong> when containing unspecified plain text in the <strong class="strong">Payload Block</strong> is: <code class="code">00101110000001001101110001000010</code>.
+ </p>
+ <p class="p">
+ The <strong class="strong">Magic Block</strong> when containing unspecified binary data in the <strong class="strong">Payload Block</strong> is: <code class="code">00010101101001001111000000001000</code>.
</p>
<p class="p">
The Simple Packet structure is described in blocks, of which are structured in bytes.
</p>
<p class="p">
- There are only three blocks in this format:
+ There are three or four blocks in this format:
</p>
<ol>
<li>Control Block.</li>
<li>Size Block.</li>
+ <li>Magic Block.</li>
<li>Payload Block.</li>
</ol>
<p class="p">
There exists only a single byte within the <strong class="strong">Control Block</strong> (8-bits).
Regardless of the endianness of the packet, leftmost bit is always the endianness bit.
The second bit following that endianness bit represents the <em class="em">string</em> or <em class="em">binary</em> bit.
+ The third bit following the endiannes bit represents the magic bit.
</p>
<p class="p">
Control Block Structure:
</p><pre class="preserve">
-[ Endianness Bit ] [ String / Binary Bit ] [ Remaining 6 Bits (unused) ]
-[ size: 1 bit ] [ size: 1 bit ] [ size: 6 bits ]
+[ Endianness Bit ] [ String / Binary Bit ] [ Magic Bit ] [ Remaining 5 Bits (unused) ]
+[ size: 1 bit ] [ size: 1 bit ] [ size: 1 bit ] [ size: 5 bits ]
</pre>
<p class="p">
The endianness bit designates whether or not the packet is in big endian or little endian format.
All <em class="em">binary</em> data within this packet, following the Control Block, must respect this endianness bit (including the <strong class="strong">Size Block</strong>).
</p>
<p class="p">
+ The magic bit designates whether or not the packet contains the optional <strong class="strong">Magic Block</strong>.
+ When the magic bit is not set, then there is no <strong class="strong">Magic Block</strong>.
+ </p>
+ <p class="p">
The <em class="em">string</em> or <em class="em">binary</em> bit, a value of 0 designates that the packet is in string format and a value of 1 designates that the packet is in <em class="em">binary</em> format.
- While the packet might be considered to be in string format, it is technically always in <em class="em">binary</em> format due to the <strong class="strong">Control Block</strong> and <strong class="strong">Size Block</strong>.
+ While the packet might be considered to be in string format, it is technically always in <em class="em">binary</em> format due to the <strong class="strong">Control Block</strong>, the optional <strong class="strong">Magic Block</strong>, and <strong class="strong">Size Block</strong>.
This means that the <em class="em">binary</em> bit designating the packet as either a <em class="em">string</em> packet or a <em class="em">binary</em> packet is referring to whether or not the <strong class="strong">Payload Block</strong> is in <em class="em">string</em> or <em class="em">binary</em> format.
The <strong class="strong">Payload Block</strong> itself can contain <em class="em">binary</em> data even when in <em class="em">string</em> format as per <code class="code">FSS-000e (Payload)</code>.
</p>
This size must exactly match the packet to be a valid packet.
The size represents number of bytes in the file.
The <strong class="strong">Control Block</strong> is 1 byte long and the <strong class="strong">Size Block</strong> is 4 bytes long, therefore the maximum available size of the entire <strong class="strong">Simple Packet</strong> structure is <code class="code">(2^32)-6</code>.
+ The <strong class="strong">Magic Block</strong> is 4 bytes long, therefore when the magic bit is set, then the maximum available size of the entire <strong class="strong">Simple Packet</strong> structure is <code class="code">(2^32)-9</code>.
</p>
<p class="p">
-
+ Magic Block Structure:
+ </p><pre class="preserve">
+[ Magic Block ]
+[ size: 32 bits ]
+</pre>
+ <p class="p">
+ The <strong class="strong">Magic Block</strong> is an unsigned 32-bit digit used to uniquely identify the packet.
+ The 32-bits are treated as endianless such that the left to right order of the bits is always the same for both big and little endian systems.
+ The <strong class="strong">Magic Block</strong> is required when the magic bit is set and it must not exist when the magic bit is not set.
+ </p>
+ <p class="p">
+ This offers optimization in identifying the packet and its structure.
+ This is particularly useful for quick identification on the network such as via routers.
+ This is particularly useful for storing the packet as a file.
+ This is particularly unhelpful for security and privacy given that it helps quickly identify the packet.
</p>
<p class="p">
Payload Block Structure:
</p><pre class="preserve">
-[ Payload Block ]
-[ size: (2^32)-6 bytes ]
+[ Payload Block ]
+[ size: (2^32)-5 bytes (or (2^32)-9 bytes if magic bit is set) ]
</pre>
<p class="p">
- The <strong class="strong">Payload Block</strong> is not defined by this standard other than that it exists and should be in <code class="code">FSS-000e (Payload)</code> format.
+ The <strong class="strong">Payload Block</strong> is not defined by this standard other than that it exists and is suggested to be in <code class="code">FSS-000e (Payload)</code> format.
+ If the <strong class="strong">Magic Block</strong> is present and set to <code class="code">11010010100111101111010000111110</code>, then this is expected to be in <code class="code">FSS-000e (Payload)</code> format.
The <code class="code">FSS-000e (Payload)</code> may be represented in either <em class="em">string</em> format or <em class="em">binary</em> format.
The <code class="code">FSS-000e (Payload)</code> may contain multiple <em class="em">header</em>(s) but may only contain a single <em class="em">payload</em>.
With this in mind, it is recommended that only a single <em class="em">header</em> be supported in the <strong class="strong">Payload Block</strong>.
[ Control Block ] [ Size Block ] [ Payload Block ]
[ 0b10000000 ] [ 0b00000000 0b00000000 0b00000100 0b11010010 ] [ size: 1229 (1234 - 5) ]
</pre>
+ <p class="p">
+ Example Packet Structure with Magic Bit:
+ </p><pre class="preserve">
+[ Control Block ] [ Size Block ] [ Magic Block ] [ Payload Block ]
+[ 0b10100000 ] [ 0b00000000 0b00000000 0b00000100 0b11010010 ] [ 0b11010010 0b10011110 0b11110100 0b00111110 ] [ size: 1225 (1234 - 9) ]
+</pre>
</div>
</section>
</main>