216 Commits (2d5908f4dedeac4ae2f568bd6f06ea218de5a125)

Author SHA1 Message Date
fbernon 953d783a3e api.h, api_lib.c, api_msg.c, sockets.c: group the different NETCONN_UDPxxx code in only one part... 19 years ago
fbernon d1ef610822 Minor fix (spaces, indent) and check for LWIP_SO_RCVTIMEO.. 19 years ago
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. 19 years ago
goldsimon b5ab0c5285 Included some missing braces in lwip_send & lwip_sendto (if !LWIP_UDP && !LWIP_RAW) 19 years ago
goldsimon 2442b985bf Broke some (too long) lines down to multiple lines, made the file fit our coding standards 19 years ago
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). 19 years ago
fbernon 2106f491d0 Minors fix (spaces, comments, unused variable) 19 years ago
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. 19 years ago
goldsimon 613644bfc6 Re-included unneeded cases in do_disconnect() and do_send() to prevent warnings. 19 years ago
fbernon 7f5d6bc964 api_msg.c: Fix some errors forwarding (https://savannah.nongnu.org/task/?6880) 19 years ago
fbernon d5e37309e5 Minor Fix (unsed code, spaces, idents..) 19 years ago
fbernon 6bfa99a774 Minor fixs to reduce footprint on the "recv part" of Sequential API... 19 years ago
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). 19 years ago
goldsimon 5e9d80fbdb tcpip_input()/tcpip_ethinput(): don't free the pbuf if returning ERR_MEM, that is the netif driver's responsibility 19 years ago
goldsimon 2740a81103 If a udp_pcb has a local_ip set, check if it is the same as the one of the netif used for sending to prevent sending from old addresses after a netif address gets changed (partly fixes bug #3168). 19 years ago
fbernon 0f8a2d6418 tcpip.c, igmp.h, igmp.c: Fixed bug "#19800 : IGMP: igmp_tick() will not work with NO_SYS=1". Note that igmp_init is always in tcpip_thread (and not in tcpip_init) because we have to be sure that network interfaces are already added (mac filter is updated only in igmp_init for the moment). 19 years ago
goldsimon efd3104fd0 Fixed bug from patch #5865 by moving the defines for socket options (lwip_set/-getsockopt) used with level IPPROTO_TCP from tcp.h to sockets.h. 19 years ago
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). 19 years ago
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(). 19 years ago
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". 19 years ago
jifl e895aa71a4 * sockets.c: Fix ioctl FIONREAD when some data remains from last recv. 19 years ago
goldsimon 4bedb07aa0 Added some more LWIP_UNUSED_ARG()s 19 years ago
goldsimon 7932bf483b Ongoing fix to patch #5822: converted more statements like (void)arg; into LWIP_UNUSED_ARG(arg); 19 years ago
jifl 0c94f22ded * sys.h, api_lib.c: Provide new sys_mbox_tryfetch function. 19 years ago
fbernon 35893e36dd opt.h, tcpip.h, tcpip.c, netifapi.h, netifapi.c: New configuration option LWIP_NETIF_API allow to use thread-safe functions to add/remove netif in list, and to start/stop dhcp clients, using new functions from netifapi.h. Disable as default (no port change to do). 19 years ago
fbernon 787eecbf43 Fix mistakes in netconn's error field checking. 19 years ago
fbernon 5f1aac1450 api_msg.c: Fix bug #16830: "err_tcp() posts to connection mailbox when no pend on the mailbox is active". Now, the post is only done during a connect, and do_send, do_write and do_join_leave_group don't do anything if a previous error was signaled. 19 years ago
fbernon 7fdd312cca sockets.c: remplace ENOBUFS errors on alloc_socket by ENFILE to be more BSD compliant. 19 years ago
goldsimon f6bdd2cae4 Introduced #define LWIP_UNUSED_ARG(x) use this for and architecture-independent form to tell the compiler you intentionally are not using this variable. Can be overriden in cc.h. 19 years ago
fbernon f1412f5e5a api_msg.c: add a "pcb_new" helper function to avoid redundant code, and to add missing pcb allocations checking (in do_bind, and for each raw_new). Fix style. 19 years ago
fbernon 9ec08fa76a Missing recv_timeout initialize in accept_function. Minor style fix (indent, mbox checking...) 19 years ago
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. 19 years ago
goldsimon d956a39fec sockets.c Remove "#include <errno.h>" from sockets.c to avoid multiple 19 years ago
goldsimon bef0503545 Removed warning: sizeof() was automatically casted to negative 19 years ago
fbernon 19338d2774 opt.h, tcpip.c: New configuration option LWIP_ARP allow to disable ARP init at build time if you only use PPP or SLIP. The default is enable. Note we don't have to call etharp_init in your port's initilization sequence if you use tcpip.c, because this call is done in tcpip_init function. 19 years ago
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. 19 years ago
fbernon 544e469eeb api_msg.h, api_msg.c: Remove obsolete API_MSG_ACCEPT and do_accept (never used). 19 years ago
fbernon db739d16ce api_lib.c: somes resources couldn't be freed if there was errors during netconn_new_with_proto_and_callback. 19 years ago
goldsimon 776c01e60b fixed bug #5067 (essentialy a signed/unsigned warning fixed by casting to unsigned). 19 years ago
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. 19 years ago
fbernon bb34d8cfd1 api_msg.c, igmp.c, igmp.h: Fix C++ style comments 19 years ago
kieranm 7294cb080b * Fix all uses of pbuf_header to check the return value. In some 19 years ago
kieranm b422864d5d sockets.c, igmp.c, igmp.h, memp.h: Fix C++ style comments and 19 years ago
fbernon 713e89cdb2 tcpip.c: Initialize tcpip's mbox, and verify if initialized in tcpip_input, tcpip_ethinput, tcpip_callback, tcpip_apimsg, to fix a init problem with network interfaces. Also fix a compiler warning. 19 years ago
fbernon b035a6196a Add return types to tcpip_apimsg() and api_msg_post() to check ERR_MEM problems (api_lib.c can be change now). 19 years ago
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). 19 years ago
goldsimon bc4b3764fc Fixed bug #19251 (missing `const' qualifier in socket functions), to get more compatible to standard POSIX sockets. 19 years ago
fbernon 9b143dd5dc Based on patch from Dmitry Potapov, bug#19225. 19 years ago
fbernon 5c65d4733b Keepalive values can be configured at run time with LWIP_TCP_KEEPALIVE, but don't change this unless you know what you're doing (default are RFC1122 compliant). Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set in seconds. 19 years ago
fbernon fdcb87db19 Implement LWIP_SO_RCVTIMEO configuration option to enable/disable SO_RCVTIMEO on UDP sockets/netconn. 19 years ago