diff --git a/src/xenia/kernel/xam/xam_net.cc b/src/xenia/kernel/xam/xam_net.cc index e85f02c26..7ccfd1448 100644 --- a/src/xenia/kernel/xam/xam_net.cc +++ b/src/xenia/kernel/xam/xam_net.cc @@ -503,14 +503,36 @@ dword_result_t NetDll_XNetGetEthernetLinkStatus(dword_t caller) { return 0; } DECLARE_XAM_EXPORT(NetDll_XNetGetEthernetLinkStatus, ExportTag::kStub | ExportTag::kNetworking); -dword_result_t NetDll_XNetDnsLookup(dword_t caller, lpstring_t address, - dword_t evt_handle, - pointer_t host_out) { +dword_result_t NetDll_XNetDnsLookup(dword_t caller, lpstring_t host, + dword_t event_handle, lpdword_t pdns) { + // TODO(gibbed): actually implement this + if (pdns) { + auto dns_guest = kernel_memory()->SystemHeapAlloc(sizeof(XNDNS)); + auto dns = kernel_memory()->TranslateVirtual(dns_guest); + dns->status = 1; // non-zero = error + *pdns = dns_guest; + } + if (event_handle) { + auto ev = + kernel_state()->object_table()->LookupObject(event_handle); + assert_not_null(ev); + ev->Set(0, false); + } return 0; } DECLARE_XAM_EXPORT(NetDll_XNetDnsLookup, ExportTag::kStub | ExportTag::kNetworking); +dword_result_t NetDll_XNetDnsRelease(dword_t caller, pointer_t dns) { + if (!dns) { + return X_STATUS_INVALID_PARAMETER; + } + kernel_memory()->SystemHeapFree(dns.guest_address()); + return 0; +} +DECLARE_XAM_EXPORT(NetDll_XNetDnsRelease, + ExportTag::kStub | ExportTag::kNetworking); + SHIM_CALL NetDll_XNetQosServiceLookup_shim(PPCContext* ppc_context, KernelState* kernel_state) { uint32_t caller = SHIM_GET_ARG_32(0);