Reference: https://www.ietf.org/rfc/rfc1035.txt
and
http://manpages.ubuntu.com/manpages/xenial/man2/gethostname.2.html
Reference: https:/ /www.ietf. org/rfc/ rfc1035. txt
and
http:// manpages. ubuntu. com/manpages/ xenial/ man2/gethostnam e.2.html