test(core): RIP measured with Java FILIUS

RipRun runs rip-chain's three routers in Java FILIUS, each router's random
set by reflection to the core's ripSeed, and writes the frames, every
change of each RIP table and the calls. converge: the tables fill, a ping
at 45 s. expire: R3 falls silent at 10 s; R2 marks its network 16 hops only
at its own next beacon, R1 passes it on at once, the ping gets ICMP 3/0.
Both match: per sending card the same messages at the same times, every
table through the same states. The first 5 s are compared by the state the
tables reach, since Java's routers start one after the other.

Measured on the JDK: Java's pause divides nextFloat() by 3 in float; the
core does too now (a millisecond off in one draw of about 10,000 before).
Scenarios name their RIP routers in the new field rip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 19:41:56 +00:00
co-authored by Claude Opus 5.5
parent a4036f12a3
commit 37f5d77477
12 changed files with 1695 additions and 6 deletions
@@ -22,6 +22,7 @@ import filius.software.dhcp.DHCPServer;
import filius.software.dns.DNSServer;
import filius.software.netzzugangsschicht.EthernetFrame;
import filius.software.system.InternetKnotenBetriebssystem;
import filius.software.system.VermittlungsrechnerBetriebssystem;
import filius.software.transportschicht.Segment;
import filius.software.transportschicht.TcpSegment;
import filius.software.vermittlungsschicht.ArpPaket;
@@ -58,6 +59,14 @@ public class ScenarioNetwork {
return network;
}
/** The scenario's seed. */
@SuppressWarnings("unchecked")
static long seed(String path) throws Exception {
Map<String, Object> scenario = (Map<String, Object>) new JsonReader(
new String(Files.readAllBytes(Paths.get(path)), StandardCharsets.UTF_8)).value();
return ((Number) scenario.get("seed")).longValue();
}
private void build(Map<String, Object> scenario) {
Map<String, Port> ports = new HashMap<>();
Map<String, NetzwerkInterface> nicsByPort = new HashMap<>();
@@ -156,6 +165,9 @@ public class ScenarioNetwork {
for (Object each : list(scenario.getOrDefault("dhcpClients", new ArrayList<>()))) {
system(nodes.get((String) each)).setDHCPKonfiguration(true);
}
for (Object each : list(scenario.getOrDefault("rip", new ArrayList<>()))) {
((VermittlungsrechnerBetriebssystem) system(nodes.get((String) each))).setRipEnabled(true);
}
}