Subject: Re: Resolving names without dns-suffix on windows

Re: Resolving names without dns-suffix on windows

From: Maxim Ruban <m.ruban_at_drweb.com>
Date: Mon, 24 Jun 2013 18:22:47 +0400

Tommie,

I will create patch (within a week) and try to investigate more with
registry keys on different windows platforms.

On 2013-06-24 5:30 PM, Tommie Gannert wrote:
> 2013/6/24 Maxim Ruban <m.ruban_at_drweb.com <mailto:m.ruban_at_drweb.com>>
>
> LOCALDOMAIN is Unix-specific environment variable, and in most
> cases it is not defined on Windows,
> so I guess its enough to use LOCALDOMAIN dns-suffix if this env.
> variable was specified intentionally by user, without call to GAA
> and merging results.
> If not specified, call GAA.
>
>
> Ah, so LOCALDOMAIN isn't even a Windows thing...
>
> Then I completely agree c-ares should be using something else. ;)
>
> Looking at (old) code, it seems init_by_resolv_conf() should be
> extended to not only get name servers from Windows, but also the
> search list, which according to
>
> http://technet.microsoft.com/en-us/library/dd197418(v=ws.10).aspx
> <http://technet.microsoft.com/en-us/library/dd197418%28v=ws.10%29.aspx>
>
> is defined in
>
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters/SearchList
>
> It sounds better to use an API call to get both name servers and
> search list, but I guess that's more prone to Windows version issues.
> (And reading registry keys is what the code is doing now.)
>
> I wouldn't know if GAA() is the right function for thisor not, but it
> seems in Vista they added the ability to return multiple DNS suffixes
> in it:
>
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa366058(v=vs.85).aspx
> <http://msdn.microsoft.com/en-us/library/windows/desktop/aa366058%28v=vs.85%29.aspx>
>
> That makes me wonder how one was supposed to access the full
> SearchList previously.
>
> Do you have the ability to create a patch for it? I would assume
> Daniel wouldn't mind a contribution to enhance this behaviour.
>
> --
> Tommie
Received on 2013-06-24