www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/05/16/19:05:31.1

Sender: richdawe AT bigfoot DOT com
Message-ID: <373EF59A.C50A0C31@bigfoot.com>
Date: Sun, 16 May 1999 17:43:06 +0100
From: Richard Dawe <richdawe AT bigfoot DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.1 i586)
MIME-Version: 1.0
To: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Re: $HOSTNAME doesn't override library code
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990516133519 DOT 26252F-100000 AT is>
Reply-To: djgpp-workers AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019