[lkml]   [2004]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjecthost name length
POSIX nowadays contains


for programs to use to learn about the maximum host name length which is
allowed. _POSIX_HOST_NAME_MAX is the standard-required minimum maximum
and the value must be 256.

The problem is that HOST_NAME_MAX currently is defined as 64, as defined
by __NET_UTS_LEN in <linux/utsname.h>. I.e., we have HOST_NAME_MAX as
smaller than the minimum maximum which is obviously not POSIX compliant.

Now, we can simply ignore the problem or do something about it and
introduce a third version of the utsname structure with sufficiently big
nodename field.

Many OSes used small values before but 256 was chosen as a minimum
maximum and some OSes were changed since host names longer than 64 chars
indeed do exist. I wonder why this never has been brought to the
attention. Or were people happy enough with truncated host names?

Anyway, is there interest in getting this changed?

➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:01    [W:0.052 / U:0.280 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site