Implement getdomainname