lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] sequential API dual-stack listen and the (unreferenced)


From: James G. Smith
Subject: Re: [lwip-devel] sequential API dual-stack listen and the (unreferenced) tcp_listen_dual macro
Date: Wed, 27 Jun 2012 09:22:17 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.16

On 06/26/2012 09:01 PM, address@hidden wrote:
> I don't know about that. I deliberately didn't add this to the
> sequential APIs, since I did not find a standard way to do so on sockets
> (I hadn't considered the netconn API, I must confess). If there is a way
> to do so on any other (BSD-like) socket implementation, I'd strongly
> suggest to follow that instead of inventing our own thing.

On 06/26/2012 04:39 PM, James G. Smith wrote:
> that mimics the operation of the Linux/BSD IPV6_V6ONLY control

That is why I mentioned the IPV6_V6ONLY flag. FreeBSD defaults to 0 (so
dual by default when listening on an AF_INET6 socket), though some older
Linux kernels seem to default to on, hence requiring an explicit:

  setsockopt(tcp_sock,IPPROTO_IPV6,IPV6_V6ONLY,&zero,sizeof(zero))

to disable the V6ONLY feature (and enable dual) on the socket.

So for the "per-socket" approach I would just update lwip_setsockopt (et
al) to implement compatible support (making porting *BSD code
transparent) and use a NETCONN_FLAG_ to control the actual listener
function called for the socket.

Whether it is enabled or disabled by default can be a cost-free (build
time) "opt.h" configuration option; since even if people disagree over
the default on or off state; at least it can be overridden easily with
"lwipopts.h".

I will generate and submit a patch sometime over the next couple of days
that can at least be another step in the discussion :-)

-- Jamie



reply via email to

[Prev in Thread] Current Thread [Next in Thread]