netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: netdev@vger.kernel.org, mzxreary@0pointer.de
Subject: Re: Documenting UNIX domain autobind
Date: Mon, 16 Apr 2012 09:07:39 +1200	[thread overview]
Message-ID: <CAKgNAkjSDCkSkTOKyP=49cCFYSEChcfuYD8K6KJ5MVuWVpHJ5Q@mail.gmail.com> (raw)
In-Reply-To: <201010171428.DDC17187.FFFJSLtOOHOMQV@I-love.SAKURA.ne.jp>

Hello Tetsuo Handa,

On Sun, Oct 17, 2010 at 6:28 PM, Tetsuo Handa
<penguin-kernel@i-love.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/

  parent reply	other threads:[~2012-04-15 21:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-10  5:48 Documenting UNIX domain autobind Michael Kerrisk
2010-10-17  5:28 ` Tetsuo Handa
2010-10-26 12:15   ` Question on UNIX domain socket Tetsuo Handa
     [not found]     ` <201010262115.FEH09326.OMFJHSVOFLQFOt-JPay3/Yim36HaxMnTkn67Xf5DAMn2ifp@public.gmane.org>
2010-11-23 12:59       ` Patch for man unix(7) Tetsuo Handa
     [not found]         ` <201011232159.DFE78143.tSHMFQOLFVFJOO-JPay3/Yim36HaxMnTkn67Xf5DAMn2ifp@public.gmane.org>
2012-04-15 21:42           ` Michael Kerrisk (man-pages)
     [not found]             ` <CAKgNAkgNRbdcWwo0nhsbCxtnagEucxm6d76ugGAAUAd+ukBLCQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-15 22:40               ` Michael Kerrisk (man-pages)
2012-04-16 11:08                 ` Tetsuo Handa
2012-04-15 21:07   ` Michael Kerrisk (man-pages) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-08-20 18:42 Documenting UNIX domain autobind Colin McCabe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKgNAkjSDCkSkTOKyP=49cCFYSEChcfuYD8K6KJ5MVuWVpHJ5Q@mail.gmail.com' \
    --to=mtk.manpages@gmail.com \
    --cc=mzxreary@0pointer.de \
    --cc=netdev@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).