goldsimon
|
b1a4b00091
|
Preprocessor statements have to start at the beginning of a line for old compilers!
|
2007-10-09 19:30:17 +00:00 |
|
fbernon
|
87e16a8f47
|
sockets.c, api.h, api_lib.c: First step to fix "bug #20900 : Potential crash error problem with netconn_peer & netconn_addr". VERY IMPORTANT: this change cause an API breakage for netconn_peer, since a parameter type change. Any compiler should cause an error without any changes in yours netconn_peer calls (so, it can't be a "silent change"). It also reduce a little bit the footprint for socket layer (lwip_getpeername & lwip_getsockname use now a common lwip_getaddrname function since netconn_peer & netconn_addr have the same parameters).
|
2007-10-07 17:26:54 +00:00 |
|
fbernon
|
95f2d48ac4
|
Avoid to lost previous error codes in sockets.c and api_lib.c.
|
2007-09-13 15:03:42 +00:00 |
|
fbernon
|
e3cd1ac1f9
|
Minor changes (but in lot of files): add #if/#endif for options where they could miss. #if LWIP_xxx if always put after #include "lwip/opt.h" (note this one indirectly include cc.h). Move others includes inside #if/#endif block.
|
2007-09-07 23:01:59 +00:00 |
|
fbernon
|
245bce04d1
|
Add netbuf.h, netbuf.c, Change api.h, api_lib.c: #7249 "Split netbuf functions from api/api_lib". Now netbuf API is independant of netconn, and can be used with other API (application based on raw API, or future "socket2" API). Ports maintainers just have to add src/api/netbuf.c in their makefile/projects.
|
2007-08-30 16:55:10 +00:00 |
|
fbernon
|
54c1025ec0
|
First fix for "bug #20900 : Potential crash error problem with netconn_peer & netconn_addr". Introduce NETCONN_LISTEN netconn_state and remove obsolete ones (NETCONN_RECV & NETCONN_ACCEPT).
|
2007-08-27 10:08:53 +00:00 |
|
marcbou
|
07223bf5ef
|
Backed out last change to netconn_delete() after discussion with Frederic.
|
2007-08-16 23:06:42 +00:00 |
|
marcbou
|
17f07a36ef
|
netconn_delete(): unblock potentially waiting recv.
|
2007-08-16 20:03:23 +00:00 |
|
fbernon
|
9152d6671c
|
Comments Fix for Doxygen documentation
|
2007-08-09 22:21:44 +00:00 |
|
goldsimon
|
f9c30017b0
|
Fixed bug #20429: use the new pbuf_copy_partial instead of the old copy_from_pbuf, which illegally modified the given pbuf; Introduced pbuf_copy_partial, making netbuf_copy_partial use this function.
|
2007-07-25 18:53:45 +00:00 |
|
goldsimon
|
eb875de67e
|
Added assertions where PBUF_RAM pbufs are used and an assumption is made that this pbuf is in one piece (i.e. not chained). These assumptions clash with the possibility of converting to fully pool-based pbuf implementations, where PBUF_RAM pbufs might be chained.
|
2007-07-03 20:28:35 +00:00 |
|
goldsimon
|
9a4a5b1816
|
Final fix for bug #20021 and some other problems when closing tcp netconns: removed conn->sem, less context switches when closing, both netconn_close and netconn_delete should safely close tcp connections.
|
2007-07-03 19:29:59 +00:00 |
|
fbernon
|
af71292aba
|
Minor fix (extra spaces)
|
2007-06-29 13:37:33 +00:00 |
|
goldsimon
|
bb9e9e5480
|
Changed the expression of LWIP_ERROR to the same as for LWIP_ASSERT
|
2007-06-22 20:50:21 +00:00 |
|
goldsimon
|
f49fc35f55
|
Converted the length argument of netconn_write (and therefore also api_msg_msg.msg.w.len) from u16_t into int to be able to send a bigger buffer than 64K with one time (mainly used from lwip_send).
|
2007-06-21 19:32:26 +00:00 |
|
goldsimon
|
9f05cabf87
|
Fixed bug #20021: Moved sendbuf-processing in netconn_write from api_lib.c to api_msg.c to also prevent multiple context-changes on low memory or empty send-buffer.
|
2007-06-21 18:40:21 +00:00 |
|
goldsimon
|
173e63f01b
|
Minor fix: coding style
|
2007-06-16 15:03:09 +00:00 |
|
goldsimon
|
775deefeaa
|
Done some work on task #1549 (function documentation), added some LWIP_ERROR checks, created define instead of extra-function for netconn_new, netconn_new_with_callback and netconn_err
|
2007-06-16 13:57:30 +00:00 |
|
fbernon
|
d8fe18c28e
|
api_lib.c: change return expression in netconn_addr and netconn_peer, because conn->err was reset to ERR_OK without any reasons (and error was lost)...
|
2007-06-13 18:08:49 +00:00 |
|
fbernon
|
9ee85fb1b6
|
debug.h, api_msg.c: change LWIP_ERROR to use it to check errors like invalid pointers or parameters, and let the possibility to redefined it in cc.h. Use this macro to check "conn" parameter in api_msg.c functions (some others change will be done...).
|
2007-06-13 18:00:54 +00:00 |
|
fbernon
|
090aaefb39
|
Add LWIP_TCPIP_CORE_LOCKING option (0 as default value) to experiment "locking" as feature to communicate with tcpip_thread for sequential API (netconn & socket layers). Add a alternative code for lwip_sendto to how the code can be optimized with such feature....
|
2007-06-08 19:27:59 +00:00 |
|
fbernon
|
a3fdc33f88
|
api_lib.c: Implement SO_RCVTIMEO for accept and recv on TCP connections, such present in patch #5959.
|
2007-05-23 19:18:09 +00:00 |
|
fbernon
|
a330917ee8
|
api_lib.c, sockets.c: Fixed bug #5958 for netconn_listen (acceptmbox only allocated by do_listen if success) and netconn_accept errors handling. In most of api_lib functions, we replace some errors checkings like "if (conn==NULL)" by ASSERT, except for netconn_delete.
|
2007-05-23 18:43:30 +00:00 |
|
fbernon
|
0fe5dd8d43
|
api_lib.c: Fixed bug #5957 "Safe-thread problem inside netconn_recv" to return an error code if it's impossible to fetch a pbuf on a TCP connection (and not directly close the recvmbox).
|
2007-05-23 17:53:35 +00:00 |
|
fbernon
|
953d783a3e
|
api.h, api_lib.c, api_msg.c, sockets.c: group the different NETCONN_UDPxxx code in only one part...
|
2007-05-23 17:46:53 +00:00 |
|
fbernon
|
d1ef610822
|
Minor fix (spaces, indent) and check for LWIP_SO_RCVTIMEO..
|
2007-05-22 21:29:04 +00:00 |
|
fbernon
|
2ff620e1b5
|
sys.h, sys.c, api_lib.c, tcpip.c: remove sys_mbox_fetch_timeout() (was only used for LWIP_SO_RCVTIMEO option) and use sys_arch_mbox_fetch() instead of sys_mbox_fetch() in api files. Now, users SHOULD NOT use internal lwIP features like "sys_timeout" in their application threads.
|
2007-05-22 20:51:34 +00:00 |
|
fbernon
|
499f4689be
|
api.h, api_lib.c, api_msg.h, api_msg.c: change the struct api_msg_msg to see which parameters are used by which do_xxx function, and to avoid "misusing" parameters (patch #5938).
|
2007-05-22 09:54:00 +00:00 |
|
goldsimon
|
81ac03a28b
|
Included patch #5938: changed raw_pcb.protocol from u16_t to u8_t since for IPv4 and IPv6, proto is only 8 bits wide. This affects the api, as there, the protocol was u16_t, too.
|
2007-05-22 07:31:06 +00:00 |
|
fbernon
|
6bfa99a774
|
Minor fixs to reduce footprint on the "recv part" of Sequential API...
|
2007-05-19 13:54:56 +00:00 |
|
goldsimon
|
8fa3b6802e
|
Added #if !NO_SYS to most of the api files since they only work with a sys layer (makes it easier for port projects).
|
2007-05-18 11:27:46 +00:00 |
|
fbernon
|
9cf1390dc6
|
sockets.c, api_lib.c, api_msg.h, api_msg.c, netifapi.h, netifapi.c, tcpip.c: Include a function pointer instead of a table index in the message to reduce footprint. Disable some part of lwip_send and lwip_sendto if some options are not set (LWIP_TCP, LWIP_UDP, LWIP_RAW).
|
2007-05-11 08:58:23 +00:00 |
|
goldsimon
|
255d5a748f
|
Included patch #5920: Create define to override C-library memcpy. 2 Defines are created: MEMCPY() for normal memcpy, SMEMCPY() for situations where some compilers might inline the copy and save a function call. Also replaced all calls to memcpy() with calls to (S)MEMCPY().
|
2007-05-10 05:20:05 +00:00 |
|
fbernon
|
5a12aeb4a1
|
sockets.c, api.h, api_lib.c, api_msg.h, api_msg.c: Fix bug #19162 "lwip_sento: a possible to corrupt remote addr/port connection state". Reduce problems "not enought memory" with netbuf (if we receive lot of datagrams). Improve lwip_sendto (only one exchange between sockets api and api_msg which run in tcpip_thread context). Add netconn_sento function. WARNING, if you directly access to "fromaddr" & "fromport" field from netbuf struct, these fields are now renamed "addr" & "port".
|
2007-05-04 15:18:29 +00:00 |
|
jifl
|
0c94f22ded
|
* sys.h, api_lib.c: Provide new sys_mbox_tryfetch function.
Require ports to provide new sys_arch_mbox_tryfetch function to get
a message if one is there, otherwise return with SYS_MBOX_EMPTY.
|
2007-04-11 15:41:03 +00:00 |
|
fbernon
|
913a99dd35
|
api.h, api_lib.c, sockets.c: netbuf_ref doesn't check its internal pbuf_alloc call result and can cause a crash. lwip_send now check netbuf_ref result.
|
2007-03-28 17:26:06 +00:00 |
|
fbernon
|
005e5f2f72
|
api_lib.c (from Dmitry Potapov) : patch for netconn_write(), fixes a possible race condition which cause to send some garbage. It is not a definitive solution, but the patch does solve the problem for most cases.
|
2007-03-26 15:37:48 +00:00 |
|
fbernon
|
db739d16ce
|
api_lib.c: somes resources couldn't be freed if there was errors during netconn_new_with_proto_and_callback.
|
2007-03-22 09:27:04 +00:00 |
|
fbernon
|
3eb38d7611
|
api_lib.c, api_msg.c, tcpip.c: integrate sys_mbox_fetch(conn->mbox, NULL) calls from api_lib.c to tcpip.c's tcpip_apimsg(). Now, use a local variable and not a dynamic one from memp to send tcpip_msg to tcpip_thread in a synchrone call. Free tcpip_msg from tcpip_apimsg is not done in tcpip_thread. This give a faster and more reliable communication between api_lib and tcpip.
|
2007-03-21 16:38:58 +00:00 |
|
fbernon
|
a24a170b84
|
New configuration option LWIP_IGMP to enable IGMP processing. Based on only one filter per all network interfaces. Declare a new function in netif to enable to control the MAC filter (to reduce lwIP traffic processing).
Mace Gael for the upper layers, Steve Reynolds for lower ones...
|
2007-03-11 19:16:38 +00:00 |
|
goldsimon
|
bc4b3764fc
|
Fixed bug #19251 (missing `const' qualifier in socket functions), to get more compatible to standard POSIX sockets.
|
2007-03-11 17:57:13 +00:00 |
|
fbernon
|
fdcb87db19
|
Implement LWIP_SO_RCVTIMEO configuration option to enable/disable SO_RCVTIMEO on UDP sockets/netconn.
|
2007-03-08 20:58:46 +00:00 |
|
fbernon
|
7fd37d4e87
|
Implement SO_RCVTIMEO on UDP sockets/netconn.
|
2007-03-06 16:41:02 +00:00 |
|
fbernon
|
12e0a2ef7d
|
api_lib.c: Fix "[patch #5764] api_lib.c cleanup: after patch #5687" (from Dmitry Potapov).
The api_msg struct stay on the stack (not moved to netconn struct).
|
2007-03-04 14:49:46 +00:00 |
|
kieranm
|
527d18a526
|
2007-02-28 Kieran Mansley (based on patch from Simon Goldschmidt)
* api_lib.c, tcpip.c, memp.c, memp.h: make API msg structs allocated
on the stack and remove the API msg type from memp
|
2007-02-28 14:15:43 +00:00 |
|
jifl
|
de665f7cf9
|
2007-02-26 Jonathan Larmour (based on patch from Simon Goldschmidt)
* api_lib.c: Use memcpy in netbuf_copy_partial.
|
2007-02-26 19:49:49 +00:00 |
|
christiaans
|
b5f4672155
|
Partially accepted patch #5449 for ANSI C compatibility / build fixes. Fixed bug #17574 corrected UDP-Lite protocol identifier.
|
2006-10-11 12:04:04 +00:00 |
|
christiaans
|
7026bbcdd4
|
Removed conn->sem creation and destruction from netconn_write() and added sys_sem_new to netconn_new_*
|
2006-05-26 07:39:39 +00:00 |
|
christiaans
|
e1b215aa73
|
Introduced cc.h formatters and removed SO_REUSE from transport layers.
|
2005-11-25 12:03:38 +00:00 |
|
kieranm
|
19d8ffe177
|
Kieran Mansley - kjm25@cam.ac.uk - 20th September 2004
* Check if the pbuf is NULL before freeing it, when draining the mbox as part of netconn_delete.
|
2004-09-20 16:58:01 +00:00 |
|