linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Michael Kerrisk <mtk.manpages@gmail.com>,
	netdev <netdev@vger.kernel.org>,
	linux-man@vger.kernel.org
Subject: connect() man page
Date: Wed, 12 Feb 2020 09:50:53 -0800	[thread overview]
Message-ID: <f8517600-620b-1604-5f30-0f0698f5e33c@gmail.com> (raw)

Hi Michael

connect() man page seems obsolete or confusing :

       Generally,  connection-based  protocol  sockets may successfully connect()
       only once; connectionless protocol  sockets  may  use  connect()  multiple
       times  to  change  their association.  Connectionless sockets may dissolve
       the association by connecting to an address with the sa_family  member  of
       sockaddr set to AF_UNSPEC (supported on Linux since kernel 2.2).


1) At least TCP has supported AF_UNSPEC thing forever.

2) By definition connectionless sockets do not have an association,
   why would they call connect(AF_UNSPEC) to remove a connection which does not exist ...

Maybe we should rewrite this paragraph to match reality, since this causes confusion.


       Some protocol sockets may successfully connect() only once.
       Some protocol sockets may use connect() multiple times  to  change  their association.
       Some protocol sockets may dissolve the association by connecting to an address with
       the sa_family member of sockaddr set to AF_UNSPEC (supported on Linux since kernel 2.2).

Thanks.


             reply	other threads:[~2020-02-12 17:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 17:50 Eric Dumazet [this message]
2020-04-06 11:47 ` connect() man page Michael Kerrisk (man-pages)

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=f8517600-620b-1604-5f30-0f0698f5e33c@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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).