Subject: Re: SYS_NMLN & struct utsname
To: Erik E. Fair <fair@clock.org>
From: Paul A Vixie <paul@vix.com>
List: tech-kern
Date: 10/31/1998 17:14:33
the limit of a domain name is 256 wire format octets, of which the
last is always a trailing 0x00.  domain names are in principle able
to contain any ascii value, and BIND's network-to-presentation name
converter will generate \nnn (octal) when non-isprint() octets are
encountered.  we usually use 1025 as the maximum length of a printable
domain name inside BIND.

since hostnames probably should be constrained to just the printable
ascii character set, MAXHOSTNAMELEN (256) is actually the right value
to use in the utsname struct.