diff --git a/CHANGES.md b/CHANGES.md index a25861b..a762bf1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -39,7 +39,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, Switch/WLAN, Routen, RIP, Firewall, DHCP, Portweiterleitung, Modem, Dateisysteme, Doku-Elemente des Imports) | übertragen, Eingabe ist Javas Sicht: Name und Port-Anzahl wie Java, abgelehnte Adresse → Swift-Standard, Router-Standardgateway wie Java (Swift verliert es), jede Router-Firewall eingetragen, Konfigurationstexte wie in Swift getrimmt (`swiftTrim`), Rechner ohne Dateisystem leer wie in Java (Swift: Demo-Dateien); 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, Pings im Kern (über einen Router; über drei Router mit manuellen Routen und Router-Gateways) | -| `src/systemSoftware.ts` | Java `SwitchFirmware`, `Betriebssystem`, `VermittlungsrechnerBetriebssystem`, `GatewayFirmware`, `Weiterleitungstabelle`, `Firewall`, `FirewallRule`, `DHCPServer`, `ModemFirmware`, `Dateisystem`, `Datei` | neu nach Java: SSID, Lernzeit, RIP, manuelle Routen, Router-Firewall (an allen Stellen, an denen die Datei sie erreicht), DHCP, statische NAT, Modem, Dateisystem von Rechner und Notebook; `Character.isWhitespace` am JDK gemessen; gegen Java geprüft | +| `src/systemSoftware.ts` | Java `SwitchFirmware`, `Betriebssystem`, `VermittlungsrechnerBetriebssystem`, `GatewayFirmware`, `Weiterleitungstabelle`, `Firewall`, `FirewallRule`, `DHCPServer`, `ModemFirmware`, `Dateisystem`, `Datei` | neu nach Java: SSID, Lernzeit, RIP, manuelle Routen, Router-Firewall (an allen Stellen, an denen die Datei sie erreicht), DHCP, statische NAT, Modem, Dateisystem und installierte Programme von Rechner und Notebook; `Character.isWhitespace` am JDK gemessen; 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 19c0d4d..99e5be8 100644 --- a/corpus/corpus.java.json +++ b/corpus/corpus.java.json @@ -30,6 +30,16 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -243,6 +253,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": true + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -296,6 +315,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": true + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -336,6 +364,16 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -802,6 +840,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": true + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -866,6 +913,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -906,6 +962,12 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -959,6 +1021,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -1053,6 +1124,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -1106,6 +1186,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -1371,6 +1460,26 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + }, + { + "key": "filius.software.lokal.FileExplorer", + "class": "filius.software.lokal.FileExplorer" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -1411,6 +1520,12 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -1483,6 +1598,19 @@ } ] }, + "applications": [ + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -1689,6 +1817,20 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -1778,6 +1920,20 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -2356,6 +2512,23 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": true + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -2416,6 +2589,23 @@ } ] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -2469,6 +2659,12 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailServer", + "class": "filius.software.email.EmailServer" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -2522,6 +2718,12 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailServer", + "class": "filius.software.email.EmailServer" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -2594,6 +2796,30 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": true + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": true, @@ -2718,6 +2944,20 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -2766,6 +3006,20 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -2806,6 +3060,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -2846,6 +3101,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -2886,6 +3142,16 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -3175,6 +3441,12 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": true, @@ -3885,6 +4157,20 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -3974,6 +4260,20 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -4545,6 +4845,23 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": true + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -4605,6 +4922,23 @@ } ] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -4658,6 +4992,12 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailServer", + "class": "filius.software.email.EmailServer" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -4711,6 +5051,12 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailServer", + "class": "filius.software.email.EmailServer" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -4783,6 +5129,30 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": true + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": true, @@ -4907,6 +5277,20 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -4955,6 +5339,20 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -4995,6 +5393,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -5035,6 +5434,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -5075,6 +5475,16 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -5364,6 +5774,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": true, @@ -6024,6 +6435,16 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -6237,6 +6658,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": true + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -6290,6 +6720,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": true + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -6330,6 +6769,16 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -6742,6 +7191,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -6782,6 +7232,14 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.clientserver.ClientBaustein", + "class": "filius.software.clientserver.ClientBaustein", + "zielIPAdresse": "192.168.0.10", + "zielPort": 55555 + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -6863,6 +7321,14 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.clientserver.ClientBaustein", + "class": "filius.software.clientserver.ClientBaustein", + "zielIPAdresse": "192.168.0.10", + "zielPort": 55555 + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -6950,6 +7416,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": true, @@ -6990,6 +7457,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -7030,6 +7498,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -7111,6 +7580,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -7224,6 +7694,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -7391,6 +7862,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": true + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -7455,6 +7935,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -7495,6 +7984,12 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -7548,6 +8043,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -7642,6 +8146,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -7695,6 +8208,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -7834,6 +8356,12 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -7874,6 +8402,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -7914,6 +8443,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -7954,6 +8484,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -8052,6 +8583,38 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + }, + { + "key": "filius.software.lokal.FileExplorer", + "class": "filius.software.lokal.FileExplorer" + }, + { + "key": "filius.software.lokal.ImageViewer", + "class": "filius.software.lokal.ImageViewer" + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": true, @@ -8133,6 +8696,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -8173,6 +8737,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -8213,6 +8778,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -8253,6 +8819,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -8546,6 +9113,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -8594,6 +9170,16 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -8642,6 +9228,16 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -8690,6 +9286,16 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -8738,6 +9344,16 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -8832,6 +9448,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -8885,6 +9510,12 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailServer", + "class": "filius.software.email.EmailServer" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -8938,6 +9569,12 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailServer", + "class": "filius.software.email.EmailServer" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -9465,6 +10102,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -9505,6 +10151,16 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -9565,6 +10221,19 @@ } ] }, + "applications": [ + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -9605,6 +10274,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -9665,6 +10335,19 @@ } ] }, + "applications": [ + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -9705,6 +10388,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -9786,6 +10470,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -10011,6 +10696,20 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -10083,6 +10782,23 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + }, + { + "key": "filius.software.email.EmailServer", + "class": "filius.software.email.EmailServer" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -10131,6 +10847,20 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailAnwendung", + "class": "filius.software.email.EmailAnwendung" + }, + { + "key": "filius.software.lokal.FileExplorer", + "class": "filius.software.lokal.FileExplorer" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -10225,6 +10955,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -10278,6 +11017,12 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailServer", + "class": "filius.software.email.EmailServer" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -10331,6 +11076,12 @@ } ] }, + "applications": [ + { + "key": "filius.software.email.EmailServer", + "class": "filius.software.email.EmailServer" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -10541,6 +11292,25 @@ } ] }, + "applications": [ + { + "key": "filius.software.clientserver.ServerBaustein", + "class": "filius.software.clientserver.ServerBaustein", + "aktiv": false, + "port": 55555 + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -10581,6 +11351,22 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.clientserver.ClientBaustein", + "class": "filius.software.clientserver.ClientBaustein", + "zielIPAdresse": null, + "zielPort": 55555 + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -10697,6 +11483,14 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.clientserver.ServerBaustein", + "class": "filius.software.clientserver.ServerBaustein", + "aktiv": false, + "port": 55555 + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -10749,6 +11543,23 @@ } ] }, + "applications": [ + { + "key": "filius.software.clientserver.ClientBaustein", + "class": "filius.software.clientserver.ClientBaustein", + "zielIPAdresse": "192.168.0.1", + "zielPort": 55555 + }, + { + "key": "filius.software.dateiaustausch.PeerToPeerAnwendung", + "class": "filius.software.dateiaustausch.PeerToPeerAnwendung", + "maxTeilnehmerZahl": 4 + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -10789,6 +11600,14 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.clientserver.ClientBaustein", + "class": "filius.software.clientserver.ClientBaustein", + "zielIPAdresse": "192.168.0.1", + "zielPort": 55555 + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -11010,6 +11829,23 @@ } ] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -11050,6 +11886,16 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -11512,6 +12358,19 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -11552,6 +12411,22 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.clientserver.ClientBaustein", + "class": "filius.software.clientserver.ClientBaustein", + "zielIPAdresse": "www.jupiter.de", + "zielPort": 55555 + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -11612,6 +12487,19 @@ } ] }, + "applications": [ + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -11672,6 +12560,29 @@ } ] }, + "applications": [ + { + "key": "filius.software.clientserver.ServerBaustein", + "class": "filius.software.clientserver.ServerBaustein", + "aktiv": true, + "port": 55555 + }, + { + "key": "filius.software.lokal.FileExplorer", + "class": "filius.software.lokal.FileExplorer" + }, + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -11732,6 +12643,25 @@ } ] }, + "applications": [ + { + "key": "filius.software.clientserver.ServerBaustein", + "class": "filius.software.clientserver.ServerBaustein", + "aktiv": true, + "port": 55555 + }, + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -11813,6 +12743,18 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.clientserver.ClientBaustein", + "class": "filius.software.clientserver.ClientBaustein", + "zielIPAdresse": "192.168.0.10", + "zielPort": 55555 + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -12456,6 +13398,16 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -12516,6 +13468,19 @@ } ] }, + "applications": [ + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -12702,6 +13667,22 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": true, @@ -12996,6 +13977,16 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -13056,6 +14047,16 @@ } ] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -13242,6 +14243,26 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": true + }, + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": true, @@ -13382,6 +14403,19 @@ } ] }, + "applications": [ + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": true + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -13435,6 +14469,15 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -13913,6 +14956,27 @@ } ] }, + "applications": [ + { + "key": "filius.software.lokal.FileExplorer", + "class": "filius.software.lokal.FileExplorer" + }, + { + "key": "filius.software.lokal.ImageViewer", + "class": "filius.software.lokal.ImageViewer" + }, + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -13961,6 +15025,16 @@ } ] }, + "applications": [ + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -14202,6 +15276,26 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + }, + { + "key": "filius.software.lokal.FileExplorer", + "class": "filius.software.lokal.FileExplorer" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -14242,6 +15336,12 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -14314,6 +15414,19 @@ } ] }, + "applications": [ + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -14512,6 +15625,12 @@ "directory": "root", "children": [] }, + "applications": [ + { + "key": "filius.software.www.WebBrowser", + "class": "filius.software.www.WebBrowser" + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -14552,6 +15671,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -14592,6 +15712,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -14632,6 +15753,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": false, "dhcpServer": { "aktiv": false, @@ -14730,6 +15852,38 @@ } ] }, + "applications": [ + { + "key": "filius.software.dns.DNSServer", + "class": "filius.software.dns.DNSServer", + "aktiv": true, + "port": 53, + "recursiveResolutionEnabled": false + }, + { + "key": "filius.software.lokal.FileExplorer", + "class": "filius.software.lokal.FileExplorer" + }, + { + "key": "filius.software.lokal.ImageViewer", + "class": "filius.software.lokal.ImageViewer" + }, + { + "key": "filius.software.lokal.Terminal", + "class": "filius.software.lokal.Terminal" + }, + { + "key": "filius.software.lokal.TextEditor", + "class": "filius.software.lokal.TextEditor" + }, + { + "key": "filius.software.www.WebServer", + "class": "filius.software.www.WebServer", + "aktiv": true, + "port": 80, + "useVHost": false + } + ], "dhcpClient": false, "dhcpServer": { "aktiv": true, @@ -14811,6 +15965,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -14851,6 +16006,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -14891,6 +16047,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, @@ -14931,6 +16088,7 @@ "directory": "root", "children": [] }, + "applications": [], "dhcpClient": true, "dhcpServer": { "aktiv": false, diff --git a/packages/fls/src/javaDefaults.json b/packages/fls/src/javaDefaults.json index c181f20..e227673 100644 --- a/packages/fls/src/javaDefaults.json +++ b/packages/fls/src/javaDefaults.json @@ -1,5 +1,8 @@ { + "ClientBaustein#zielIPAdresse": null, + "ClientBaustein#zielPort": 55555, "DHCPServer#port": 67, + "DNSServer#aktiv": false, "DNSServer#port": 53, "Gateway#maxLayerOfOperation": 2, "JSidebarButton#debugGraphicsOptions": 0, @@ -8,11 +11,15 @@ "JSidebarButton#iconTextGap": 4, "JSidebarButton#verticalTextPosition": 3, "Notebook#maxLayerOfOperation": 4, + "PeerToPeerAnwendung#maxTeilnehmerZahl": 5, "RIPServer#port": 520, "Rechner#maxLayerOfOperation": 4, + "ServerBaustein#aktiv": false, "ServerBaustein#port": 55555, "SwingConstants.CENTER": 0, "ThreadGroup#maxPriority": 10, "Vermittlungsrechner#maxLayerOfOperation": 2, - "WebServer#port": 80 + "WebServer#aktiv": false, + "WebServer#port": 80, + "WebServer#useVHost": false } diff --git a/packages/fls/src/javabeans.ts b/packages/fls/src/javabeans.ts index 5b93fb7..c1e1703 100644 --- a/packages/fls/src/javabeans.ts +++ b/packages/fls/src/javabeans.ts @@ -219,6 +219,15 @@ export function decodeXmlBytes(bytes: Uint8Array): string { const PRIMITIVE_ID_PREFIXES = new Set(['Integer', 'Boolean', 'Long', 'Short', 'Byte', 'Float', 'Double', 'Character']); const DEFAULTS = javaDefaults as Readonly>; +/** + * What a getter returns on a freshly constructed object of `simpleClass`, as + * measured (javaDefaults.json) — undefined where nothing was measured. + */ +export function javaDefault(simpleClass: string, property: string): string | number | boolean | null | undefined { + const key = `${simpleClass}#${property}`; + return Object.hasOwn(DEFAULTS, key) ? DEFAULTS[key] : undefined; +} + /** `getFoo`/`isFoo` → `foo`, as java.beans.Introspector derives it. */ function propertyOfGetter(method: string): string | undefined { const match = /^(?:get|is)([A-Z].*)$/.exec(method); diff --git a/packages/fls/src/systemSoftware.ts b/packages/fls/src/systemSoftware.ts index cbc6b3d..50f9c4b 100644 --- a/packages/fls/src/systemSoftware.ts +++ b/packages/fls/src/systemSoftware.ts @@ -27,7 +27,16 @@ // 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 { + isJavaObject, + isUnresolved, + javaDefault, + listItems, + mapEntries, + simpleClassName, + type JavaObject, + type JavaValue, +} from './javabeans.js'; import type { FlsNodeClass } from './topology.js'; export interface FlsFirewallRule { @@ -79,6 +88,55 @@ export type FlsFileTree = /** A node whose user object is neither a name nor a file. */ | { kind: 'other'; className: string; children: FlsFileTree[] }; +/** The applications FILIUS 2.14 can install (config/Desktop_*.txt). */ +export const FILIUS_APPLICATION_CLASSES = [ + 'filius.software.clientserver.ClientBaustein', + 'filius.software.clientserver.ServerBaustein', + 'filius.software.dateiaustausch.PeerToPeerAnwendung', + 'filius.software.dns.DNSServer', + 'filius.software.email.EmailAnwendung', + 'filius.software.email.EmailServer', + 'filius.software.firewall.Firewall', + 'filius.software.lokal.FileExplorer', + 'filius.software.lokal.ImageViewer', + 'filius.software.lokal.Terminal', + 'filius.software.lokal.TextEditor', + 'filius.software.www.WebBrowser', + 'filius.software.www.WebServer', +] as const; + +export type FlsApplicationClass = (typeof FILIUS_APPLICATION_CLASSES)[number]; + +/** Server applications (ServerAnwendung): they listen on a port and can be switched on. */ +const SERVER_APPLICATIONS = new Set([ + 'filius.software.clientserver.ServerBaustein', + 'filius.software.dns.DNSServer', + 'filius.software.www.WebServer', +]); + +/** An installed application with the settings the model reads; e-mail contents are a later layer. */ +export interface FlsApplication { + /** The key in installierteAnwendungen — the class name in every corpus file. */ + key: string | null; + javaClass: FlsApplicationClass; + /** Server applications: switched on (Java's aktiv) and the port. */ + isActive?: boolean; + port?: number; + /** ClientBaustein: the server it talks to (Java's zielIPAdresse, zielPort). */ + targetAddress?: string | null; + targetPort?: number; + /** DNSServer: whether it asks other servers for names it does not know. */ + recursiveResolutionEnabled?: boolean; + /** WebServer: serve by host name (Java's useVHost). */ + useVirtualHosts?: boolean; + /** PeerToPeerAnwendung: how many peers it keeps (Java's maxTeilnehmerZahl). */ + maxPeers?: number; + /** Firewall: the personal firewall. */ + firewall?: FlsFirewall; + /** The application's JavaBean, for the e-mail layer. */ + source: JavaObject; +} + export interface FlsSystemSoftware { /** * Switch: its SSID, undefined when the file has none (Java rolls one). @@ -101,6 +159,8 @@ export interface FlsSystemSoftware { staticNAT?: (string | null)[][]; /** Modem. */ modem?: FlsModem; + /** Rechner, Notebook: the installed applications, in the file's order. */ + applications?: FlsApplication[]; /** Rechner, Notebook: the root directory (named "root" by Java's constructor). */ fileSystem?: FlsFileTree; } @@ -125,6 +185,7 @@ export function readSystemSoftware(device: JavaObject, javaClass: FlsNodeClass, case 'Notebook': result.ssid = optionalString(value('ssid'), 'ssid', warn) ?? null; result.fileSystem = fileSystem(value('dateisystem'), warn); + result.applications = applications(value('installierteAnwendungen'), warn); break; case 'Vermittlungsrechner': result.ripEnabled = boolean(value('ripEnabled'), false, 'ripEnabled', warn); @@ -165,6 +226,60 @@ function modemAddress(value: string | null | undefined): string | null { return value === undefined ? 'localhost' : value; } +/** + * installierteAnwendungen: key → application. A class FILIUS does not ship — + * a project's own application, compiled into projekt/anwendungen — is left + * out: this reader cannot run Java classes. + */ +function applications(map: JavaValue | undefined, warn: Warn): FlsApplication[] { + const result: FlsApplication[] = []; + for (const [key, application] of mapEntries(map)) { + if (!isJavaObject(application)) { + warn(`application ${describe(key)} is ${describe(application)}, left out`); + continue; + } + const javaClass = application.className; + if (!(FILIUS_APPLICATION_CLASSES as readonly string[]).includes(javaClass)) { + warn(`application ${javaClass} is not part of FILIUS (a project's own application), left out`); + continue; + } + const simple = simpleClassName(javaClass); + const at = (property: string) => application.properties.get(property); + const measured = (property: string) => javaDefault(simple, property); + const entry: FlsApplication = { + key: typeof key === 'string' ? key : null, + javaClass: javaClass as FlsApplicationClass, + source: application, + }; + if (SERVER_APPLICATIONS.has(javaClass)) { + entry.isActive = boolean(at('aktiv'), measured('aktiv') === true, `${simple} aktiv`, warn); + entry.port = integer(at('port'), Number(measured('port')), `${simple} port`, warn); + } + switch (javaClass) { + case 'filius.software.clientserver.ClientBaustein': { + const target = optionalString(at('zielIPAdresse'), 'ClientBaustein zielIPAdresse', warn); + entry.targetAddress = target === undefined ? null : target; + entry.targetPort = integer(at('zielPort'), Number(measured('zielPort')), 'ClientBaustein zielPort', warn); + break; + } + case 'filius.software.dns.DNSServer': + entry.recursiveResolutionEnabled = boolean(at('recursiveResolutionEnabled'), false, 'DNSServer recursion', warn); + break; + case 'filius.software.www.WebServer': + entry.useVirtualHosts = boolean(at('useVHost'), measured('useVHost') === true, 'WebServer useVHost', warn); + break; + case 'filius.software.dateiaustausch.PeerToPeerAnwendung': + entry.maxPeers = integer(at('maxTeilnehmerZahl'), Number(measured('maxTeilnehmerZahl')), 'Gnutella peers', warn); + break; + case 'filius.software.firewall.Firewall': + entry.firewall = firewallOf([application], true, warn); + break; + } + result.push(entry); + } + return result; +} + /** * Dateisystem: its root is `arbeitsVerzeichnis` in files up to 1.10 and * `root` after. The constructor's root is a node named "root"; a node the @@ -282,8 +397,17 @@ function firewallObjects(software: JavaObject | undefined): JavaObject[] { /** The firewall as the router's constructor leaves it (off, drop), then the file's settings. */ function firewall(software: JavaObject | undefined, warn: Warn): FlsFirewall { + return firewallOf(firewallObjects(software), false, warn); +} + +/** + * A firewall's settings from every object the file reaches it by. `activated` + * starts as the constructor leaves it: a router's is switched off, a PC's + * personal firewall (new Firewall()) is on. + */ +function firewallOf(objects: JavaObject[], activatedByDefault: boolean, warn: Warn): FlsFirewall { const properties = new Map(); - for (const object of firewallObjects(software)) { + for (const object of objects) { 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`); @@ -295,7 +419,7 @@ function firewall(software: JavaObject | undefined, warn: Warn): FlsFirewall { // setAllowRelatedPackets is the old name of setFilterSYNSegmentsOnly. const filterSyn = at('filterSYNSegmentsOnly') ?? at('allowRelatedPackets'); return { - activated: boolean(at('activated'), false, 'firewall activated', warn), + activated: boolean(at('activated'), activatedByDefault, '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), diff --git a/packages/fls/test/expectedWarnings.ts b/packages/fls/test/expectedWarnings.ts new file mode 100644 index 0000000..1a5d9e4 --- /dev/null +++ b/packages/fls/test/expectedWarnings.ts @@ -0,0 +1,16 @@ +// Warnings the corpus is expected to produce, shared by the corpus tests. + +/** + * Two examples install an application of their own, compiled into the + * archive (projekt/anwendungen). Java loads it from there; this reader + * cannot run it — and the Java oracle, reading only konfiguration.xml, does + * not see it either. + */ +export const EXPECTED_WARNINGS: Record = { + 'java-examples/anwendung_komplett.fls': [ + "node 1: application filius.software.clientserver.Accumulator is not part of FILIUS (a project's own application), left out", + ], + 'java-examples/multicast_server.fls': [ + "node 1: application filius.software.clientserver.Broadcast is not part of FILIUS (a project's own application), left out", + ], +}; diff --git a/packages/fls/test/importProject.test.ts b/packages/fls/test/importProject.test.ts index 4a2838f..ebdf25f 100644 --- a/packages/fls/test/importProject.test.ts +++ b/packages/fls/test/importProject.test.ts @@ -33,6 +33,7 @@ import { type FlsTopology, type ImportedProject, } from '../src/index.js'; +import { EXPECTED_WARNINGS } from './expectedWarnings.js'; const corpusRoot = join(dirname(fileURLToPath(import.meta.url)), '../../../corpus'); interface SwiftSummary { @@ -289,7 +290,7 @@ describe('corpus: the imported model as Swift builds it', () => { expect(withoutApplicationDirectories(asSwiftState(project), swiftWebRoots(expected))).toEqual( withoutApplicationDirectories(expected), ); - expect(project.warnings).toEqual([]); + expect(project.warnings).toEqual(EXPECTED_WARNINGS[name] ?? []); }); } }); @@ -309,7 +310,7 @@ describe('corpus: every file imports completely', () => { expect(project.graph.nodes).toHaveLength(javaView[name]!.nodes.length); expect(project.graph.links).toHaveLength(javaView[name]!.cables.length); - expect(project.warnings).toEqual([]); + expect(project.warnings).toEqual(EXPECTED_WARNINGS[name] ?? []); }); } }); diff --git a/packages/fls/test/topology.test.ts b/packages/fls/test/topology.test.ts index 1f20a14..00990c4 100644 --- a/packages/fls/test/topology.test.ts +++ b/packages/fls/test/topology.test.ts @@ -12,12 +12,14 @@ import { decodeJavaBeans, readFlsArchive, readTopology, + type FlsApplication, type FlsDhcpServer, type FlsFileTree, type FlsModem, type FlsNodeClass, type FlsTopology, } from '../src/index.js'; +import { EXPECTED_WARNINGS } from './expectedWarnings.js'; const corpusRoot = join(dirname(fileURLToPath(import.meta.url)), '../../../corpus'); const javaView = JSON.parse(readFileSync(join(corpusRoot, 'corpus.java.json'), 'utf8')) as Record; @@ -63,6 +65,35 @@ function javaFileTree(tree: FlsFileTree): unknown { } } +/** FlsOracle.applications' shape: Java's property names, sorted by key. */ +function javaApplications(applications: FlsApplication[]): unknown[] { + return [...applications] + .sort((lhs, rhs) => ((lhs.key ?? '') < (rhs.key ?? '') ? -1 : 1)) + .map((application) => ({ + key: application.key, + class: application.javaClass, + ...(application.isActive === undefined ? {} : { aktiv: application.isActive, port: application.port }), + ...(application.targetPort === undefined + ? {} + : { zielIPAdresse: application.targetAddress, zielPort: application.targetPort }), + ...(application.recursiveResolutionEnabled === undefined + ? {} + : { recursiveResolutionEnabled: application.recursiveResolutionEnabled }), + ...(application.useVirtualHosts === undefined ? {} : { useVHost: application.useVirtualHosts }), + ...(application.maxPeers === undefined ? {} : { maxTeilnehmerZahl: application.maxPeers }), + ...(application.firewall === undefined + ? {} + : { + activated: application.firewall.activated, + defaultPolicy: application.firewall.defaultPolicy, + dropICMP: application.firewall.dropICMP, + filterSYNSegmentsOnly: application.firewall.filterSYNSegmentsOnly, + filterUdp: application.firewall.filterUdp, + rules: application.firewall.rules.length, + }), + })); +} + /** Java's property names, as FlsOracle.java writes them. */ function javaDhcpServer(server: FlsDhcpServer) { return { @@ -106,6 +137,7 @@ function asJavaView(topology: FlsTopology, javaBounds: (number[] | null)[]) { }), ...(node.system.modem === undefined ? {} : { modem: javaModem(node.system.modem) }), ...(node.system.fileSystem === undefined ? {} : { fileSystem: javaFileTree(node.system.fileSystem) }), + ...(node.system.applications === undefined ? {} : { applications: javaApplications(node.system.applications) }), ...(node.system.firewall === undefined ? {} : { @@ -164,7 +196,7 @@ describe('corpus: the topology as Java loads it', () => { const expected = javaView[name] as { nodes: { bounds: number[] | null }[] }; expect(asJavaView(topology, expected.nodes.map((node) => node.bounds))).toEqual(withoutTemplateFiles(expected)); - expect(topology.warnings).toEqual([]); + expect(topology.warnings).toEqual(EXPECTED_WARNINGS[name] ?? []); }); } }); @@ -368,6 +400,28 @@ describe('readTopology rules', () => { expect(warnings).toEqual(['node 2: file system: insert on a node is not read']); }); + it("gives installed applications Java's measured defaults for what the file leaves out", () => { + const put = (className: string, body = '') => + `${className}${body}`; + const { nodes } = topologyOf(`${nodeItem(` + + ${put('filius.software.www.WebServer')} + ${put('filius.software.clientserver.ClientBaustein')} + ${put('filius.software.dateiaustausch.PeerToPeerAnwendung')} + ${put('filius.software.firewall.Firewall')} + ${put('filius.software.dns.DNSServer', 'true5353')} + ${put('filius.software.lokal.Terminal')} + `)}`); + const byClass = new Map(nodes[0]!.system.applications!.map((application) => [application.javaClass, application])); + + expect(byClass.get('filius.software.www.WebServer')).toMatchObject({ isActive: false, port: 80, useVirtualHosts: false }); + expect(byClass.get('filius.software.clientserver.ClientBaustein')).toMatchObject({ targetAddress: null, targetPort: 55_555 }); + expect(byClass.get('filius.software.dateiaustausch.PeerToPeerAnwendung')).toMatchObject({ maxPeers: 4 }); + expect(byClass.get('filius.software.firewall.Firewall')?.firewall).toMatchObject({ activated: true, defaultPolicy: 0 }); + expect(byClass.get('filius.software.dns.DNSServer')).toMatchObject({ isActive: true, port: 5353, recursiveResolutionEnabled: false }); + expect(Object.keys(byClass.get('filius.software.lokal.Terminal')!).sort()).toEqual(['javaClass', 'key', 'source']); + }); + it("gives a modem Java's defaults and keeps an address the file sets to null", () => { const { nodes } = topologyOf(` ${nodeItem('')} diff --git a/scripts/code_language_allow.txt b/scripts/code_language_allow.txt index 7b13e61..1f11695 100644 --- a/scripts/code_language_allow.txt +++ b/scripts/code_language_allow.txt @@ -26,3 +26,9 @@ packages/fls/::obergrenze packages/fls/::gatewayip packages/fls/::dnsserverip packages/fls/::adresse +# Property names of Java FILIUS's ClientBaustein (zielIPAdresse, zielPort) and +# PeerToPeerAnwendung (maxTeilnehmerZahl), as the Java oracle writes them; +# our types call them targetAddress, targetPort and maxPeers. +packages/fls/::ziel +packages/fls/::teilnehmer +packages/fls/::zahl diff --git a/tools/java-oracle/README.md b/tools/java-oracle/README.md index f2b2dc0..354cf69 100644 --- a/tools/java-oracle/README.md +++ b/tools/java-oracle/README.md @@ -30,7 +30,10 @@ virtuellen Bildschirm statt „headless". NAT-Tabelle des Heimrouters, die Verbindung eines Modems und das Dateisystem (Inhalte als Länge und SHA-256, damit die Referenz klein bleibt; die Dateien von Router und Heimrouter erzeugt Javas Konstruktor aus - eigenen Vorlagen, sie stehen nicht in der Datei); Kabel (Enden als Gerät/Schnittstelle), + eigenen Vorlagen, sie stehen nicht in der Datei) und die installierten + Programme eines Rechners mit ihren Einstellungen (Klassen, die Filius + nicht mitbringt — eigene Anwendungen im Archiv unter `projekt/anwendungen` + — fehlen, weil das Werkzeug nur `konfiguration.xml` lädt); Kabel (Enden als Gerät/Schnittstelle), Doku-Elemente. Systemsoftware, Dateisysteme und Anwendungen folgen schrittweise. diff --git a/tools/java-oracle/run.sh b/tools/java-oracle/run.sh index 61fbd70..7aa666e 100755 --- a/tools/java-oracle/run.sh +++ b/tools/java-oracle/run.sh @@ -50,6 +50,13 @@ HOME="$here/.build/home" xvfb-run -a java -cp "$classpath:$here/.build" GetterDe filius.software.rip.RIPServer#port \ filius.software.www.WebServer#port \ javax.swing.SwingConstants::CENTER \ + filius.software.clientserver.ServerBaustein#aktiv \ + filius.software.clientserver.ClientBaustein#zielPort \ + filius.software.clientserver.ClientBaustein#zielIPAdresse \ + filius.software.dns.DNSServer#aktiv \ + filius.software.www.WebServer#aktiv \ + filius.software.www.WebServer#useVHost \ + filius.software.dateiaustausch.PeerToPeerAnwendung#maxTeilnehmerZahl \ 2>&1 | grep -v 'logback\|^$' || true test -s "$defaults" diff --git a/tools/java-oracle/src/FlsOracle.java b/tools/java-oracle/src/FlsOracle.java index a439a41..c25b6b3 100644 --- a/tools/java-oracle/src/FlsOracle.java +++ b/tools/java-oracle/src/FlsOracle.java @@ -15,7 +15,13 @@ import filius.hardware.knoten.InternetKnoten; import filius.hardware.knoten.Knoten; import filius.hardware.knoten.LokalerKnoten; import filius.rahmenprogramm.SzenarioVerwaltung; +import filius.software.Anwendung; +import filius.software.clientserver.ClientBaustein; +import filius.software.clientserver.ServerAnwendung; +import filius.software.dateiaustausch.PeerToPeerAnwendung; import filius.software.dhcp.DHCPServer; +import filius.software.dns.DNSServer; +import filius.software.www.WebServer; import filius.software.firewall.Firewall; import filius.software.firewall.FirewallRule; import filius.software.system.Betriebssystem; @@ -239,6 +245,7 @@ public class FlsOracle { } json.put("manualRoutes", routes); json.put("fileSystem", system.getDateisystem() == null ? null : fileTree(system.getDateisystem().getRoot())); + if (system instanceof Betriebssystem) json.put("applications", applications(system)); json.put("dhcpClient", system.isDHCPKonfiguration()); DHCPServer server = system.getDHCPServer(); if (server != null) { @@ -287,6 +294,43 @@ public class FlsOracle { return json; } + /** + * The installed applications of a PC or notebook, by key: the class, and + * the settings the topology layer reads. E-mail accounts and messages are + * a later layer. + */ + static List applications(InternetKnotenBetriebssystem system) { + List result = new ArrayList<>(); + Map installed = new TreeMap<>(system.getInstallierteAnwendungen()); + for (Map.Entry entry : installed.entrySet()) { + Anwendung application = entry.getValue(); + Map json = new LinkedHashMap<>(); + json.put("key", entry.getKey()); + json.put("class", application == null ? null : application.getClass().getName()); + if (application instanceof ServerAnwendung server) { + json.put("aktiv", server.isAktiv()); + json.put("port", server.getPort()); + } + if (application instanceof ClientBaustein client) { + json.put("zielIPAdresse", client.getZielIPAdresse()); + json.put("zielPort", client.getZielPort()); + } + if (application instanceof DNSServer dns) json.put("recursiveResolutionEnabled", dns.isRecursiveResolutionEnabled()); + if (application instanceof WebServer web) json.put("useVHost", web.isUseVHost()); + if (application instanceof PeerToPeerAnwendung peer) json.put("maxTeilnehmerZahl", peer.getMaxTeilnehmerZahl()); + if (application instanceof Firewall firewall) { + json.put("activated", firewall.isActivated()); + json.put("defaultPolicy", (int) firewall.getDefaultPolicy()); + json.put("dropICMP", firewall.getDropICMP()); + json.put("filterSYNSegmentsOnly", firewall.getFilterSYNSegmentsOnly()); + json.put("filterUdp", firewall.getFilterUdp()); + json.put("rules", firewall.getRuleset().size()); + } + result.add(json); + } + return result; + } + /** * A file system tree: a directory is a node whose user object is its name, * a file one whose user object is a Datei. Contents as SHA-256 and length