From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Arnaldo Carvalho de Melo <acme@redhat.com>,
Rick Jones <rick.jones2@hp.com>,
Linux Network Development list <netdev@vger.kernel.org>
Subject: Re: why does DCCP SO_REUSEADDR have to be SOL_DCCP?
Date: Sat, 2 Feb 2008 01:02:51 -0200 [thread overview]
Message-ID: <20080202030251.GJ17164@ghostprotocols.net> (raw)
In-Reply-To: <20080202025259.GH17164@ghostprotocols.net>
Em Sat, Feb 02, 2008 at 12:52:59AM -0200, Arnaldo Carvalho de Melo escreveu:
> If instead you pass SOL_DCCP we'll go down the rabbit hole till
> do_dccp_setsockopt() and SO_REUSEADDR, that is equal to 2, will be
> interpreted as DCCP_SOCKOPT_SERVICE, that is also equal to 2, so you'll
> be setting the service, not changing the SO_REUSEADDR setting.
>
> The problem here is that you need to use:
>
> setsockopt(fd, SOL_DCCP, DCCP_SOCKOPT_PACKET_SIZE, service,
> sizeof(service));
Further info on DCCP service codes:
http://www.rfc.net/rfc4340.txt -> "8.1.2. Service Codes"
> Again, take a look at the ttcp patch, the other patches for iperf,
> netcat, etc handles this.
- Arnaldo
next prev parent reply other threads:[~2008-02-02 3:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-02 1:42 why does DCCP SO_REUSEADDR have to be SOL_DCCP? Rick Jones
2008-02-02 2:52 ` Arnaldo Carvalho de Melo
2008-02-02 3:02 ` Arnaldo Carvalho de Melo [this message]
2008-02-04 18:46 ` Rick Jones
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=20080202030251.GJ17164@ghostprotocols.net \
--to=acme@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rick.jones2@hp.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.