mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-25 19:19:02 +00:00
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.
This commit is contained in:
+2
-14
@@ -239,27 +239,15 @@ void LoadConfiguration(bool loadImages)
|
||||
|
||||
if (RegLoadValue(regSection.c_str(), REGVALUE_CARD_TYPE, TRUE, &dwTmp))
|
||||
{
|
||||
if (slot == SLOT3)
|
||||
{
|
||||
// this must happen before the card is instantitated
|
||||
// TODO move to the card
|
||||
if ((SS_CARDTYPE)dwTmp == CT_Uthernet || (SS_CARDTYPE)dwTmp == CT_Uthernet2) // TODO: move this to when UthernetCard object is instantiated
|
||||
{
|
||||
std::string regSection = RegGetConfigSlotSection(slot);
|
||||
if (RegLoadString(regSection.c_str(), REGVALUE_UTHERNET_INTERFACE, TRUE, szFilename, MAX_PATH, TEXT("")))
|
||||
PCapBackend::tfe_interface = szFilename;
|
||||
}
|
||||
}
|
||||
|
||||
GetCardMgr().Insert(slot, (SS_CARDTYPE)dwTmp, false);
|
||||
}
|
||||
else // legacy (AppleWin 1.30.3 or earlier)
|
||||
{
|
||||
if (slot == SLOT3)
|
||||
{
|
||||
// TODO: move this to when UthernetCard object is instantiated
|
||||
RegLoadString(TEXT(REG_CONFIG), TEXT(REGVALUE_UTHERNET_INTERFACE), 1, szFilename, MAX_PATH, TEXT(""));
|
||||
PCapBackend::tfe_interface = szFilename;
|
||||
// copy it to the new location
|
||||
PCapBackend::SetRegistryInterface(slot, szFilename);
|
||||
|
||||
DWORD tfeEnabled;
|
||||
REGLOAD_DEFAULT(TEXT(REGVALUE_UTHERNET_ACTIVE), &tfeEnabled, 0);
|
||||
|
||||
Reference in New Issue
Block a user