From 778eb68a42fcb33dd35e90ad77f470a74ac91789 Mon Sep 17 00:00:00 2001 From: Skye Date: Sun, 18 Feb 2018 15:10:09 +0000 Subject: [PATCH 1/5] Reserve character in address for multicast --- protocol-3.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/protocol-3.md b/protocol-3.md index 40bf91b..67dd65b 100644 --- a/protocol-3.md +++ b/protocol-3.md @@ -62,6 +62,8 @@ Strings in Minitel packets, with the exception of the data portion, have the fol - ASCII 127 is not allowed - ASCII 128 and above (ie unicode) behavior is undefined and should be used with caution. +The address part of the packet has a furthur limitatation, the tidle character `~`, ASCII 126, may not be used as an address of a node, but is allowed in the address part as a seperator for multicast. + The data part of the packet can contain any characters. ### Example exchange: From 46943fe1f06eed8ff0280168b1566c08852c21d1 Mon Sep 17 00:00:00 2001 From: Skye Date: Sun, 18 Feb 2018 15:14:58 +0000 Subject: [PATCH 2/5] Basic broadcast documentation in Layer 3 --- protocol-3.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol-3.md b/protocol-3.md index 67dd65b..225d39b 100644 --- a/protocol-3.md +++ b/protocol-3.md @@ -29,9 +29,9 @@ It is recommended to keep the data in the cache for 30 seconds or so, then drop When sending a message, check the cache for the given destination. If there is a hardware address in the cache for the destination, send the message straight to that address. Otherwise, broadcast the message. -### WIP, Optional: Broadcast address +### Optional: Broadcast address -Packets addressed to the broadcast address (currently undecided) can optionally be received by all nodes. +Packets addressed to the broadcast address, an adress of an empty string, can optionally be received by all nodes om the same layer 2 network. While a node MAY forward a broadcast packet to other nodes, it SHOULD NOT, unless both sides of the forward are prepared to handle such a packet, to avoid it going around the entire layer 3 network. ### WIP, Optional: Network status packets From 938c5fce9da7188f465b91c0b99ea1ef91f58edf Mon Sep 17 00:00:00 2001 From: Skye Date: Sun, 18 Feb 2018 15:47:03 +0000 Subject: [PATCH 3/5] First draft of multicast and broadcast spec --- protocol-3.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/protocol-3.md b/protocol-3.md index 225d39b..5bbed51 100644 --- a/protocol-3.md +++ b/protocol-3.md @@ -18,6 +18,10 @@ If the packet is, for some reason invalid, simply drop the packet. ### Optional: Meshing If a message is not addressed to a node, and the node has not seen the packet ID before, the node should repeat it. Whether via the address in the cache or by broadcast, it should be passed on, and the hardware address added to the cache as the sender. +#### Important (Non-Optional) Notes +Broadcast packets MUST NOT be repeated, in order to keep them within the same layer 2 network, unless special precautions are taken. +If a packet is multicast and you don't support multicast, then you SHOULD NOT repeat the packet. + ### Optional: Address caching Each machine should keep a last known route cache. The exact format is up to the implementation, but it will need: @@ -30,9 +34,21 @@ It is recommended to keep the data in the cache for 30 seconds or so, then drop When sending a message, check the cache for the given destination. If there is a hardware address in the cache for the destination, send the message straight to that address. Otherwise, broadcast the message. ### Optional: Broadcast address - Packets addressed to the broadcast address, an adress of an empty string, can optionally be received by all nodes om the same layer 2 network. While a node MAY forward a broadcast packet to other nodes, it SHOULD NOT, unless both sides of the forward are prepared to handle such a packet, to avoid it going around the entire layer 3 network. +### Optional: Multicast +A multicast packet has a specially formatted address part. +The address must be a list of valid addresses, seperated by the tilde character, `~`, ASCII 126. +For example, to send to nodes `a` and `b`, the address in the packet would be `a~b`. + +Each node should send multicasts as layer 2 broadcasts, unless it is known (using the address cache) that all layer 3 destination addresses have to be sent to or forwarded by one layer 2 address. + +When a multicast packet is forwarded, the addresses already seen SHOULD be removed from the packet when possible, using the address cache as a guide. + +The same address MUST NOT be repeated in a multicast destination, but the duplicate MAY be ignored and just considered one, but also MAY br dropped as an invalid packet. A duplicate address MUST NOT be considered as two packets with the same contents to the same address. + +A multicast packet SHOULD also be able to be broken up into multiple packets with the same contents (but they need different packet IDs!) with different addresses. + ### WIP, Optional: Network status packets Currently undecided on specifics and taking input. From 22777cc70940af15668944aa506a2b9965e27d4f Mon Sep 17 00:00:00 2001 From: Skye Date: Sun, 18 Feb 2018 15:53:12 +0000 Subject: [PATCH 4/5] Change broadcast address --- protocol-3.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protocol-3.md b/protocol-3.md index 5bbed51..75c53d0 100644 --- a/protocol-3.md +++ b/protocol-3.md @@ -34,7 +34,7 @@ It is recommended to keep the data in the cache for 30 seconds or so, then drop When sending a message, check the cache for the given destination. If there is a hardware address in the cache for the destination, send the message straight to that address. Otherwise, broadcast the message. ### Optional: Broadcast address -Packets addressed to the broadcast address, an adress of an empty string, can optionally be received by all nodes om the same layer 2 network. While a node MAY forward a broadcast packet to other nodes, it SHOULD NOT, unless both sides of the forward are prepared to handle such a packet, to avoid it going around the entire layer 3 network. +Packets addressed to the broadcast address, an adress of just the tilde character, `~`, ASCII 126, can optionally be received by all nodes om the same layer 2 network. While a node MAY forward a broadcast packet to other nodes, it SHOULD NOT, unless both sides of the forward are prepared to handle such a packet, to avoid it going around the entire layer 3 network. ### Optional: Multicast A multicast packet has a specially formatted address part. @@ -78,7 +78,8 @@ Strings in Minitel packets, with the exception of the data portion, have the fol - ASCII 127 is not allowed - ASCII 128 and above (ie unicode) behavior is undefined and should be used with caution. -The address part of the packet has a furthur limitatation, the tidle character `~`, ASCII 126, may not be used as an address of a node, but is allowed in the address part as a seperator for multicast. +The address part of the packet has a furthur limitatation, the tidle character `~`, ASCII 126, may not be used as an address of a node, but is allowed in the address part as a seperator for multicast. +An address of 0 length (an empty address) MUST be considered invalid and dropped. The data part of the packet can contain any characters. From d97896e0f0a98a7df0867bf6052a9bc3508df9f1 Mon Sep 17 00:00:00 2001 From: Skye Date: Sun, 18 Feb 2018 15:57:48 +0000 Subject: [PATCH 5/5] Fix spelling errors in additions to L3 --- protocol-3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol-3.md b/protocol-3.md index 75c53d0..4a790f2 100644 --- a/protocol-3.md +++ b/protocol-3.md @@ -34,7 +34,7 @@ It is recommended to keep the data in the cache for 30 seconds or so, then drop When sending a message, check the cache for the given destination. If there is a hardware address in the cache for the destination, send the message straight to that address. Otherwise, broadcast the message. ### Optional: Broadcast address -Packets addressed to the broadcast address, an adress of just the tilde character, `~`, ASCII 126, can optionally be received by all nodes om the same layer 2 network. While a node MAY forward a broadcast packet to other nodes, it SHOULD NOT, unless both sides of the forward are prepared to handle such a packet, to avoid it going around the entire layer 3 network. +Packets addressed to the broadcast address, an address of just the tilde character, `~`, ASCII 126, can optionally be received by all nodes of the same layer 2 network. While a node MAY forward a broadcast packet to other nodes, it SHOULD NOT, unless both sides of the forward are prepared to handle such a packet, to avoid it going around the entire layer 3 network. ### Optional: Multicast A multicast packet has a specially formatted address part.