[Top][All Lists]

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

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

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


I was wondering what the intended "plan" is regarding the use of the
tcp_listen_dual macro and the common "src/api/api_msg.c" support?

The macro is not currently referenced from the source, so by default
sequential API TCP listener PCBs will always be "accept_any_ip_version==0".

For my own always-on "dual" usage I have just done a quick HACK patch so
that tcp_listen_dual_with_backlog() is called instead of the current
tcp_listen default of tcp_listen_with_backlog(), but that of-course
obviates the tcp_listen_dual support declared at the end of the
"include/lwip/tcp.h" header file.

Being that my long term aim is to ensure that our run-time support is a
clean encapsulation, I want to avoid having any local outstanding
"changes" to the git tree and ensure that I follow the lwIP rules for
any run-time support. So getting a handle onto what the aim for
sequential API dual support is would be useful to avoid me going down a
short-term dead-end.

The issue of allowing sequential API access to dual listeners could
easily be "solved" either:

- "globally" by adding a new "opt.h" manifest used when LWIP_IPV6 is
enabled to select the function called by lwip_netconn_do_listen() so
that all ANY listeners are in dual mode if configured. Whilst being a
quick and easy change, it is a bit of a sledge-hammer.

- "per-socket" by providing support for a new per-netconn flag that
mimics the operation of the Linux/BSD IPV6_V6ONLY control, and a
suitable call to allow the flag to be set/reset given a socket
handle/descriptor (my preferred approach though it has the hit of some
minor conditional code over the all-or-nothing "global build option"

However if there is already an approach to the sequential API dual-stack
listener issue being considered then I will not bother working on a
patch; and will go with the flow :-)

-- Jamie

reply via email to

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