feat(core): modems run — the pair in the project, and a modem of another project hands its frames on (K0–K2)

Measured first: tools/java-oracle's ModemRun joins two networks by a pair
of Java modems over TCP on localhost. The modem has no card and adds no
delay of its own — a frame takes the cables on both sides, nothing more.

The core pairs the two enabled modems on a port (Swift's inProject, with
its conditions and cycle suppression) on Java's timing: no 20 ms. The
modem example of FILIUS now pings through instead of failing the core.
A modem of another project (relay) gives its frames to whoever runs the
engine and puts on its cable what comes back, with this engine's frame
and packet numbers; a frame dies after MAXIMUM_RELAY_HOPS trips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 18:12:27 +00:00
co-authored by Claude Opus 5.5
parent 6f583616f6
commit c85b0e45da
19 changed files with 1743 additions and 44 deletions
@@ -0,0 +1,580 @@
{
"frames": {
"00000000-0000-0000-0000-000000000401": [
{
"time": 734,
"source": "02:00:00:00:04:11",
"destination": "FF:FF:FF:FF:FF:FF",
"arp": 1,
"senderIp": "10.0.0.1",
"targetIp": "10.0.0.2"
},
{
"time": 1124,
"source": "02:00:00:00:04:13",
"destination": "02:00:00:00:04:11",
"arp": 2,
"senderIp": "10.0.0.2",
"targetIp": "10.0.0.1"
},
{
"time": 1129,
"source": "02:00:00:00:04:11",
"destination": "02:00:00:00:04:13",
"icmp": 8,
"icmpCode": 0,
"sourceIp": "10.0.0.1",
"destinationIp": "10.0.0.2",
"sequence": 1
},
{
"time": 1466,
"source": "02:00:00:00:04:13",
"destination": "02:00:00:00:04:11",
"icmp": 0,
"icmpCode": 0,
"sourceIp": "10.0.0.2",
"destinationIp": "10.0.0.1",
"sequence": 1
},
{
"time": 1469,
"source": "02:00:00:00:04:11",
"destination": "02:00:00:00:04:13",
"icmp": 8,
"icmpCode": 0,
"sourceIp": "10.0.0.1",
"destinationIp": "10.0.0.2",
"sequence": 2
},
{
"time": 1803,
"source": "02:00:00:00:04:13",
"destination": "02:00:00:00:04:11",
"icmp": 0,
"icmpCode": 0,
"sourceIp": "10.0.0.2",
"destinationIp": "10.0.0.1",
"sequence": 2
}
],
"00000000-0000-0000-0000-000000000403": [
{
"time": 915,
"source": "02:00:00:00:04:11",
"destination": "FF:FF:FF:FF:FF:FF",
"arp": 1,
"senderIp": "10.0.0.1",
"targetIp": "10.0.0.2"
},
{
"time": 915,
"source": "02:00:00:00:04:13",
"destination": "02:00:00:00:04:11",
"arp": 2,
"senderIp": "10.0.0.2",
"targetIp": "10.0.0.1"
},
{
"time": 1298,
"source": "02:00:00:00:04:11",
"destination": "02:00:00:00:04:13",
"icmp": 8,
"icmpCode": 0,
"sourceIp": "10.0.0.1",
"destinationIp": "10.0.0.2",
"sequence": 1
},
{
"time": 1299,
"source": "02:00:00:00:04:13",
"destination": "02:00:00:00:04:11",
"icmp": 0,
"icmpCode": 0,
"sourceIp": "10.0.0.2",
"destinationIp": "10.0.0.1",
"sequence": 1
},
{
"time": 1636,
"source": "02:00:00:00:04:11",
"destination": "02:00:00:00:04:13",
"icmp": 8,
"icmpCode": 0,
"sourceIp": "10.0.0.1",
"destinationIp": "10.0.0.2",
"sequence": 2
},
{
"time": 1636,
"source": "02:00:00:00:04:13",
"destination": "02:00:00:00:04:11",
"icmp": 0,
"icmpCode": 0,
"sourceIp": "10.0.0.2",
"destinationIp": "10.0.0.1",
"sequence": 2
}
],
"00000000-0000-0000-0000-000000000407": [
{
"time": 858,
"source": "02:00:00:00:04:11",
"destination": "FF:FF:FF:FF:FF:FF",
"arp": 1,
"senderIp": "10.0.0.1",
"targetIp": "10.0.0.2"
}
]
},
"rows": {
"00000000-0000-0000-0000-000000000401": [
[
"1",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"1",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
],
[
"2",
"02:00:00:00:04:13",
"02:00:00:00:04:11",
"",
"Netzzugang",
"0x806"
],
[
"2",
"10.0.0.2",
"10.0.0.1",
"ARP",
"Vermittlung",
"MAC ist 02:00:00:00:04:13 [op=REPLY, sender=02:00:00:00:04:13|10.0.0.2, target=02:00:00:00:04:11|10.0.0.1]"
],
[
"3",
"02:00:00:00:04:11",
"02:00:00:00:04:13",
"",
"Netzzugang",
"0x800"
],
[
"3",
"10.0.0.1",
"10.0.0.2",
"ICMP",
"Vermittlung",
"ICMP Echo Request (ping), TTL: 64, Identifier: 1, Seq.-No.: 1"
],
[
"4",
"02:00:00:00:04:13",
"02:00:00:00:04:11",
"",
"Netzzugang",
"0x800"
],
[
"4",
"10.0.0.2",
"10.0.0.1",
"ICMP",
"Vermittlung",
"ICMP Echo Reply (pong), TTL: 64, Identifier: 1, Seq.-No.: 1"
],
[
"5",
"02:00:00:00:04:11",
"02:00:00:00:04:13",
"",
"Netzzugang",
"0x800"
],
[
"5",
"10.0.0.1",
"10.0.0.2",
"ICMP",
"Vermittlung",
"ICMP Echo Request (ping), TTL: 64, Identifier: 1, Seq.-No.: 2"
],
[
"6",
"02:00:00:00:04:13",
"02:00:00:00:04:11",
"",
"Netzzugang",
"0x800"
],
[
"6",
"10.0.0.2",
"10.0.0.1",
"ICMP",
"Vermittlung",
"ICMP Echo Reply (pong), TTL: 64, Identifier: 1, Seq.-No.: 2"
]
],
"00000000-0000-0000-0000-000000000403": [
[
"1",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"1",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
],
[
"2",
"02:00:00:00:04:13",
"02:00:00:00:04:11",
"",
"Netzzugang",
"0x806"
],
[
"2",
"10.0.0.2",
"10.0.0.1",
"ARP",
"Vermittlung",
"MAC ist 02:00:00:00:04:13 [op=REPLY, sender=02:00:00:00:04:13|10.0.0.2, target=02:00:00:00:04:11|10.0.0.1]"
],
[
"3",
"02:00:00:00:04:11",
"02:00:00:00:04:13",
"",
"Netzzugang",
"0x800"
],
[
"3",
"10.0.0.1",
"10.0.0.2",
"ICMP",
"Vermittlung",
"ICMP Echo Request (ping), TTL: 64, Identifier: 1, Seq.-No.: 1"
],
[
"4",
"02:00:00:00:04:13",
"02:00:00:00:04:11",
"",
"Netzzugang",
"0x800"
],
[
"4",
"10.0.0.2",
"10.0.0.1",
"ICMP",
"Vermittlung",
"ICMP Echo Reply (pong), TTL: 64, Identifier: 1, Seq.-No.: 1"
],
[
"5",
"02:00:00:00:04:11",
"02:00:00:00:04:13",
"",
"Netzzugang",
"0x800"
],
[
"5",
"10.0.0.1",
"10.0.0.2",
"ICMP",
"Vermittlung",
"ICMP Echo Request (ping), TTL: 64, Identifier: 1, Seq.-No.: 2"
],
[
"6",
"02:00:00:00:04:13",
"02:00:00:00:04:11",
"",
"Netzzugang",
"0x800"
],
[
"6",
"10.0.0.2",
"10.0.0.1",
"ICMP",
"Vermittlung",
"ICMP Echo Reply (pong), TTL: 64, Identifier: 1, Seq.-No.: 2"
]
],
"00000000-0000-0000-0000-000000000407": [
[
"1",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"1",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
]
]
},
"layeredRows": {
"00000000-0000-0000-0000-000000000401": [
[
"1",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"1",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
],
[
"2",
"02:00:00:00:04:13",
"02:00:00:00:04:11",
"",
"Netzzugang",
"0x806"
],
[
"2",
"10.0.0.2",
"10.0.0.1",
"ARP",
"Vermittlung",
"MAC ist 02:00:00:00:04:13 [op=REPLY, sender=02:00:00:00:04:13|10.0.0.2, target=02:00:00:00:04:11|10.0.0.1]"
],
[
"3",
"02:00:00:00:04:11",
"02:00:00:00:04:13",
"",
"Netzzugang",
"0x800"
],
[
"3",
"10.0.0.1",
"10.0.0.2",
"ICMP",
"Vermittlung",
"ICMP Echo Request (ping), TTL: 64, Identifier: 1, Seq.-No.: 1"
],
[
"4",
"02:00:00:00:04:13",
"02:00:00:00:04:11",
"",
"Netzzugang",
"0x800"
],
[
"4",
"10.0.0.2",
"10.0.0.1",
"ICMP",
"Vermittlung",
"ICMP Echo Reply (pong), TTL: 64, Identifier: 1, Seq.-No.: 1"
],
[
"5",
"02:00:00:00:04:11",
"02:00:00:00:04:13",
"",
"Netzzugang",
"0x800"
],
[
"5",
"10.0.0.1",
"10.0.0.2",
"ICMP",
"Vermittlung",
"ICMP Echo Request (ping), TTL: 64, Identifier: 1, Seq.-No.: 2"
],
[
"6",
"02:00:00:00:04:13",
"02:00:00:00:04:11",
"",
"Netzzugang",
"0x800"
],
[
"6",
"10.0.0.2",
"10.0.0.1",
"ICMP",
"Vermittlung",
"ICMP Echo Reply (pong), TTL: 64, Identifier: 1, Seq.-No.: 2"
]
],
"00000000-0000-0000-0000-000000000403": [
[
"1",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"1",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
],
[
"2",
"02:00:00:00:04:13",
"02:00:00:00:04:11",
"",
"Netzzugang",
"0x806"
],
[
"2",
"10.0.0.2",
"10.0.0.1",
"ARP",
"Vermittlung",
"MAC ist 02:00:00:00:04:13 [op=REPLY, sender=02:00:00:00:04:13|10.0.0.2, target=02:00:00:00:04:11|10.0.0.1]"
],
[
"3",
"02:00:00:00:04:11",
"02:00:00:00:04:13",
"",
"Netzzugang",
"0x800"
],
[
"3",
"10.0.0.1",
"10.0.0.2",
"ICMP",
"Vermittlung",
"ICMP Echo Request (ping), TTL: 64, Identifier: 1, Seq.-No.: 1"
],
[
"4",
"02:00:00:00:04:13",
"02:00:00:00:04:11",
"",
"Netzzugang",
"0x800"
],
[
"4",
"10.0.0.2",
"10.0.0.1",
"ICMP",
"Vermittlung",
"ICMP Echo Reply (pong), TTL: 64, Identifier: 1, Seq.-No.: 1"
],
[
"5",
"02:00:00:00:04:11",
"02:00:00:00:04:13",
"",
"Netzzugang",
"0x800"
],
[
"5",
"10.0.0.1",
"10.0.0.2",
"ICMP",
"Vermittlung",
"ICMP Echo Request (ping), TTL: 64, Identifier: 1, Seq.-No.: 2"
],
[
"6",
"02:00:00:00:04:13",
"02:00:00:00:04:11",
"",
"Netzzugang",
"0x800"
],
[
"6",
"10.0.0.2",
"10.0.0.1",
"ICMP",
"Vermittlung",
"ICMP Echo Reply (pong), TTL: 64, Identifier: 1, Seq.-No.: 2"
]
],
"00000000-0000-0000-0000-000000000407": [
[
"1",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"1",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
]
]
},
"events": [
[
728,
"sendProbe 10.0.0.2 called"
],
[
1468,
"sendProbe 10.0.0.2 returned ICMP 0/0 from 10.0.0.2"
],
[
1468,
"sendProbe 10.0.0.2 called"
],
[
1804,
"sendProbe 10.0.0.2 returned ICMP 0/0 from 10.0.0.2"
]
]
}
@@ -0,0 +1,193 @@
{
"frames": {
"00000000-0000-0000-0000-000000000401": [
{
"time": 717,
"source": "02:00:00:00:04:11",
"destination": "FF:FF:FF:FF:FF:FF",
"arp": 1,
"senderIp": "10.0.0.1",
"targetIp": "10.0.0.2"
},
{
"time": 3468,
"source": "02:00:00:00:04:11",
"destination": "FF:FF:FF:FF:FF:FF",
"arp": 1,
"senderIp": "10.0.0.1",
"targetIp": "10.0.0.2"
}
],
"00000000-0000-0000-0000-000000000403": [],
"00000000-0000-0000-0000-000000000407": [
{
"time": 838,
"source": "02:00:00:00:04:11",
"destination": "FF:FF:FF:FF:FF:FF",
"arp": 1,
"senderIp": "10.0.0.1",
"targetIp": "10.0.0.2"
},
{
"time": 3579,
"source": "02:00:00:00:04:11",
"destination": "FF:FF:FF:FF:FF:FF",
"arp": 1,
"senderIp": "10.0.0.1",
"targetIp": "10.0.0.2"
}
]
},
"rows": {
"00000000-0000-0000-0000-000000000401": [
[
"1",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"1",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
],
[
"2",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"2",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
]
],
"00000000-0000-0000-0000-000000000403": [],
"00000000-0000-0000-0000-000000000407": [
[
"1",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"1",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
],
[
"2",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"2",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
]
]
},
"layeredRows": {
"00000000-0000-0000-0000-000000000401": [
[
"1",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"1",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
],
[
"2",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"2",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
]
],
"00000000-0000-0000-0000-000000000403": [],
"00000000-0000-0000-0000-000000000407": [
[
"1",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"1",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
],
[
"2",
"02:00:00:00:04:11",
"FF:FF:FF:FF:FF:FF",
"",
"Netzzugang",
"0x806"
],
[
"2",
"10.0.0.1",
"10.0.0.2",
"ARP",
"Vermittlung",
"Suche nach MAC für 10.0.0.2 [op=REQUEST, sender=02:00:00:00:04:11|10.0.0.1, target=FF:FF:FF:FF:FF:FF|10.0.0.2]"
]
]
},
"events": [
[
713,
"sendProbe 10.0.0.2 called"
],
[
6224,
"sendProbe 10.0.0.2 returned ICMP 3/1 from 127.0.0.1"
]
]
}
@@ -0,0 +1,128 @@
{
"seed": 67,
"nodes": [
{
"id": "00000000-0000-0000-0000-000000000401",
"kind": "pc",
"ports": [
{
"id": "00000000-0000-0000-0000-000000000411",
"label": "eth0"
}
]
},
{
"id": "00000000-0000-0000-0000-000000000403",
"kind": "pc",
"ports": [
{
"id": "00000000-0000-0000-0000-000000000413",
"label": "eth0"
}
]
},
{
"id": "00000000-0000-0000-0000-000000000407",
"kind": "pc",
"ports": [
{
"id": "00000000-0000-0000-0000-000000000417",
"label": "eth0"
}
]
},
{
"id": "00000000-0000-0000-0000-000000000404",
"kind": "networkSwitch",
"ports": [
{
"id": "00000000-0000-0000-0000-000000000441",
"label": "sw1"
},
{
"id": "00000000-0000-0000-0000-000000000442",
"label": "sw2"
},
{
"id": "00000000-0000-0000-0000-000000000443",
"label": "sw3"
}
]
},
{
"id": "00000000-0000-0000-0000-000000000405",
"kind": "remoteLink",
"ports": [
{
"id": "00000000-0000-0000-0000-000000000451",
"label": "remote0"
}
]
},
{
"id": "00000000-0000-0000-0000-000000000406",
"kind": "remoteLink",
"ports": [
{
"id": "00000000-0000-0000-0000-000000000461",
"label": "remote0"
}
]
}
],
"links": [
{
"id": "00000000-0000-0000-0000-00000000F401",
"sourceNode": "00000000-0000-0000-0000-000000000401",
"sourcePort": "00000000-0000-0000-0000-000000000411",
"targetNode": "00000000-0000-0000-0000-000000000404",
"targetPort": "00000000-0000-0000-0000-000000000441"
},
{
"id": "00000000-0000-0000-0000-00000000F402",
"sourceNode": "00000000-0000-0000-0000-000000000407",
"sourcePort": "00000000-0000-0000-0000-000000000417",
"targetNode": "00000000-0000-0000-0000-000000000404",
"targetPort": "00000000-0000-0000-0000-000000000442"
},
{
"id": "00000000-0000-0000-0000-00000000F403",
"sourceNode": "00000000-0000-0000-0000-000000000404",
"sourcePort": "00000000-0000-0000-0000-000000000443",
"targetNode": "00000000-0000-0000-0000-000000000405",
"targetPort": "00000000-0000-0000-0000-000000000451"
},
{
"id": "00000000-0000-0000-0000-00000000F404",
"sourceNode": "00000000-0000-0000-0000-000000000406",
"sourcePort": "00000000-0000-0000-0000-000000000461",
"targetNode": "00000000-0000-0000-0000-000000000403",
"targetPort": "00000000-0000-0000-0000-000000000413"
}
],
"devices": {
"00000000-0000-0000-0000-000000000401": {
"ip": "10.0.0.1",
"mask": "255.255.255.0"
},
"00000000-0000-0000-0000-000000000403": {
"ip": "10.0.0.2",
"mask": "255.255.255.0"
},
"00000000-0000-0000-0000-000000000407": {
"ip": "10.0.0.3",
"mask": "255.255.255.0"
}
},
"modems": {
"00000000-0000-0000-0000-000000000405": {
"mode": "server",
"port": 12345
},
"00000000-0000-0000-0000-000000000406": {
"mode": "client",
"port": 12345
}
},
"steps": []
}