This has been discusssed before, without really getting beyond "the implementation in the unix unit doesn't do anything useful".
What appears to be happening is that GetDomainName() and GetHostName() use information returned by the (Linux) kernel which is the same as would be displayed by nisdomainname and uname -n (or the standard hostname program) respectively. If NIS (AKA YP) isn't active the domain will be returned as (none). The nisdomainname program is also known as ypdomainname and domainname, at least on Debian.
Using an fcl-net lookup to get the (or at least a plausible) domain name is not a realistic alternative: since GetHostName() returns the system's preferred name without delay then GetDomainName() could be expected to behave the same. Generally speaking, preferred names are set up during system installation, querying a DNS server often muddies the water by also returning various aliases.
The manpage for domainname (etc.) suggests that the preferred way of getting the domain name is to look for the host's entry in the /etc/hosts file, which generally speaking will be set up at installation. I can confirm that this appears to work fairly well on Linux, but have not had an opportunity to test on e.g. Solaris.
Would it be appropriate to submit my implementation via Mantis?
MarkMLl