From 6a5ea92a4eb6d8fb7855051d9471f8412a1fd2aa Mon Sep 17 00:00:00 2001
From: Andrea
Date: Sun, 8 May 2022 17:26:01 +0200
Subject: [PATCH] Uthernet II: add virtual DNS feature (PR #1097)
Uthernet II: add extended feature to virtualise DNS requests.
. This allows pure TCP/UDP sockets to run *without* MACRAW requests (and so without libpcap).
. Raw sockets will not work.
. Add configuration for Virtual DNS.
libpcap: ensure all functions check if the library is loaded before using it.
Uthernet 1: do NOT overwrite tfe_cannot_use as it should only reflect the availability of npcap on *this* system.
Add Copyright notice, and mention Virtual DNS in html.
---
AppleWinExpress2019.vcxproj | 3 +
AppleWinExpress2019.vcxproj.filters | 9 +
help/uthernet.html | 3 +
resource/Applewin.rc | 9 +-
resource/resource.h | 2 +
source/Common.h | 1 +
source/Configuration/Config.cpp | 98 +++++++++++
source/Configuration/Config.h | 69 +-------
source/Configuration/PageAdvanced.cpp | 1 +
source/Configuration/PageConfig.cpp | 8 +-
source/Configuration/PageConfigTfe.cpp | 99 +++++------
source/Configuration/PageConfigTfe.h | 4 +-
source/Configuration/PageDisk.cpp | 2 +
source/Configuration/PropertySheetHelper.cpp | 8 +-
source/FrameBase.h | 2 +-
source/SaveState.cpp | 1 +
source/Tfe/DNS.cpp | 49 ++++++
source/Tfe/DNS.h | 4 +
source/Tfe/NetworkBackend.h | 3 +
source/Tfe/PCapBackend.cpp | 44 +++--
source/Tfe/PCapBackend.h | 17 +-
source/Tfe/tfearch.cpp | 93 ++++++----
source/Tfe/tfearch.h | 6 +-
source/Uthernet1.cpp | 16 +-
source/Uthernet2.cpp | 168 ++++++++++++++++---
source/Uthernet2.h | 13 ++
source/Utilities.cpp | 16 +-
source/W5100.h | 9 +
source/Windows/AppleWin.cpp | 1 +
source/Windows/Win32Frame.cpp | 4 +-
source/Windows/Win32Frame.h | 2 +-
source/Windows/WinFrame.cpp | 1 +
32 files changed, 539 insertions(+), 226 deletions(-)
create mode 100644 source/Configuration/Config.cpp
create mode 100644 source/Tfe/DNS.cpp
create mode 100644 source/Tfe/DNS.h
diff --git a/AppleWinExpress2019.vcxproj b/AppleWinExpress2019.vcxproj
index 573a9e0b..94c69529 100644
--- a/AppleWinExpress2019.vcxproj
+++ b/AppleWinExpress2019.vcxproj
@@ -114,6 +114,7 @@
+
@@ -157,6 +158,7 @@
+
@@ -223,6 +225,7 @@
+
diff --git a/AppleWinExpress2019.vcxproj.filters b/AppleWinExpress2019.vcxproj.filters
index c3ce4b15..d6419dda 100644
--- a/AppleWinExpress2019.vcxproj.filters
+++ b/AppleWinExpress2019.vcxproj.filters
@@ -262,6 +262,12 @@
Source Files\Uthernet
+
+ Source Files\Uthernet
+
+
+ Source Files\Configuration
+
@@ -600,6 +606,9 @@
Source Files\Uthernet
+
+ Source Files\Uthernet
+
diff --git a/help/uthernet.html b/help/uthernet.html
index ca1373a9..8591da6c 100644
--- a/help/uthernet.html
+++ b/help/uthernet.html
@@ -97,5 +97,8 @@
after loading a save-state file, TCP and UDP sockets are closed
+ The card implements a Virtual DNS
+ interface (not found on real hardware) for Apple II software to run without raw sockets:
+ this allows operation on any type of network.