[cvsnt] NetGetAnyDCName vs NetGetDCName

Tony Hoyle tmh at nodomain.org
Thu Feb 5 12:54:48 GMT 2004


On Thu, 5 Feb 2004 13:24:08 +0100, "Mathieu Veurman"
<MVeurman at seagull.nl> wrote:


>If I substitute NetGetAnyDCName by NetGetDCName the PDC of the
>seagullirl domain is returned and all runs well. It looks like
>NetGetAnyDCName was added in version 1.56 of win32.c without any clear
>description why. What's the drawback to replace NetGetAnyDCName by
>NetGetDCName? If there is one, why not make a combination of both? If
>the first one fails the second one still has the possibility to come up
>with a valid dc.
>
NetGetAnyDCName is a lot faster on large networks - it'll generally
return a local DC... for example we have two DCs one in the UK and one
in the US, connected via VPN.  In the US NetGetDCName returns the DC
in the UK, which isn't acceptable.

Unless you have a really odd configuration this function is otherwise
identical to NetGetDCName - from the description:

"The NetGetAnyDCName function returns the name of any domain
controller (DC) for a domain that is directly trusted by the specified
server."

As long as you have a trust relationship, it'll work.

Tony




More information about the cvsnt mailing list