From 5848d78272b2ba08113be5df1f29eb9f7b72a65c Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Fri, 25 Oct 2024 20:12:01 +0200 Subject: [PATCH] doc: document data frames --- doc/hamnet70.adoc | 51 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/doc/hamnet70.adoc b/doc/hamnet70.adoc index a0d6ce5..553be53 100644 --- a/doc/hamnet70.adoc +++ b/doc/hamnet70.adoc @@ -238,6 +238,49 @@ Due to the long possible bursts, this system can achieve high throughput if ther === Frame Definitions +==== Data Frame + +Data Frames carry all higher-layer data in a connection. +Each Data Frame transfers a single layer-3 packet. + +The layer 2 header of Data Frames is filled as follows: + +- Message Type: `000` (Data Frame) +- TX Request: `1` if this is the last packet in the burst, `0` otherwise +- Source Address: the transmitter’s HAM-64 address +- Destination Address: the target station’s HAM-64 address +- TX sequence number: as required by Go-Back-N +- RX sequence number: as required by Go-Back-N + +To identify how the encoded packet should be handled, the layer 3 protocol is encoded in the first byte of the layer 2 payload. +The full layer 2 payload therefore is composed as follows: + +- Layer 3 protocol ID (1 Byte) +- Layer 3 packet data (variable length) + +So far, the following protocols are defined and supported: + +[cols="2,1,1", options="header"] +.Layer 3 protocol identifiers. EtherType is given as reference. +|=== +| Protocol | Hamnet70 ID | EtherType + +| IPv6 +| `0x00` +| `0x86DD` + +| IPv4 +| `0x10` +| `0x0800` + +| _undefined/auto_ +| `0xFF` +| - + +3+|_All other values are reserved._ + +|=== + ==== Empty Frame The Empty Frame does not contain any data and therefore only consists of the header and the CRC. @@ -436,8 +479,8 @@ The layer 2 header is filled as follows: - TX Request: `1` if this is the last packet in the burst, `0` otherwise - Source Address: the digipeater’s HAM-64 address - Destination Address: the client’s HAM-64 address -- TX sequence number: as counted in the connection -- RX sequence number: as counted in the connection +- TX sequence number: as required by Go-Back-N +- RX sequence number: as required by Go-Back-N The message contains exactly 1 data byte: `0x04` to indicate that this is a Disconnect Request packet. @@ -460,8 +503,8 @@ The layer 2 header is filled as follows: - TX Request: `0` - Source Address: the client’s HAM-64 address - Destination Address: the digipeater’s HAM-64 address -- TX sequence number: as counted in the connection -- RX sequence number: as counted in the connection +- TX sequence number: as required by Go-Back-N +- RX sequence number: as required by Go-Back-N The message contains exactly 1 data byte: `0x05` to indicate that this is a Disconnect packet.