[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKgNAkjSDCkSkTOKyP=49cCFYSEChcfuYD8K6KJ5MVuWVpHJ5Q@mail.gmail.com>
Date: Mon, 16 Apr 2012 09:07:39 +1200
From: "Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>
To: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc: netdev@...r.kernel.org, mzxreary@...inter.de
Subject: Re: Documenting UNIX domain autobind
Hello Tetsuo Handa,
On Sun, Oct 17, 2010 at 6:28 PM, Tetsuo Handa
<penguin-kernel@...ove.sakura.ne.jp> wrote:
> Michael Kerrisk wrote:
>> I think this text correctly documents the technical details (but let
>> me know if you see errors). What is lacking is an explanation of why
>> this feature exists. Is someone able to explain where this feature is
>> used and why?
>
> What we can see is that unix_autobind() was added in Linux 2.1.15
>
> http://lxr.linux.no/linux-old+v2.1.15/net/unix/af_unix.c#L464
> addr->len = sprintf(addr->name->sun_path+1, "%08x", ordernum) + 1 + sizeof(short);
>
> 49 * Differences from 2.0.0-11-... (ANK)
> 50 * Bug fixes and improvements.
> 51 * - client shutdown killed server socket.
> 52 * - removed all useless cli/sti pairs.
> 53 * - (suspicious!) not allow connect/send to connected not to us
> 54 * socket, return EPERM.
> 55 *
> 56 * Semantic changes/extensions.
> 57 * - generic control message passing.
> 58 * - SCM_CREDENTIALS control message.
> 59 * - "Abstract" (not FS based) socket bindings.
> 60 * Abstract names are sequences of bytes (not zero terminated)
> 61 * started by 0, so that this name space does not intersect
> 62 * with BSD names.
>
> and was changed to allow from 2^32 names to 2^20 names in Linux 2.3.15.
>
> http://lxr.linux.no/linux-old+v2.3.15/net/unix/af_unix.c#L514
> addr->len = sprintf(addr->name->sun_path+1, "%05x", ordernum) + 1 + sizeof(short);
>
> I don't know the reason.
Long after the fact, I added text to unix(7) to note the change in the
size of the namespace you noted above.
However, the unix(7) man page still lacks an explanation of the
purpose of the autobind feature. Can anyone help?
Thanks,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists