hostname and domainname functions