sg
dd80759bb9
tcp: changed accept handling to be done internally: the application does not have to call tcp_accepted() any more. Instead, when delaying accept (e.g. sockets do), call tcp_backlog_delayed()/tcp_backlog_accepted() (fixes bug #46696 )
10 years ago
sg
44e1a2d8e2
define tcp_backlog_set() as dummy-define when backlog feature is disable
10 years ago
sg
149bb36805
fixed bug #47448 (netconn/socket leak if RST is received during close)
10 years ago
Joel Cunningham
93ccba9bcb
don't fail closing a socket/netconn when failing to allocate the FIN segment; blocking the calling thread for a while is better than risking leaking a netconn/socket (see bug #46701 )
...
Signed-off-by: sg <goldsimon@gmx.de>
10 years ago
Dirk Ziegelmeier
d38cdccbcd
netconn API: Remove api_msg wrapper struct, it is not needed any more
10 years ago
Dirk Ziegelmeier
2575c7fb5f
netconn API: Cleanup, remove lots of #defines, take advantage of new tcpip_send_api_msg function feature to abstract core locking away
10 years ago
Dirk Ziegelmeier
af1978fa4e
Implement generic API message handling
...
Add generic tcpip_send_api_msg function
Let netif API and netconn API use it
Decouple tcpip.c and tcpip_priv.h from netif API
10 years ago
Dirk Ziegelmeier
094cdf1c7b
netconn: Create API macros to get/set IPV6ONLY flag
10 years ago
Dirk Ziegelmeier
bd0b51c9ef
Fix my previous netconn_do_listen changes in lwip_netconn_do_listen
10 years ago
Dirk Ziegelmeier
bee5515e9a
netconn API: Reimplement dual-stack API to be socket-like.
...
When IPv6 ANY address is used and the NETCONN_FLAG_IPV6_V6ONLY is NOT set, bind/listen on/to IP_ANY_TYPE
10 years ago
Dirk Ziegelmeier
0c673b6a44
Implement new style TCP dual-stack in netconn API
10 years ago
Dirk Ziegelmeier
5404ce3c0a
Implement support for UDP IP_ANY_TYPE in netconn API
10 years ago
Joel Cunningham
8cb64698aa
Allow backlog to be updated
...
This commit adds support to the sockets and netconn layer to update the
backlog by calling listen when the netconn is already in the listen state.
When backlog is not enabled, the call returns successfully
This commit also introduces a macro for setting the backlog value that
prevents a 0 sized (invalid) backlog
10 years ago
Dirk Ziegelmeier
880f1008d6
Together with Simon: Eliminate last instances of isipv6 member in pcbs;
...
Don't allow NULL pointers (IPv4 ANY) in connect() and sendto() functions as destinations since this does not make sense.
10 years ago
sg
9a97a80efc
Fixed bug #47154 lwip_netconn_do_writemore doesn't clear conn->write_offset on fatal/routing error.
10 years ago
Dirk Ziegelmeier
78a36df901
Netconn: Fix potential NULL pointer dereference (found by Coverity)
10 years ago
Joel Cunningham
11faa8149e
Fix blocking close with LWIP_SO_SNDTIMEO
...
This fixes a bug in close when LWIP_SO_SNDTIMEO is enabled, but
the option is not in use on the socket
A simple mis-typed comparison against zero would cause the close_timeout
to get set to zero if conn->send_timeout was 0
The intended check was to over-ride the default close timeout if a
send timeout had been specified via SO_SNDTIMEO
10 years ago
Axel Lin
031de097db
Trivial comment fix for lwip_netconn_do_disconnect()
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
10 years ago
Axel Lin
bd4c4b5959
Use SYS_ARCH_SET macro at appropriate places
...
Use SYS_ARCH_SET to simplify the code a bit.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
10 years ago
Axel Lin
ecf9d25ed0
api_msg_c: remove superfluous NETCONN_SET_SAFE_ERR call before TCPIP_APIMSG_ACK
...
The TCPIP_APIMSG_ACK will call NETCONN_SET_SAFE_ERR for both
LWIP_TCPIP_CORE_LOCKING and !LWIP_TCPIP_CORE_LOCKING cases.
So remove superfluous NETCONN_SET_SAFE_ERR call before TCPIP_APIMSG_ACK.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
10 years ago
sg
c12fa7b4c4
started to move "private" header files containing implementation details to "lwip/priv/" include directory to seperate the API from the implementation.
11 years ago
sg
fc1db87318
Fixed compiling api with LWIP_NETCONN_SEM_PER_THREAD==1 && LWIP_MPU_COMPATIBLE==1
11 years ago
goldsimon
b401f42520
minor: fixed coding style (lwip style)
11 years ago
sg
2b971400fa
minor: coding style
11 years ago
sg
22df34fc70
minor/coding style: removed spaces before line ending (from file header)
11 years ago
sg
490581a0eb
minor/coding style: removed spaces before line ending
11 years ago
Dirk Ziegelmeier
ae7eeda88a
dns_found_callback should take const IP addr
11 years ago
goldsimon
c71723101a
Removed ip_2_ip4/6_c const macros again now that ip_2_ip4/6 macros keep the original const'ness
11 years ago
Dirk Ziegelmeier
f62022cdf3
Compiler warning fixes (mostly constness in dual-stack configurations)
11 years ago
sg
77270adb96
Changed dns_gethostbyname_addrtype() to always be a function, fixed code for C PP :-(
11 years ago
goldsimon
196120fabd
worked on task #12243 (Add support for AAAA/IPv6 records to DNS)
11 years ago
sg
e171b4e3f0
Fixed usages of SYS_SEM_NULL after using pointers everywhere
11 years ago
goldsimon
4dc3c7a6a0
Fixed warnings about NULL check not required (ip_addr_isany) and implicit conversion (~)
11 years ago
Sylvain Rochet
44af6978db
netconn: api_msg.c, fixed warning about unused state variable by using it a little more
11 years ago
goldsimon
902d190a11
Many const fixes throughout the stack (although these are not all, yet)
11 years ago
sg
c1c65777b6
worked on task #13480 : added LWIP_IPV4 define - IPv4 can be disabled, leaving an IPv6-only stack (SNMP is still missing)
11 years ago
sg
ce7e31cd04
task #12722 (improve IPv4/v6 address handling): renamed ip_addr_t to ip4_addr_t, renamed ipX_addr_t to ip_addr_t and added IP version;
...
ip_addr_t is used for all generic IP addresses for the API, ip(4/6)_addr_t are only used internally or when initializing netifs or when calling version-related functions
11 years ago
sg
9eb900c448
fixed race conditions in assigning netconn->last_err (fixed bugs #38121 and #37676 )
11 years ago
sg
3e8ac30940
Fixed bug #44297 (CORE_LOCKING was broken some days ago); fixed that netconn_connect still used message passing for LWIP_TCPIP_CORE_LOCKING==1
11 years ago
sg
ec5cf8593e
Continued chrysn's work: changed nearly all functions taking 'ip(X)_addr_t' pointer to take const pointers (changed user callbacks: raw_recv_fn, udp_recv_fn; changed port callbacks: netif_output_fn, netif_igmp_mac_filter_fn)
11 years ago
sg
2cfc9e286e
"Not connected" shouldn't be fatal (as opposed to "closed")
11 years ago
sg
604a92dc3d
fixed bug #38853 "connect() use a wrong errno": return ERR_ALREADY/EALRADY during connect, ERR_ISCONN/EISCONN when already connected
11 years ago
goldsimon
0963e91c34
api_msg_c: fixed compiler warning (added brackets in if statement)
11 years ago
goldsimon
5d13b5a2fb
fixed bug #37614 "Errors from ipX_output are not processed". Now tcp_output(_segment) checks for the return value of ipX_output and does not try to send more on error. A netif driver can call tcp_txnow() (from tcpip_thread!) to try to send again if TX buffers are available again.
11 years ago
sg
276e35ecfb
Fixed a bug in linger-closing when LWIP_TCPIP_CORE_LOCKING==1
11 years ago
sg
7ff9825f55
started to implement fullduplex sockets/netconns (note that this is highly unstable yet!)
11 years ago
sg
6c3f6cfd89
netconn/socket api: fixed bug #44225 "closing TCP socket should time out eventually", implemented task #6930 "Implement SO_LINGER": closing TCP sockets times out after 20 seconds or after the configured SND_TIMEOUT or depending on the linger settings; fixed that netconn_close/netconn_delete still used message passing for LWIP_TCPIP_CORE_LOCKING==1
11 years ago
sg
ec68aaf43b
fixed that SHUT_RD followed by SHUT_WR was different to SHUT_RDWR, fixed return value of lwip_netconn_do_close on unconnected netconns
11 years ago
goldsimon
24df78bcbc
fixed that lwip_netconn_do_delconn() did not set msg->err on success (just introduced that bug this weekend...)
11 years ago
sg
cacdbb5262
added option LWIP_NETCONN_SEM_PER_THREAD to use a semaphore per thread instead of using one per netconn and per select call
11 years ago