Re: what's the purpose of MAXHOSTNAMELEN?

From: Vikram Dhillon
Date: Tue Dec 29 2009 - 16:00:43 EST


I care about Hurd :D, but yah as it is mentioned before, would it
sometime in future be possible to remove this from the kernel ?

Regards,
Vikram Dhillon

~~~
There are lots of Linux users who don't care how the kernel works, but
only want to use it. That is a tribute to how good Linux is.
-- Linus Torvalds



On Tue, Dec 29, 2009 at 3:20 PM, Jeff Garzik <jeff@xxxxxxxxxx> wrote:
> On 12/29/2009 02:56 PM, Samuel Thibault wrote:
>>
>> Jeff Garzik, le Tue 29 Dec 2009 14:40:05 -0500, a Ãcrit :
>>>
>>> On 12/29/2009 02:19 PM, Robert P. J. Day wrote:
>>>>
>>>> arch/s390/include/asm/param.h:#define MAXHOSTNAMELEN Â Â64 Â Â Â/* max
>>>> length of hostname */
>>>>
>>>> Â so lots of people define it but no one uses it. Âit *is* exported to
>>>> user space in /usr/include/asm/param.h, but i still have no idea what
>>>> it's for in user space. Âobsolete?
>>>
>>> According to RFC 1034, "Each node has a label, which is zero to 63
>>> octets in length"
>>
>> That's for Internet networks. ÂOther kinds of networks could implement
>> more. ÂIt could make sense to restrict ourself to Internet standards,
>> but we don't :)
>
> Er huh? ÂThat was a description of the origin of the limit.
>
> And as a point of fact, we do restrict ourself to that:
>
> Â Â Â Â#define __NEW_UTS_LEN 64
>
> Â Â Â Âstruct new_utsname {
> Â Â Â Â Â Â Â Âchar sysname[__NEW_UTS_LEN + 1];
> Â Â Â Â Â Â Â Âchar nodename[__NEW_UTS_LEN + 1];
>
>
>
>>> What is it used for in userspace, and why is it export from the kernel?
>>
>> Gethostname, typically, but also all kinds of functions that provide a
>> hostname. ÂIt's also quite often completely badly used, for instance for
>> getnameinfo()...
>>
>> You have Debian's list on
>> http://unstable.buildd.net/buildd/hurd-i386_Failed.html
>
> No one cares about Hurd.
>
> Â Â Â ÂJeff
>
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
> Please read the FAQ at Âhttp://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/