// SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include "DriveWireShell.h" #include "../../../src/devices/DriveWireTransport.h" #include namespace VCC::Mac { inline std::unique_ptr openDriveWireEndpoint( DriveWireShell& shell, const std::string& host, uint16_t port) { // This name exists only inside the emulator. Never send it to DNS or // redirect normal localhost connections to a privileged command prompt. if (strcasecmp(host.c_str(), "macshell") == 0) return port == 2323 ? shell.connect() : nullptr; return Devices::makeDriveWireTCPConnection(host, port); } }