Mail Archives: djgpp-workers/1999/05/16/19:05:31.1
Hello.
Eli Zaretskii wrote:
> I think if libsocket is used it should override gethostname by a
> DNS-aware version. I understand that there's no way to get this
> information without talking to Winsock.
The following is Windows '9x specific:
Unless a DNS server is used, the name defaults to the same as the LAN
manager name. If a DNS server is used, then a name is provided in the
networking control panel. This gets stored in the following registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP
libsocket uses the Regdos Group's registry code to get this value. I think
this key will only be created by Microsoft TCP/IP stacks. No communication
with Winsock is necessary. If DHCP is being used, then it gets a bit more
complicated. I've documented where the host name, etc., is found here:
http://www.geocities.com/SiliconValley/Lab/3216/dl/winnetip.htm
BTW the user name gets stored in:
HKEY_LOCAL_MACHINE\Network\Logon
> If it bothers you, I could try to remove you from the default
> addressees.
I think I can cope with it ;)
- Raw text -