Add a new IPV4 direct DNS lookup function. Allows us to use the configured DNS directly.

This commit is contained in:
Henrik Rydgård
2025-01-10 21:37:36 +01:00
parent fbd548dde5
commit 293c087577
3 changed files with 176 additions and 1 deletions
+6
View File
@@ -100,6 +100,12 @@ int NetResolver_StartNtoA(u32 resolverId, u32 hostnamePtr, u32 inAddrPtr, int ti
hostname = alias;
}
/*
// Try the new resolver, that hits the configured primary and secondary DNSs.
uint32_t raw_ip = net::RawDNSLookupIPV4(g_Config.primaryDNSServer.c_str(), hostname.c_str());
Memory::Write_U32(raw_ip, inAddrPtr);
*/
// Attempt to execute a DNS resolution
if (!net::DNSResolve(hostname, "", &resolved, err)) {
// TODO: Return an error based on the outputted "err" (unfortunately it's already converted to string)