Compare commits

...

4 commits

Author SHA1 Message Date
Thomas Kolb 778ac7f815 doc: document connectionless frame type
All checks were successful
/ build-hamnet70 (push) Successful in 30s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Successful in 11s
2024-10-25 20:36:34 +02:00
Thomas Kolb 5848d78272 doc: document data frames
All checks were successful
/ build-hamnet70 (push) Successful in 28s
/ build-doc (push) Successful in 18s
/ deploy-doc (push) Successful in 11s
2024-10-25 20:12:01 +02:00
Thomas Kolb 0b48995cec workflows: use latest version of asciidoctor container
All checks were successful
/ build-hamnet70 (push) Successful in 29s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Successful in 12s
2024-10-24 21:20:12 +02:00
Thomas Kolb 0309c042e4 doc: describe connection reset and disconnect packets
All checks were successful
/ build-hamnet70 (push) Successful in 29s
/ build-doc (push) Successful in 23s
/ deploy-doc (push) Has been skipped
2024-10-24 21:14:30 +02:00
2 changed files with 142 additions and 10 deletions

View file

@ -3,7 +3,7 @@ jobs:
build-doc:
runs-on: docker
container:
image: git.tkolb.de/amateurfunk/hamnet70/asciidoctor:1.6
image: git.tkolb.de/amateurfunk/hamnet70/asciidoctor:1.7
steps:
- uses: actions/checkout@v4
- run: cd doc && make
@ -16,7 +16,7 @@ jobs:
runs-on: docker
if: github.ref == 'refs/heads/main'
container:
image: git.tkolb.de/amateurfunk/hamnet70/asciidoctor:1.6
image: git.tkolb.de/amateurfunk/hamnet70/asciidoctor:1.7
steps:
- run: mkdir ~/.ssh && echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_ed25519 && chmod 0600 ~/.ssh/id_ed25519 && echo "${{ secrets.SSH_KNOWN_HOST }}" > ~/.ssh/known_hosts
- uses: actions/download-artifact@v3

View file

@ -10,7 +10,7 @@ Thomas Kolb DL5TKL
== Introduction
Hamnet70 intends to provide a network system in the 70 cm amateur radio band that can transfer Internet Protocol (IP) packets at a high speed.
https://git.tkolb.de/amateurfunk/hamnet70[Hamnet70] intends to provide a network system in the 70 cm amateur radio band that can transfer Internet Protocol (IP) packets at a high speed.
The protocols defined here are inspired by the Packet Radio network and Bluetooth Low Energy.
The protocols are designed primarily for centralized infrastructure as they were common in the Packet Radio network.
@ -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 transmitters HAM-64 address
- Destination Address: the target stations 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.
@ -405,15 +448,104 @@ The following Configuration Types are defined:
If the client receives an unknown Configuration Type the corresponding block shall be skipped.
The remaining blocks shall be parsed as usual.
=== Ideas
===== Connection Reset
To be defined:
A Connection Reset is set by the digipeater if it receives unexpected packets from stations that are not connected.
- connection establishment procedure (request, response)
- how do clients get an IP(v6) address? -> should be derived from the call sign
- when are new clients allowed to connect? -> base station calls for any new stations in regular intervals
- handling of packets from unknown clients that are not connection requests
- signal quality handling
The layer 2 header is filled as follows:
- Message Type: `001` (Connection Management)
- TX Request: `1` if this is the last packet in the burst, `0` otherwise
- Source Address: the digipeaters HAM-64 address
- Destination Address: the new clients HAM-64 address
- TX sequence number: reserved, always 0
- RX sequence number: reserved, always 0
The message contains exactly 1 data byte: `0x03` to indicate that this is a Connection Reset packet.
A Connection Request is sent in a regular burst and can be in any position.
This message means that the digipeater does not have any information about a connection with the addressed client.
Therefore, when a client receives a Connection Reset, it shall drop its complete connection state and start a new connection procedure if desired.
===== Disconnect Request
A Disconnect Request is set by the digipeater when it wants to orderly shut down a client connection.
It is the last packet that the digipeater sends in a connection.
The layer 2 header is filled as follows:
- Message Type: `001` (Connection Management)
- TX Request: `1` if this is the last packet in the burst, `0` otherwise
- Source Address: the digipeaters HAM-64 address
- Destination Address: the clients HAM-64 address
- 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.
A Disconnect Request is sent in a regular burst and can be in any position.
The sequence numbers are sent and handled the same way as in regular connection packets.
When a client receives a Disconnect Request, it may transmit the remainder of its current queue, but must not queue new data packets.
After the last packet is transmitted, the client shall send a Disconnect packet, which confirms the end of the connection.
The digipeater must keep the connection state in memory until either the Disconnect packet is received from the client or the connection times out.
===== Disconnect
A Disconnect packet is sent by the client to terminate the connection.
It is the last packet in a connection and is not confirmed by the digipeater.
The layer 2 header is filled as follows:
- Message Type: `001` (Connection Management)
- TX Request: `0`
- Source Address: the clients HAM-64 address
- Destination Address: the digipeaters HAM-64 address
- 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.
A Disconnect is sent always as the final packet of a burst.
The sequence numbers are sent and handled the same way as in regular connection packets.
When the digipeater receives a disconnect packet in the regular packet flow (i.e. no previous packets are lost), it will immediately drop the connection state and not call this client again.
Therefore, if the client wants to ensure that all previous packets are transmitted, it must wait until the digipeater confirms that by sending the corresponding RX sequence number before sending the Disconnect packet.
==== Connectionless Frame
Connectionless Frames are used to transfer packets between unconnected notes.
They can be used to implement custom protocols (similar to APRS, which is implemented on top of AX.25).
The layer 2 header of Connectionless Frames is filled as follows:
- Message Type: `100` (Connectionless Frame)
- TX Request: `1` if this is the last packet in the burst, `0` otherwise
- Source Address: the transmitters HAM-64 address
- Destination Address: the target stations HAM-64 address
- TX sequence number: user-defined
- RX sequence number: user-defined
The sequence numbers can be used in any way that is useful for the custom protocol.
It is required that the first byte of each Connectionless Frame identify the protocol being used.
Protocol numbers are centrally assigned and are listed below.
Some protocol numbers are reserved for experimentation and development and can be self-assigned temporarily.
[cols="1,3", options="header"]
.Connectionless Frame protocol IDs
|===
|Protocol IDs
|Description
|`0x00 .. 0xF7`
|_reserved_
|`0xF8 .. 0xFF`
|Available for experimentation and developmentfootnote:[If you are developing a new protocol, you can freely pick a number from this range. Please check which temporary IDs are already used around your location and pick a free one. When your protocol reaches a sufficiently stable state, please request an official ID assignment].
|===
=== Message Sequence Charts