[fpc-pascal] Portable (or at least working) version of GetDomainName()?

Ludo Brands ludo.brands at free.fr
Tue Apr 9 10:44:20 CEST 2013

On 04/09/2013 10:14 AM, Mark Morgan Lloyd wrote:

> It might be notable that Debian doesn't volunteer a domain name unless
> it's able to contact DNS. I'll get onto nslookup, or just use temporary
> text (it's only salt for a password hash, and is stored).

One of the problems with uname is that the kernel doesn't have a clue on
how you are connected to the network. Your computer could have 10
network names if it had 10 addresses (not even 10 NIC's required).

Looking up the IP you want the domain name for in a DNS is the only
reliable way. And it is portable.


More information about the fpc-pascal mailing list