feat(core): packet capture per card after Java's Lauscher, measured card by card

The engine keeps Java's packet capture (capture.ts): per network card
every frame it sent (when it leaves on the cable) or received (also one
for another card), once, with time and number; switches log nothing;
frames the packet loss dropped are kept apart; the capture outlives a
stop and a new start, as in Java, until clearCapture. Per port instead
of per MAC, at most 10,000 frames a card.

expectSameCaptures compares each card's capture with Java's list of that
card in the ARP, WLAN, DNS, TCP, NAT, RIP and single-client DHCP runs.
It found that ScenarioNetwork ignored a switch's learning time (Java ran
300 s, the core the scenarios' 5 s); the oracle sets it now, and the TCP
and DHCP runs are recorded again. A core test found that a new start
numbers frames from 1 again and the capture took them as seen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 08:53:37 +00:00
co-authored by Claude Opus 5.5
parent 65ccd9ddd7
commit 088b62469f
24 changed files with 796 additions and 344 deletions
@@ -2,7 +2,7 @@
"frames": {
"00000000-0000-0000-0000-000000000101": [
{
"time": 455,
"time": 454,
"source": "02:00:00:00:01:12",
"destination": "FF:FF:FF:FF:FF:FF",
"sourceIp": "0.0.0.0",
@@ -67,7 +67,7 @@
],
"00000000-0000-0000-0000-000000000102": [
{
"time": 333,
"time": 332,
"source": "02:00:00:00:01:12",
"destination": "FF:FF:FF:FF:FF:FF",
"sourceIp": "0.0.0.0",
@@ -97,7 +97,7 @@
"targetIp": "192.168.0.100"
},
{
"time": 627,
"time": 628,
"source": "02:00:00:00:01:13",
"destination": "FF:FF:FF:FF:FF:FF",
"sourceIp": "192.168.0.30",
@@ -119,7 +119,7 @@
"payload": "DHCPREQUEST\nyiaddr=0.0.0.0\nchaddr=02:00:00:00:01:12\nrequested=192.168.0.100\nserverident=192.168.0.10"
},
{
"time": 3547,
"time": 3546,
"source": "02:00:00:00:01:11",
"destination": "FF:FF:FF:FF:FF:FF",
"sourceIp": "192.168.0.10",
@@ -132,7 +132,7 @@
],
"00000000-0000-0000-0000-000000000103": [
{
"time": 455,
"time": 454,
"source": "02:00:00:00:01:12",
"destination": "FF:FF:FF:FF:FF:FF",
"sourceIp": "0.0.0.0",
@@ -184,7 +184,7 @@
"payload": "DHCPREQUEST\nyiaddr=0.0.0.0\nchaddr=02:00:00:00:01:12\nrequested=192.168.0.100\nserverident=192.168.0.10"
},
{
"time": 3547,
"time": 3546,
"source": "02:00:00:00:01:11",
"destination": "FF:FF:FF:FF:FF:FF",
"sourceIp": "192.168.0.10",