Commit Graph

666 Commits

Author SHA1 Message Date
Dirk Ziegelmeier
30e6f908ee Fix bug #47512: MPU_COMPATIBLE may fail on empty pool 2016-04-27 21:14:17 +02:00
Dirk Ziegelmeier
e653ac9db7 Remove netconn_recved() call - it was only needed in sockets implementation and contributed to bug #47512
Simon and I think it can be removed - the receive window handling get a little less precise, but that should be OK for a lightweight stack.
Receive window is now updated with the whole pbuf size (instead of only count of read bytes from socket) as soon as socket implementation gets a pbuf from netconn layer.
Work on bug #47512: MPU_COMPATIBLE may fail on empty pool (still not finished)
2016-04-27 21:02:16 +02:00
Dirk Ziegelmeier
21354af674 Work on bug #47512: MPU_COMPATIBLE may fail on empty pool (still not finished) 2016-04-27 12:49:06 +02:00
Dirk Ziegelmeier
21e6e1c824 Fix compile errors found by Erik Ekman's Travis-CI 2016-04-26 22:09:23 +02:00
Dirk Ziegelmeier
b07031479c Revert "tcpip_send_msg_wait_sem() can return void now due to my last changes"
My brain was asleep

This reverts commit 475be665ff.
2016-04-26 22:03:18 +02:00
Dirk Ziegelmeier
475be665ff tcpip_send_msg_wait_sem() can return void now due to my last changes 2016-04-26 21:40:19 +02:00
Dirk Ziegelmeier
3d38af5174 Work on bug #47512: MPU_COMPATIBLE may fail on empty pool (not finished!) 2016-04-26 21:33:02 +02:00
Dirk Ziegelmeier
b28a80375b Fix bug #47446: tcpip api calls: fail if mbox is invalid instead of returning an error 2016-04-26 21:09:03 +02:00
Dirk Ziegelmeier
5a123a3405 tcpip_priv.h: More flexible API by including return value in API_VAR_ALLOC macro 2016-04-25 21:00:28 +02:00
Dirk Ziegelmeier
2be86fbc3e Fix compile of api_lib.c when LWIP_MPU_COMPATIBLE is enabled 2016-04-25 20:50:14 +02:00
Dirk Ziegelmeier
749f7fae1a Move PPP API files to netif/ppp subdir 2016-04-21 21:47:26 +02:00
Dirk Ziegelmeier
309e072238 Create new IP_IS_V4 macros and use them at instead of !IP_IS_V6 - since we now have an IPADDR_ANY_TYPE, just checking for !V6 does not mean it is V4 2016-04-06 22:31:31 +02:00
sg
16c70dd60e fixed bug# 43739 (Accept not reporting errors about aborted connections): netconn_accept() returns ERR_ABRT (sockets: ECONNABORTED) for aborted connections, ERR_CLSD (sockets: EINVAL) if the listening netconn is closed, which better seems to follow the standard 2016-04-05 21:42:10 +02:00
Dirk Ziegelmeier
3a7c998f91 Fix bug #47592: pppapi_do_ppp_set_notify_phase_callback has invalid parameter type
... and one more I missed in my conversion yesterday
2016-04-01 10:38:27 +02:00
Dirk Ziegelmeier
141aeaab3d Fix shadowing warning (when compiling in C++) in TCPIP call API. Reported by Freddie Chopin. 2016-03-31 19:52:20 +02:00
sg
27f03798b9 Fixed possible problems with tcp_backlog_delayed/tcp_backlog_accepted 2016-03-25 16:19:39 +01:00
sg
7721b20179 call accept-callback with ERR_MEM when allocating a pcb fails on passive open to inform the application about this error; ATTENTION: applications have to handle NULL pcb in accept callback! 2016-03-23 21:57:38 +01:00
goldsimon
85d5fbdc7f lwip_accept: fixed returning EOPNOTSUPP instead of -1 (EOPNOTSUPP is set as socket error) 2016-03-23 14:27:40 +01:00
Dirk Ziegelmeier
7e7f2f31ff Cleanup and simplify tcpip_api_call() implementation a bit 2016-03-22 21:52:11 +01:00
Dirk Ziegelmeier
a1fc91afa8 Fix newly introduced tcpip_api_call did not return correct return value 2016-03-22 21:34:05 +01:00
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) 2016-03-22 07:30:44 +01:00
sg
44e1a2d8e2 define tcp_backlog_set() as dummy-define when backlog feature is disable 2016-03-18 20:05:04 +01:00
sg
149bb36805 fixed bug #47448 (netconn/socket leak if RST is received during close) 2016-03-17 21:49:01 +01:00
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>
2016-03-17 21:00:18 +01:00
sg
b24e5cd1c8 fixed compiling netconn_write_partly with LWIP_SO_SNDTIMEO==1 after recent api implementation changes (bug #47436, patch by William Hayes) 2016-03-17 20:15:22 +01:00
Dirk Ziegelmeier
7fbb5fc82a Fix netconn API in core locking mode 2016-03-17 09:31:50 +01:00
Dirk Ziegelmeier
7aea739f87 PPPAPI: Don't return garbage in *_create calls in case tcpip_api_call() fails;
Let some functions return err_t instead of void because tcpip_api_call() may fail
2016-03-16 23:01:05 +01:00
Dirk Ziegelmeier
ee87d28252 Rename tcpip_apimsg to netconn_apimsg (better suits naming convention in api_lib.c) 2016-03-16 22:02:47 +01:00
Dirk Ziegelmeier
d6adc1f6cb Rename tcpip_send_api_msg to tcpip_send_msg_wait_sem (hopefully a little bit clearer name) 2016-03-16 21:57:24 +01:00
Dirk Ziegelmeier
d38cdccbcd netconn API: Remove api_msg wrapper struct, it is not needed any more 2016-03-16 21:35:21 +01:00
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 2016-03-16 21:35:21 +01:00
Dirk Ziegelmeier
ea174560b1 tcpip.c tcpip_send_api_msg: Handle core locking case internally 2016-03-16 21:35:21 +01:00
Dirk Ziegelmeier
bc51dddcaf Add some comments to functions and #defines. According to Simon, LWIP core locking is not experimental any more. 2016-03-16 21:35:21 +01:00
Dirk Ziegelmeier
0d576aa521 Fix bug #47426 incorrect typecast in pppapi.c 2016-03-16 12:37:08 +01:00
Dirk Ziegelmeier
1d7996dc47 tcpip API calls: Implement LWIP_NETCONN_SEM_PER_THREAD support for ALL API calls 2016-03-13 19:43:49 +01:00
Dirk Ziegelmeier
00975769a0 Minor TCPIP API call functions cleanup 2016-03-10 22:44:31 +01:00
Dirk Ziegelmeier
f7a3d6cca5 Port PPP API to new simple tcpip API call method 2016-03-10 22:44:25 +01:00
Dirk Ziegelmeier
8f71795844 Port netifapi to new simple tcpip API call method 2016-03-10 22:42:21 +01:00
Dirk Ziegelmeier
8106413644 tcpip.c: Implement an easier way for TCPIP API calls - client code does not have to deal with semaphores and core locking any more 2016-03-10 22:42:21 +01:00
sg
5e472badf1 Work on bug #44595: remove check for recvmbox != NULL from netconn_recv() to let it return ERR_CLSD for half-closed TCP connections 2016-03-10 21:20:25 +01:00
Dirk Ziegelmeier
ba40925335 tcpip_send_api_msg function is only needed in non-core-locking mode 2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
eab92ccb03 netifapi: Eliminate wrapper struct netifapi_msg and rename netifapi_msg_msg to netifapi_msg 2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
fc17d02451 Fix compile with LWIP_TCPIP_CORE_LOCKING 2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
37d514c949 Minor cleanups in #includes and comments 2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
c65eca58c9 Decouple tcpip.c/tcpip_priv.h from netconn API 2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
18bb74e5c5 Decouple tcpip.c/tcpip_priv.h from PPP API
PPP API can now be moved to netif/ppp subdir
2016-03-08 19:41:32 +01:00
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
2016-03-08 19:41:32 +01:00
Joel Cunningham
80cc988f2f Optimize sendmsg UDP pbuf chain creation
This commit optimizes the sendmsg UDP pbuf chain creation by not
allocating/freeing a netbuf per io vector and instead building a pbuf
chain directly in the sockets layer
2016-03-07 09:26:58 -06:00
sg
076795562e fixed typo in one of the last commits 2016-03-06 20:59:50 +01:00
sg
375ec36246 ERR_IF is not necessarily a fatal error (fixes bug #46338: UDP netconns block after fatal error) 2016-03-05 16:15:04 +01:00