diff --git a/CHANGES.md b/CHANGES.md index 9701fce..d31a662 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -35,6 +35,7 @@ Swift-Pfade relativ zu `filius-ipad/ios/FiliusPad/TopologyEditor/` (Stand | `src/javabeans.ts`, `src/javaDefaults.json` | — | neu: XMLEncoder-Leser nach den Regeln von `java.beans.XMLDecoder` (Swift liest elementweise und verliert geteilte Werte); Getter-Standardwerte und statische Konstanten mit `tools/java-oracle` gemessen | | `src/importProject.ts` | `Persistence/TopologyProjectStore.swift` (Knoten, Ports, Kabel, IP-Konfiguration, Doku-Elemente des Imports) | übertragen, Eingabe ist Javas Sicht: Name und Port-Anzahl wie Java, abgelehnte Adresse → Swift-Standard; gegen Swifts importiertes Modell auf 13 Dateien geprüft | | `test/importProject.test.ts` | — | neu: Swifts importiertes Modell (13 Dateien, zwei begründete Abweichungen), Vollständigkeit aller 23, Ping über den Router im Kern | +| `src/systemSoftware.ts` | Java `SwitchFirmware`, `Betriebssystem`, `VermittlungsrechnerBetriebssystem`, `GatewayFirmware`, `Weiterleitungstabelle`, `Firewall`, `FirewallRule` | neu nach Java: SSID, Lernzeit, RIP, manuelle Routen, Router-Firewall (an allen Stellen, an denen die Datei sie erreicht); gegen Java geprüft | | `src/javaIp.ts` | Java `IP.inetAton`/`ipCheck` | neu nach Java; an 46 Fällen mit Java gemessen | | `src/topology.ts` | Java `SzenarioVerwaltung.netzwerkLaden`, Konstruktoren und Setter der Geräte; Swift `Persistence/TopologyProjectStore.swift` (Parser) als Vergleich | neu nach Java statt Übertragung: Geräteart aus der Klasse statt aus der Beschriftung, Geräte ohne Koordinaten bei 0,0 statt verworfen, Werte durch Javas Setter | | `test/javabeans.test.ts` | — | neu: je XMLDecoder-Regel ein Test; alle 23 Korpus-Dateien, Klasse und Position jedes Geräts wie Java | diff --git a/corpus/corpus.java.json b/corpus/corpus.java.json index ce82209..a65bf41 100644 --- a/corpus/corpus.java.json +++ b/corpus/corpus.java.json @@ -22,7 +22,11 @@ "gateway": "192.168.0.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": "MyWiFi", + "manualRoutes": [] + } }, { "class": "Gateway", @@ -49,7 +53,18 @@ "gateway": "42.0.0.1", "dns": "" } - ] + ], + "system": { + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -83,7 +98,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Rechner", @@ -105,7 +132,11 @@ "gateway": "160.10.20.1", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -127,7 +158,11 @@ "gateway": "8.8.8.1", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -149,7 +184,11 @@ "gateway": "192.168.0.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": "MyWiFi", + "manualRoutes": [] + } }, { "class": "Switch", @@ -186,7 +225,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "MyWiFi", + "retentionTime": 300000 + } } ], "cables": [ @@ -554,7 +597,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Rechner", @@ -576,7 +623,11 @@ "gateway": "141.99.5.1", "dns": "141.99.5.12" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -598,7 +649,11 @@ "gateway": "141.99.5.1", "dns": "141.99.5.12" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -620,7 +675,11 @@ "gateway": "141.99.5.1", "dns": "141.99.5.12" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -642,7 +701,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -679,7 +742,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Rechner", @@ -701,7 +768,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -723,7 +794,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } } ], "cables": [ @@ -859,7 +934,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Switch", @@ -896,7 +975,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Rechner", @@ -918,7 +1001,11 @@ "gateway": "141.99.2.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -940,7 +1027,11 @@ "gateway": "141.99.1.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -962,7 +1053,11 @@ "gateway": "", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Vermittlungsrechner", @@ -989,7 +1084,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": false, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } } ], "cables": [ @@ -1084,7 +1191,11 @@ "gateway": "10.0.0.1", "dns": "10.0.0.1" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -1121,7 +1232,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "[ausgeschaltet]", + "retentionTime": 300000 + } }, { "class": "Notebook", @@ -1143,7 +1258,11 @@ "gateway": "10.0.0.1", "dns": "10.0.0.1" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Vermittlungsrechner", @@ -1177,7 +1296,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -1218,7 +1349,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -1252,7 +1395,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -1300,7 +1455,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -1334,7 +1501,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -1361,7 +1540,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Rechner", @@ -1383,7 +1574,11 @@ "gateway": "8.0.0.1", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -1405,7 +1600,11 @@ "gateway": "120.130.140.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -1427,7 +1626,11 @@ "gateway": "130.100.200.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -1449,7 +1652,11 @@ "gateway": "140.100.200.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -1471,7 +1678,11 @@ "gateway": "10.0.0.2", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Gateway", @@ -1498,7 +1709,18 @@ "gateway": "43.0.0.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Notebook", @@ -1520,7 +1742,11 @@ "gateway": "192.168.1.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -1542,7 +1768,11 @@ "gateway": "10.0.0.1", "dns": "10.0.0.1" } - ] + ], + "system": { + "ssid": "MyWiFiNetwork", + "manualRoutes": [] + } }, { "class": "Notebook", @@ -1564,7 +1794,11 @@ "gateway": "10.0.0.1", "dns": "10.0.0.1" } - ] + ], + "system": { + "ssid": "MyWiFiNetwork", + "manualRoutes": [] + } }, { "class": "Notebook", @@ -1586,7 +1820,11 @@ "gateway": "10.0.0.1", "dns": "10.0.0.1" } - ] + ], + "system": { + "ssid": "MyWiFiNetwork", + "manualRoutes": [] + } }, { "class": "Notebook", @@ -1608,7 +1846,11 @@ "gateway": "10.0.0.1", "dns": "10.0.0.1" } - ] + ], + "system": { + "ssid": "MyWiFiNetwork", + "manualRoutes": [] + } }, { "class": "Switch", @@ -1645,7 +1887,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "MyWiFiNetwork", + "retentionTime": 300000 + } }, { "class": "Gateway", @@ -1672,7 +1918,73 @@ "gateway": "42.0.0.1", "dns": "" } - ] + ], + "system": { + "manualRoutes": [], + "firewall": { + "activated": true, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [ + [ + "10.10.20.0", + "255.255.255.0", + "", + "", + -1, + -1, + 1 + ], + [ + "10.50.50.0", + "255.255.255.0", + "", + "", + -1, + -1, + 0 + ], + [ + "10.0.0.1", + "255.255.255.255", + "", + "", + -1, + -1, + 1 + ], + [ + "", + "", + "10.0.0.1", + "255.255.255.255", + -1, + -1, + 1 + ], + [ + "8.8.8.8", + "255.255.255.255", + "", + "", + -1, + -1, + 1 + ], + [ + "", + "", + "42.0.0.10", + "255.255.255.255", + -1, + -1, + 1 + ] + ] + } + } }, { "class": "Vermittlungsrechner", @@ -1699,7 +2011,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Rechner", @@ -1721,7 +2045,11 @@ "gateway": "43.0.0.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -1758,7 +2086,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "[ausgeschaltet]", + "retentionTime": 300000 + } } ], "cables": [ @@ -2401,7 +2733,11 @@ "gateway": "10.0.0.1", "dns": "10.0.0.1" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -2438,7 +2774,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "[ausgeschaltet]", + "retentionTime": 300000 + } }, { "class": "Notebook", @@ -2460,7 +2800,11 @@ "gateway": "10.0.0.1", "dns": "10.0.0.1" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Vermittlungsrechner", @@ -2494,7 +2838,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -2535,7 +2891,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -2569,7 +2937,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -2617,7 +2997,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -2651,7 +3043,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -2678,7 +3082,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Rechner", @@ -2700,7 +3116,11 @@ "gateway": "8.0.0.1", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -2722,7 +3142,11 @@ "gateway": "120.130.140.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -2744,7 +3168,11 @@ "gateway": "130.100.200.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -2766,7 +3194,11 @@ "gateway": "140.100.200.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -2788,7 +3220,11 @@ "gateway": "10.0.0.2", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Gateway", @@ -2815,7 +3251,18 @@ "gateway": "43.0.0.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Notebook", @@ -2837,7 +3284,11 @@ "gateway": "192.168.1.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -2859,7 +3310,11 @@ "gateway": "10.0.0.1", "dns": "10.0.0.1" } - ] + ], + "system": { + "ssid": "MyWiFiNetwork", + "manualRoutes": [] + } }, { "class": "Notebook", @@ -2881,7 +3336,11 @@ "gateway": "10.0.0.1", "dns": "10.0.0.1" } - ] + ], + "system": { + "ssid": "MyWiFiNetwork", + "manualRoutes": [] + } }, { "class": "Notebook", @@ -2903,7 +3362,11 @@ "gateway": "10.0.0.1", "dns": "10.0.0.1" } - ] + ], + "system": { + "ssid": "MyWiFiNetwork", + "manualRoutes": [] + } }, { "class": "Notebook", @@ -2925,7 +3388,11 @@ "gateway": "10.0.0.1", "dns": "10.0.0.1" } - ] + ], + "system": { + "ssid": "MyWiFiNetwork", + "manualRoutes": [] + } }, { "class": "Switch", @@ -2962,7 +3429,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "MyWiFiNetwork", + "retentionTime": 300000 + } }, { "class": "Gateway", @@ -2989,7 +3460,73 @@ "gateway": "42.0.0.1", "dns": "" } - ] + ], + "system": { + "manualRoutes": [], + "firewall": { + "activated": true, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [ + [ + "10.10.20.0", + "255.255.255.0", + "", + "", + -1, + -1, + 1 + ], + [ + "10.50.50.0", + "255.255.255.0", + "", + "", + -1, + -1, + 0 + ], + [ + "10.0.0.1", + "255.255.255.255", + "", + "", + -1, + -1, + 1 + ], + [ + "", + "", + "10.0.0.1", + "255.255.255.255", + -1, + -1, + 1 + ], + [ + "8.8.8.8", + "255.255.255.255", + "", + "", + -1, + -1, + 1 + ], + [ + "", + "", + "42.0.0.10", + "255.255.255.255", + -1, + -1, + 1 + ] + ] + } + } }, { "class": "Vermittlungsrechner", @@ -3016,7 +3553,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Rechner", @@ -3038,7 +3587,11 @@ "gateway": "43.0.0.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -3075,7 +3628,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "[ausgeschaltet]", + "retentionTime": 300000 + } } ], "cables": [ @@ -3676,7 +4233,11 @@ "gateway": "192.168.0.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": "MyWiFi", + "manualRoutes": [] + } }, { "class": "Gateway", @@ -3703,7 +4264,18 @@ "gateway": "42.0.0.1", "dns": "" } - ] + ], + "system": { + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -3737,7 +4309,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Rechner", @@ -3759,7 +4343,11 @@ "gateway": "160.10.20.1", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -3781,7 +4369,11 @@ "gateway": "8.8.8.1", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -3803,7 +4395,11 @@ "gateway": "192.168.0.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": "MyWiFi", + "manualRoutes": [] + } }, { "class": "Switch", @@ -3840,7 +4436,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "MyWiFi", + "retentionTime": 300000 + } } ], "cables": [ @@ -4193,7 +4793,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -4215,7 +4819,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -4252,7 +4860,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Notebook", @@ -4274,7 +4886,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } } ], "cables": [ @@ -4343,7 +4959,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -4365,7 +4985,11 @@ "gateway": "0.0.0.0", "dns": "0.0.0.0" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -4387,7 +5011,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -4424,7 +5052,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "71253f", + "retentionTime": 300000 + } }, { "class": "Notebook", @@ -4446,7 +5078,11 @@ "gateway": "192.168.0.10", "dns": "0.0.0.0" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Gateway", @@ -4473,7 +5109,18 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Rechner", @@ -4495,7 +5142,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } } ], "cables": [ @@ -4605,7 +5256,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Rechner", @@ -4627,7 +5282,11 @@ "gateway": "141.99.5.1", "dns": "141.99.5.12" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -4649,7 +5308,11 @@ "gateway": "141.99.5.1", "dns": "141.99.5.12" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -4671,7 +5334,11 @@ "gateway": "141.99.5.1", "dns": "141.99.5.12" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -4693,7 +5360,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -4730,7 +5401,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Rechner", @@ -4752,7 +5427,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -4774,7 +5453,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } } ], "cables": [ @@ -4895,7 +5578,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -4917,7 +5604,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -4939,7 +5630,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -4961,7 +5656,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -4983,7 +5682,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -5020,7 +5723,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Notebook", @@ -5042,7 +5749,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -5064,7 +5775,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -5086,7 +5801,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -5108,7 +5827,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -5145,7 +5868,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Switch", @@ -5182,7 +5909,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } } ], "cables": [ @@ -5355,7 +6086,11 @@ "gateway": "", "dns": "141.99.50.230" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -5377,7 +6112,11 @@ "gateway": "", "dns": "141.99.50.230" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -5399,7 +6138,11 @@ "gateway": "", "dns": "141.99.50.230" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -5421,7 +6164,11 @@ "gateway": "", "dns": "141.99.50.230" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -5443,7 +6190,11 @@ "gateway": "", "dns": "141.99.50.230" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -5480,7 +6231,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Rechner", @@ -5502,7 +6257,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -5524,7 +6283,11 @@ "gateway": "", "dns": "141.99.50.230" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -5546,7 +6309,11 @@ "gateway": "", "dns": "141.99.50.230" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } } ], "cables": [ @@ -5695,7 +6462,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Switch", @@ -5732,7 +6503,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Vermittlungsrechner", @@ -5759,7 +6534,19 @@ "gateway": "141.99.2.2", "dns": "" } - ] + ], + "system": { + "ripEnabled": false, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -5793,7 +6580,32 @@ "gateway": "141.99.4.2", "dns": "" } - ] + ], + "system": { + "ripEnabled": false, + "manualRoutes": [ + [ + "141.99.1.0", + "255.255.255.0", + "141.99.2.1", + "141.99.2.2" + ], + [ + "141.99.5.0", + "255.255.255.0", + "141.99.4.2", + "141.99.4.1" + ] + ], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -5820,7 +6632,19 @@ "gateway": "141.99.4.1", "dns": "" } - ] + ], + "system": { + "ripEnabled": false, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Switch", @@ -5857,7 +6681,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Rechner", @@ -5879,7 +6707,11 @@ "gateway": "141.99.2.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -5901,7 +6733,11 @@ "gateway": "141.99.1.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -5923,7 +6759,11 @@ "gateway": "", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -5945,7 +6785,11 @@ "gateway": "141.99.3.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -5967,7 +6811,11 @@ "gateway": "141.99.5.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -5989,7 +6837,11 @@ "gateway": "141.99.4.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -6026,7 +6878,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Notebook", @@ -6048,7 +6904,11 @@ "gateway": "141.99.5.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } } ], "cables": [ @@ -6247,7 +7107,11 @@ "gateway": "", "dns": "141.99.50.230" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -6269,7 +7133,11 @@ "gateway": "", "dns": "127.0.0.1" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -6291,7 +7159,11 @@ "gateway": "", "dns": "141.99.50.230" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -6328,7 +7200,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "6e23d8", + "retentionTime": 300000 + } }, { "class": "Rechner", @@ -6350,7 +7226,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -6372,7 +7252,11 @@ "gateway": "", "dns": "141.99.50.230" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -6394,7 +7278,11 @@ "gateway": "", "dns": "141.99.50.230" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } } ], "cables": [ @@ -6562,7 +7450,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -6584,7 +7476,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Modem", @@ -6598,7 +7494,8 @@ ], "ports": [ {} - ] + ], + "system": {} }, { "class": "Modem", @@ -6612,7 +7509,8 @@ ], "ports": [ {} - ] + ], + "system": {} } ], "cables": [ @@ -6668,7 +7566,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -6690,7 +7592,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": "Filius Wi Fi", + "manualRoutes": [] + } }, { "class": "Notebook", @@ -6712,7 +7618,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": "Filius Wi Fi", + "manualRoutes": [] + } }, { "class": "Switch", @@ -6749,7 +7659,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "Filius Wi Fi", + "retentionTime": 2000 + } } ], "cables": [ @@ -6823,7 +7737,18 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Rechner", @@ -6845,7 +7770,11 @@ "gateway": "192.168.0.1", "dns": "192.168.0.1" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -6867,7 +7796,11 @@ "gateway": "192.168.0.1", "dns": "192.168.0.1" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -6904,7 +7837,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "082368", + "retentionTime": 300000 + } } ], "cables": [ @@ -6988,7 +7925,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "9b063a", + "retentionTime": 300000 + } }, { "class": "Switch", @@ -7025,7 +7966,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "a4e955", + "retentionTime": 300000 + } }, { "class": "Vermittlungsrechner", @@ -7052,7 +7997,19 @@ "gateway": "141.99.2.2", "dns": "" } - ] + ], + "system": { + "ripEnabled": false, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -7086,7 +8043,32 @@ "gateway": "141.99.4.2", "dns": "" } - ] + ], + "system": { + "ripEnabled": false, + "manualRoutes": [ + [ + "141.99.1.0", + "255.255.255.0", + "141.99.2.1", + "141.99.2.2" + ], + [ + "141.99.5.0", + "255.255.255.0", + "141.99.4.2", + "141.99.4.1" + ] + ], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Vermittlungsrechner", @@ -7113,7 +8095,19 @@ "gateway": "141.99.4.1", "dns": "" } - ] + ], + "system": { + "ripEnabled": false, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Rechner", @@ -7135,7 +8129,11 @@ "gateway": "141.99.2.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -7157,7 +8155,11 @@ "gateway": "192.168.0.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -7179,7 +8181,11 @@ "gateway": "192.168.0.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -7201,7 +8207,11 @@ "gateway": "141.99.4.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -7223,7 +8233,11 @@ "gateway": "192.168.0.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -7260,7 +8274,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "8b0798", + "retentionTime": 300000 + } }, { "class": "Notebook", @@ -7282,7 +8300,11 @@ "gateway": "192.168.0.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Gateway", @@ -7309,7 +8331,18 @@ "gateway": "141.99.5.1", "dns": "" } - ] + ], + "system": { + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Gateway", @@ -7336,7 +8369,18 @@ "gateway": "141.99.1.1", "dns": "" } - ] + ], + "system": { + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Switch", @@ -7373,7 +8417,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "f1dc45", + "retentionTime": 300000 + } } ], "cables": [ @@ -7778,7 +8826,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "52fd3f", + "retentionTime": 300000 + } }, { "class": "Notebook", @@ -7800,7 +8852,11 @@ "gateway": "192.168.0.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -7822,7 +8878,11 @@ "gateway": "192.168.0.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Gateway", @@ -7849,7 +8909,18 @@ "gateway": "", "dns": "0.0.0.0" } - ] + ], + "system": { + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Switch", @@ -7886,7 +8957,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "5e7d40", + "retentionTime": 300000 + } }, { "class": "Rechner", @@ -7908,7 +8983,11 @@ "gateway": "141.99.2.1", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } } ], "cables": [ @@ -8158,7 +9237,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "bfc600", + "retentionTime": 300000 + } }, { "class": "Notebook", @@ -8180,7 +9263,11 @@ "gateway": "192.168.0.1", "dns": "42.0.0.2" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -8202,7 +9289,11 @@ "gateway": "192.168.0.1", "dns": "42.0.0.2" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Gateway", @@ -8229,7 +9320,18 @@ "gateway": "42.0.0.1", "dns": "0.0.0.0" } - ] + ], + "system": { + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Switch", @@ -8266,7 +9368,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": "[ausgeschaltet]", + "retentionTime": 300000 + } }, { "class": "Rechner", @@ -8288,7 +9394,11 @@ "gateway": "42.0.0.1", "dns": "8.8.8.8" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Vermittlungsrechner", @@ -8322,7 +9432,19 @@ "gateway": "1.0.0.1", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } }, { "class": "Rechner", @@ -8344,7 +9466,11 @@ "gateway": "120.130.140.1", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -8366,7 +9492,11 @@ "gateway": "8.8.8.1", "dns": "127.0.0.1" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Vermittlungsrechner", @@ -8400,7 +9530,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": true, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } } ], "cables": [ @@ -8742,7 +9884,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -8764,7 +9910,11 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -8801,7 +9951,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } } ], "cables": [ @@ -8872,7 +10026,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Switch", @@ -8909,7 +10067,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Rechner", @@ -8931,7 +10093,11 @@ "gateway": "141.99.2.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -8953,7 +10119,11 @@ "gateway": "141.99.1.1", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -8975,7 +10145,11 @@ "gateway": "", "dns": "141.99.2.10" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Vermittlungsrechner", @@ -9002,7 +10176,19 @@ "gateway": "", "dns": "" } - ] + ], + "system": { + "ripEnabled": false, + "manualRoutes": [], + "firewall": { + "activated": false, + "defaultPolicy": 0, + "dropICMP": false, + "filterSYNSegmentsOnly": true, + "filterUdp": true, + "rules": [] + } + } } ], "cables": [ @@ -9097,7 +10283,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -9119,7 +10309,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -9141,7 +10335,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -9163,7 +10361,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Rechner", @@ -9185,7 +10387,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -9222,7 +10428,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Notebook", @@ -9244,7 +10454,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -9266,7 +10480,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -9288,7 +10506,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Notebook", @@ -9310,7 +10532,11 @@ "gateway": "", "dns": "192.168.0.100" } - ] + ], + "system": { + "ssid": null, + "manualRoutes": [] + } }, { "class": "Switch", @@ -9347,7 +10573,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } }, { "class": "Switch", @@ -9384,7 +10614,11 @@ {}, {}, {} - ] + ], + "system": { + "ssid": null, + "retentionTime": 300000 + } } ], "cables": [ diff --git a/packages/fls/src/javabeans.ts b/packages/fls/src/javabeans.ts index f8304d9..5b93fb7 100644 --- a/packages/fls/src/javabeans.ts +++ b/packages/fls/src/javabeans.ts @@ -53,6 +53,11 @@ export interface JavaObject { * result. `add`/`set` go to `calls`, in order. */ readonly presetElements: Map; + /** + * The same for a map: entries its constructor made (a router's installed + * applications), reached by `key`. + */ + readonly presetEntries: Map; /** True when the object was not in the file but returned by a getter. */ readonly fromGetter: boolean; } @@ -139,12 +144,21 @@ function replayList(value: JavaObject, constructed: number): (JavaValue | undefi return items; } -/** The entries of a map: `put` calls in order. */ +/** + * The entries of a map: the ones its constructor made, then `put` calls in + * order — a later `put` of the same key replaces the value in place. + */ export function mapEntries(value: JavaValue | undefined): [JavaValue, JavaValue][] { if (!isJavaObject(value)) return []; - return value.calls - .filter((call) => call.method === 'put') - .map((call) => [call.args[0] ?? null, call.args[1] ?? null] as [JavaValue, JavaValue]); + const entries: [JavaValue, JavaValue][] = [...value.presetEntries]; + for (const call of value.calls) { + if (call.method !== 'put') continue; + const key = call.args[0] ?? null; + const existing = entries.find(([entryKey]) => entryKey === key); + if (existing === undefined) entries.push([key, call.args[1] ?? null]); + else existing[1] = call.args[1] ?? null; + } + return entries; } // ── XML tree ─────────────────────────────────────────────────────────────── @@ -226,6 +240,7 @@ function newObject(fields: Partial & { className: string }): JavaObj properties: new Map(), calls: [], presetElements: new Map(), + presetEntries: new Map(), fromGetter: fields.fromGetter ?? false, }; } @@ -412,6 +427,7 @@ class Decoder { if (isJavaObject(target)) { target.calls.push({ method, args }); if (method === 'get' && args.length === 1 && typeof args[0] === 'number') return this.getIndex(target, args[0], id); + if (method === 'get' && args.length === 1 && typeof args[0] === 'string') return this.getEntry(target, args[0], id); } return null; } @@ -463,6 +479,18 @@ class Decoder { return placeholder; } + /** + * `map.get(key)`: the value put before, else an entry the map held before + * the file touched it — a placeholder that later reads return. + */ + private getEntry(target: JavaObject, key: string, id: string | undefined): JavaValue { + const put = mapEntries(target).find(([entryKey]) => entryKey === key); + if (put !== undefined) return put[1]; + const placeholder = newObject({ className: id?.replace(/\d+$/, '') ?? 'unknown', id, fromGetter: true }); + target.presetEntries.set(key, placeholder); + return placeholder; + } + private setIndex(target: JavaValue | undefined, index: number, value: JavaValue): JavaValue { if (typeof target === 'object' && target !== null && (target as JavaArray).kind === 'array') { (target as JavaArray).items[index] = value; diff --git a/packages/fls/src/systemSoftware.ts b/packages/fls/src/systemSoftware.ts new file mode 100644 index 0000000..d127dec --- /dev/null +++ b/packages/fls/src/systemSoftware.ts @@ -0,0 +1,198 @@ +// The settings of a node's system software that the topology needs, read as +// Java FILIUS holds them after loading: a switch's SSID and learning time, a +// host's wireless SSID, a router's RIP switch, the manual routes, and the +// firewall of a router or home router. +// Java counterparts: filius.software.system.SwitchFirmware, Betriebssystem, +// VermittlungsrechnerBetriebssystem, GatewayFirmware, InternetKnotenBetriebssystem, +// filius.software.vermittlungsschicht.Weiterleitungstabelle, +// filius.software.firewall.Firewall and FirewallRule. +// +// Checked against Java (corpus.java.json, `system`). DHCP, NAT, the modem, +// file systems and applications are later layers. +// +// A router's firewall is one object its constructor makes and hangs in two +// places: the installed applications and the configuration plug-ins of its +// web server. XMLEncoder writes its settings wherever it meets it first — +// in the corpus, under the web server's `konfig` plug-in. The decoder does +// not know Java's constructors and sees a placeholder per path; they are +// merged here. + +import { isJavaObject, isUnresolved, listItems, mapEntries, type JavaObject, type JavaValue } from './javabeans.js'; +import type { FlsNodeClass } from './topology.js'; + +export interface FlsFirewallRule { + srcIP: string | null; + srcMask: string | null; + destIP: string | null; + destMask: string | null; + /** A port, or -1 for all. */ + port: number; + /** -1 all, 1 ICMP, 6 TCP, 17 UDP. */ + protocol: number; + /** 0 drop, 1 accept. */ + action: number; +} + +export interface FlsFirewall { + activated: boolean; + /** 0 drop, 1 accept. */ + defaultPolicy: number; + dropICMP: boolean; + filterSYNSegmentsOnly: boolean; + filterUdp: boolean; + rules: FlsFirewallRule[]; +} + +export interface FlsSystemSoftware { + /** + * Switch: its SSID, undefined when the file has none (Java rolls one). + * Rechner, Notebook: the wireless network it joins, null for none. + */ + ssid?: string | null | undefined; + /** Switch: how long it keeps a learned MAC address, in milliseconds. */ + retentionTime?: number; + /** Vermittlungsrechner. */ + ripEnabled?: boolean; + /** Every node with an IP stack: rows of destination, mask, gateway, interface address — as the file has them. */ + manualRoutes?: (string | null)[][]; + /** Vermittlungsrechner, Gateway. */ + firewall?: FlsFirewall; +} + +type Warn = (message: string) => void; + +const FIREWALL_CLASS = 'filius.software.firewall.Firewall'; +const WEB_SERVER_CLASS = 'filius.software.www.WebServer'; + +export function readSystemSoftware(device: JavaObject, javaClass: FlsNodeClass, warn: Warn): FlsSystemSoftware { + const system = device.properties.get('systemSoftware'); + const software = isJavaObject(system) ? system : undefined; + const value = (property: string) => software?.properties.get(property); + const result: FlsSystemSoftware = {}; + + switch (javaClass) { + case 'Switch': + result.ssid = optionalString(value('SSID'), 'SSID', warn); + result.retentionTime = integer(value('retentionTime'), 300_000, 'retentionTime', warn); + break; + case 'Rechner': + case 'Notebook': + result.ssid = optionalString(value('ssid'), 'ssid', warn) ?? null; + break; + case 'Vermittlungsrechner': + result.ripEnabled = boolean(value('ripEnabled'), false, 'ripEnabled', warn); + break; + case 'Gateway': + case 'Modem': + break; + } + if (javaClass !== 'Switch' && javaClass !== 'Modem') { + result.manualRoutes = manualRoutes(value('weiterleitungstabelle'), warn); + } + if (javaClass === 'Vermittlungsrechner' || javaClass === 'Gateway') { + result.firewall = firewall(software, warn); + } + return result; +} + +function manualRoutes(table: JavaValue | undefined, warn: Warn): (string | null)[][] { + if (table === undefined || table === null) return []; + if (!isJavaObject(table)) { + warn(`weiterleitungstabelle is ${describe(table)}, ignored`); + return []; + } + return listItems(table.properties.get('manuelleTabelle')).map((row) => + listItems(row).map((cell) => (typeof cell === 'string' || cell === null ? cell : null)), + ); +} + +/** Every object the file reaches the router's one firewall by. */ +function firewallObjects(software: JavaObject | undefined): JavaObject[] { + const found: JavaObject[] = []; + const applications = new Map(mapEntries(software?.properties.get('installierteAnwendungen'))); + const installed = applications.get(FIREWALL_CLASS); + if (isJavaObject(installed)) found.push(installed); + const webServer = applications.get(WEB_SERVER_CLASS); + if (isJavaObject(webServer)) { + for (const [, plugin] of mapEntries(webServer.properties.get('plugins'))) { + const pluginFirewall = isJavaObject(plugin) ? plugin.properties.get('firewall') : undefined; + if (isJavaObject(pluginFirewall) && !found.includes(pluginFirewall)) found.push(pluginFirewall); + } + } + return found; +} + +/** The firewall as the router's constructor leaves it (off, drop), then the file's settings. */ +function firewall(software: JavaObject | undefined, warn: Warn): FlsFirewall { + const properties = new Map(); + for (const object of firewallObjects(software)) { + for (const [property, value] of object.properties) { + if (properties.has(property) && properties.get(property) !== value) { + warn(`firewall: ${property} is set in two places, the later one is used`); + } + properties.set(property, value); + } + } + const at = (property: string) => properties.get(property); + // setAllowRelatedPackets is the old name of setFilterSYNSegmentsOnly. + const filterSyn = at('filterSYNSegmentsOnly') ?? at('allowRelatedPackets'); + return { + activated: boolean(at('activated'), false, 'firewall activated', warn), + defaultPolicy: integer(at('defaultPolicy'), 0, 'firewall defaultPolicy', warn), + dropICMP: boolean(at('dropICMP'), false, 'firewall dropICMP', warn), + filterSYNSegmentsOnly: boolean(filterSyn, true, 'firewall filterSYNSegmentsOnly', warn), + filterUdp: boolean(at('filterUdp'), true, 'firewall filterUdp', warn), + rules: listItems(at('ruleset')).flatMap((rule) => (isJavaObject(rule) ? [firewallRule(rule, warn)] : [])), + }; +} + +/** + * FirewallRule: public fields set one by one (`getField(name).set`), or the + * seven-argument constructor. Defaults: all addresses empty, all ports, TCP, + * drop. + */ +function firewallRule(rule: JavaObject, warn: Warn): FlsFirewallRule { + const [srcIP, srcMask, destIP, destMask, port, protocol, action] = rule.args.length === 7 ? rule.args : []; + const field = (name: string, fromConstructor: JavaValue | undefined) => rule.properties.get(name) ?? fromConstructor; + const text = (name: string, fromConstructor: JavaValue | undefined) => { + const value = field(name, fromConstructor) ?? ''; + if (typeof value === 'string' || value === null) return value; + warn(`firewall rule: ${name} is ${describe(value)}, used ""`); + return ''; + }; + return { + srcIP: text('srcIP', srcIP), + srcMask: text('srcMask', srcMask), + destIP: text('destIP', destIP), + destMask: text('destMask', destMask), + port: integer(field('port', port), -1, 'firewall rule port', warn), + protocol: integer(field('protocol', protocol), 6, 'firewall rule protocol', warn), + action: integer(field('action', action), 0, 'firewall rule action', warn), + }; +} + +function optionalString(value: JavaValue | undefined, name: string, warn: Warn): string | null | undefined { + if (value === undefined || value === null || typeof value === 'string') return value; + warn(`${name} is ${describe(value)}, ignored`); + return undefined; +} + +function boolean(value: JavaValue | undefined, fallback: boolean, name: string, warn: Warn): boolean { + if (value === undefined) return fallback; + if (typeof value === 'boolean') return value; + warn(`${name} is ${describe(value)}, used ${fallback}`); + return fallback; +} + +function integer(value: JavaValue | undefined, fallback: number, name: string, warn: Warn): number { + if (value === undefined) return fallback; + if (typeof value === 'number' && Number.isInteger(value)) return value; + warn(`${name} is ${describe(value)}, used ${fallback}`); + return fallback; +} + +function describe(value: JavaValue): string { + if (isUnresolved(value)) return `unresolved (${value.reason})`; + if (isJavaObject(value)) return `an object of ${value.className}`; + return typeof value === 'bigint' ? `${value}` : JSON.stringify(value); +} diff --git a/packages/fls/src/topology.ts b/packages/fls/src/topology.ts index 2f234fd..5697e5c 100644 --- a/packages/fls/src/topology.ts +++ b/packages/fls/src/topology.ts @@ -1,8 +1,8 @@ // The network drawn in a .fls file — devices, cables, documentation items — // read from the decoded JavaBeans graph (javabeans.ts) the way Java FILIUS -// loads it (SzenarioVerwaltung.netzwerkLaden). Only the topology: system -// software, file systems and applications are later layers, which start -// from `FlsNode.source`. +// loads it (SzenarioVerwaltung.netzwerkLaden), with the system software +// settings the topology needs (systemSoftware.ts). File systems and +// applications are later layers, which start from `FlsNode.source`. // // The result is Java's view, indexed like Java's lists, and is checked // against Java itself (corpus.java.json). The editor model (node kinds, UUIDs, @@ -19,6 +19,7 @@ import { isJavaObject, isUnresolved, listItems, simpleClassName, type JavaObject, type JavaValue } from './javabeans.js'; import { javaIpCheck } from './javaIp.js'; +import { readSystemSoftware, type FlsSystemSoftware } from './systemSoftware.js'; export type FlsNodeClass = 'Rechner' | 'Notebook' | 'Switch' | 'Vermittlungsrechner' | 'Gateway' | 'Modem'; @@ -44,6 +45,8 @@ export interface FlsNode { interfaces: FlsInterface[]; /** Interfaces, or the ports of a Switch or Modem. */ portCount: number; + /** SSIDs, routes, RIP, firewall (systemSoftware.ts). */ + system: FlsSystemSoftware; /** The node's JavaBean (`filius.hardware.knoten.*`), for the software layers. */ source: JavaObject; } @@ -191,6 +194,9 @@ class Reader { useMacAsName: info.host && this.booleanProperty(device, 'useMACAsName', `node ${itemIndex + 1}`), interfaces: [], portCount: 0, + system: readSystemSoftware(device, simpleName, (message) => + this.warnings.push(`node ${itemIndex + 1}: ${message}`), + ), source: device, }; diff --git a/packages/fls/test/importProject.test.ts b/packages/fls/test/importProject.test.ts index 9ea675d..ff2b7f8 100644 --- a/packages/fls/test/importProject.test.ts +++ b/packages/fls/test/importProject.test.ts @@ -214,8 +214,9 @@ function flsNode(javaClass: FlsNode['javaClass'], fields: Partial = {}) useMacAsName: false, interfaces: [], portCount: 0, + system: {}, source: { kind: 'object', className: javaClass, id: undefined, args: [], staticField: undefined, - factoryMethod: undefined, properties: new Map(), calls: [], presetElements: new Map(), fromGetter: false }, + factoryMethod: undefined, properties: new Map(), calls: [], presetElements: new Map(), presetEntries: new Map(), fromGetter: false }, ...fields, }; } diff --git a/packages/fls/test/javabeans.test.ts b/packages/fls/test/javabeans.test.ts index d095d07..5deef27 100644 --- a/packages/fls/test/javabeans.test.ts +++ b/packages/fls/test/javabeans.test.ts @@ -186,6 +186,33 @@ describe('XMLDecoder rules', () => { expect(listItems(list)).toHaveLength(3); }); + it("keeps the entries a constructor made in a map, reached by get(key), and shares them", () => { + // A router's operating system installs its web server in the constructor; + // the file reaches it through the map and changes it. + const [system] = decodeJavaBeans( + doc(` + + filius.software.www.WebServer + true + + filius.software.www.WebServer + 8080 + + extra1 + + `), + ); + + const entries = mapEntries(object(system).properties.get('installierteAnwendungen')); + expect(entries.map(([key]) => key)).toEqual(['filius.software.www.WebServer', 'extra']); + const server = object(entries[0]![1]); + expect(server).toMatchObject({ className: 'WebServer', id: 'WebServer0', fromGetter: true }); + expect([...server.properties]).toEqual([ + ['aktiv', true], + ['port', 8080], + ]); + }); + it('replays add at an index and set by index in order', () => { const [list] = decodeJavaBeans( doc(` diff --git a/packages/fls/test/topology.test.ts b/packages/fls/test/topology.test.ts index f18300e..157aab9 100644 --- a/packages/fls/test/topology.test.ts +++ b/packages/fls/test/topology.test.ts @@ -50,6 +50,26 @@ function asJavaView(topology: FlsTopology, javaBounds: (number[] | null)[]) { node.javaClass === 'Switch' || node.javaClass === 'Modem' ? Array.from({ length: node.portCount }, () => ({})) : node.interfaces.map((nic) => ({ ...nic, mac: nic.mac ?? null })), + system: { + ...node.system, + ...('ssid' in node.system ? { ssid: node.system.ssid ?? null } : {}), + ...(node.system.firewall === undefined + ? {} + : { + firewall: { + ...node.system.firewall, + rules: node.system.firewall.rules.map((rule) => [ + rule.srcIP, + rule.srcMask, + rule.destIP, + rule.destMask, + rule.port, + rule.protocol, + rule.action, + ]), + }, + }), + }, })), cables: topology.links.map((link) => ({ ends: link.ends.map((end) => [end.node, end.port]), @@ -177,6 +197,44 @@ describe('readTopology rules', () => { expect(wrongFirst.nodes).toEqual([]); }); + it("reads a router's firewall wherever the file reaches it, with Java's defaults for what it leaves out", () => { + // Settings under the installed application and under the web server's + // plug-in belong to the one firewall the constructor made. + const { nodes } = topologyOf(`${nodeItem(` + + filius.software.firewall.Firewall + false + + + srcIP + 10.0.0.0 + + + 1.1.1.1255.255.255.255 + 53171 + + + + filius.software.www.WebServer + konfig + true + + + `)}`); + + expect(nodes[0]!.system.firewall).toEqual({ + activated: true, + defaultPolicy: 0, + dropICMP: false, + filterSYNSegmentsOnly: false, + filterUdp: true, + rules: [ + { srcIP: '10.0.0.0', srcMask: '', destIP: '', destMask: '', port: -1, protocol: 6, action: 0 }, + { srcIP: '1.1.1.1', srcMask: '255.255.255.255', destIP: '', destMask: '', port: 53, protocol: 17, action: 1 }, + ], + }); + }); + it("reads colors as Java's constructors do and keeps an invalid one unset", () => { const colors = ['16711935', '123', '123004']; const { documentation, warnings } = topologyOf(` diff --git a/tools/java-oracle/README.md b/tools/java-oracle/README.md index be6110c..ca23d8a 100644 --- a/tools/java-oracle/README.md +++ b/tools/java-oracle/README.md @@ -17,14 +17,17 @@ virtuellen Bildschirm statt „headless". `SzenarioVerwaltung.netzwerkLaden` (per Reflection) — Javas Weg, kein Nachbau. * Stand: `gitlab.com/filius1/filius` @ `6640354` (2.14.0), wird beim ersten Lauf nach `.upstream/` geholt und gebaut. -* **MAC-Adressen**, die nicht in der Datei stehen, würfelt Filius beim Anlegen - der Netzwerkkarte. Sie erscheinen als `null`; zwei Läufe sind byte-gleich. -* Ob eine MAC in der Datei steht, wird **ohne Rücksicht auf Groß-/Kleinschreibung** - geprüft: `getMac()` schreibt groß, acht Korpus-Dateien speichern klein (bis - 29.09.2026 erschienen sie fälschlich als `null`). +* **Gewürfeltes:** Was nicht in der Datei steht, würfelt Filius zum Teil + (MAC-Adressen, die SSID eines Switches). Jede Datei wird deshalb **zweimal** + geladen; jeder Wert, der sich zwischen beiden Läufen unterscheidet, + erscheint als `null`. Zwei Läufe des Werkzeugs sind byte-gleich. (Bis + 29.09.2026 suchte es die MAC im Dateitext und hielt dabei acht + kleingeschriebene für gewürfelt.) * Bisher ausgelesen: Geräte (Klasse, Name, Beschriftung, Position, - Schnittstellen, bei Rechner/Notebook `useIPAsName`/`useMACAsName`), Kabel - (Enden als Gerät/Schnittstelle), Doku-Elemente. + Schnittstellen, bei Rechner/Notebook `useIPAsName`/`useMACAsName`), unter + `system` SSID, Lernzeit des Switches, RIP, manuelle Routen und die Firewall + von Router und Heimrouter; Kabel (Enden als Gerät/Schnittstelle), + Doku-Elemente. Systemsoftware, Dateisysteme und Anwendungen folgen schrittweise. ## Getter-Standardwerte diff --git a/tools/java-oracle/src/FlsOracle.java b/tools/java-oracle/src/FlsOracle.java index 0a07e67..f0afcd6 100644 --- a/tools/java-oracle/src/FlsOracle.java +++ b/tools/java-oracle/src/FlsOracle.java @@ -15,6 +15,14 @@ import filius.hardware.knoten.InternetKnoten; import filius.hardware.knoten.Knoten; import filius.hardware.knoten.LokalerKnoten; import filius.rahmenprogramm.SzenarioVerwaltung; +import filius.software.firewall.Firewall; +import filius.software.firewall.FirewallRule; +import filius.software.system.Betriebssystem; +import filius.software.system.GatewayFirmware; +import filius.software.system.InternetKnotenBetriebssystem; +import filius.software.system.SwitchFirmware; +import filius.software.system.SystemSoftware; +import filius.software.system.VermittlungsrechnerBetriebssystem; import java.awt.Color; import java.awt.Font; @@ -27,12 +35,12 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; +import java.util.Arrays; import java.util.IdentityHashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; -import java.util.regex.Pattern; import java.util.stream.Stream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; @@ -73,8 +81,17 @@ public class FlsOracle { System.exit(0); } + /** + * Loads the file twice. What FILIUS does not find in a file it rolls at + * random (MAC addresses, a switch's SSID) — such values differ between + * the two loads and are written as null, so that two runs are byte-equal. + */ @SuppressWarnings("unchecked") static Map read(Path file) throws Exception { + return (Map) stable(load(file), load(file)); + } + + static Map load(Path file) throws Exception { Path xml = Files.createTempFile("konfiguration", ".xml"); try { extractConfiguration(file, xml); @@ -85,12 +102,27 @@ public class FlsOracle { List.class, List.class); load.setAccessible(true); boolean success = (Boolean) load.invoke(null, xml.toString(), nodes, cables, docs); - return describe(success, nodes, cables, docs, Files.readString(xml, StandardCharsets.UTF_8)); + return describe(success, nodes, cables, docs); } finally { Files.deleteIfExists(xml); } } + /** The two descriptions with every value that differs between them replaced by null. */ + static Object stable(Object first, Object second) { + if (first instanceof Map left && second instanceof Map right && left.keySet().equals(right.keySet())) { + Map result = new LinkedHashMap<>(); + for (Object key : left.keySet()) result.put(key.toString(), stable(left.get(key), right.get(key))); + return result; + } + if (first instanceof List left && second instanceof List right && left.size() == right.size()) { + List result = new ArrayList<>(); + for (int index = 0; index < left.size(); index++) result.add(stable(left.get(index), right.get(index))); + return result; + } + return java.util.Objects.equals(first, second) ? first : null; + } + static void extractConfiguration(Path archive, Path target) throws Exception { try (ZipInputStream zip = new ZipInputStream(Files.newInputStream(archive))) { for (ZipEntry entry; (entry = zip.getNextEntry()) != null;) { @@ -104,7 +136,7 @@ public class FlsOracle { } static Map describe(boolean success, List nodes, List cables, - List docs, String xmlText) { + List docs) { Map portOwners = new IdentityHashMap<>(); List nodeList = new ArrayList<>(); for (int nodeIndex = 0; nodeIndex < nodes.size(); nodeIndex++) { @@ -128,13 +160,8 @@ public class FlsOracle { Map port = new LinkedHashMap<>(); port.put("ip", nic.getIp()); port.put("mask", nic.getSubnetzMaske()); - // Without a MAC address in the file, FILIUS rolls a random one when it - // creates the interface; only a MAC that stands in the file is stable. - String mac = nic.getMac(); - // getMac() upper-cases; the file may not. - boolean macInFile = mac != null && Pattern - .compile(">" + Pattern.quote(mac) + "<", Pattern.CASE_INSENSITIVE).matcher(xmlText).find(); - port.put("mac", macInFile ? mac : null); + // Random unless the file has one; see read(). + port.put("mac", nic.getMac()); port.put("gateway", nic.getGateway()); port.put("dns", nic.getDns()); ports.add(port); @@ -148,6 +175,7 @@ public class FlsOracle { } } json.put("ports", ports); + json.put("system", systemSoftware(node)); nodeList.add(json); } @@ -189,6 +217,45 @@ public class FlsOracle { return result; } + /** The settings of a node's system software the topology layer reads. */ + static Map systemSoftware(Knoten node) { + Map json = new LinkedHashMap<>(); + SystemSoftware software = node.getSystemSoftware(); + if (software instanceof SwitchFirmware firmware) { + json.put("ssid", firmware.getSSID()); + json.put("retentionTime", firmware.getRetentionTime()); + } + if (software instanceof Betriebssystem system) json.put("ssid", system.getSsid()); + if (software instanceof VermittlungsrechnerBetriebssystem system) json.put("ripEnabled", system.isRipEnabled()); + if (software instanceof InternetKnotenBetriebssystem system) { + List routes = new ArrayList<>(); + if (system.getWeiterleitungstabelle() != null && system.getWeiterleitungstabelle().getManuelleTabelle() != null) { + for (String[] route : system.getWeiterleitungstabelle().getManuelleTabelle()) { + routes.add(route == null ? null : Arrays.asList(route)); + } + } + json.put("manualRoutes", routes); + } + Firewall firewall = software instanceof VermittlungsrechnerBetriebssystem system ? system.holeFirewall() + : software instanceof GatewayFirmware firmware ? firmware.holeFirewall() : null; + if (firewall != null) { + Map settings = new LinkedHashMap<>(); + settings.put("activated", firewall.isActivated()); + settings.put("defaultPolicy", (int) firewall.getDefaultPolicy()); + settings.put("dropICMP", firewall.getDropICMP()); + settings.put("filterSYNSegmentsOnly", firewall.getFilterSYNSegmentsOnly()); + settings.put("filterUdp", firewall.getFilterUdp()); + List rules = new ArrayList<>(); + for (FirewallRule rule : firewall.getRuleset()) { + rules.add(Arrays.asList(rule.srcIP, rule.srcMask, rule.destIP, rule.destMask, rule.port, + (int) rule.protocol, (int) rule.action)); + } + settings.put("rules", rules); + json.put("firewall", settings); + } + return json; + } + /** Just enough JSON: maps, lists, strings, numbers, booleans, null. */ static final class Json { static String write(Object value, String indent) {