165 Commits (d8fe18c28e040c36edb5c32ffcb3f76830048541)

Author SHA1 Message Date
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)... 19 years ago
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...). 19 years ago
fbernon bdbc96f453 opt.h, mem.h, mem.c, memp.c, pbuf.c, ip_frag.c, vj.c: Fix bug #20162. Rename MEM_ALIGN in LWIP_MEM_ALIGN and MEM_ALIGN_SIZE in LWIP_MEM_ALIGN_SIZE to avoid some macro names collision with some OS macros. 19 years ago
goldsimon 046a270156 Added UDP lite support for sockets 19 years ago
goldsimon 2f293d53ba UDP Lite: corrected the use of chksum_len (based on RFC3828: if it's 0, create checksum over the complete packet. On RX, if it's < 8 (and not 0), discard the packet. Also removed the duplicate 'udphdr->chksum = 0' for both UDP & UDP Lite. 19 years ago
fbernon 1d7caed340 tcp_out.c: Fix for bug #20075 : "A problem with keep-alive timer and TCP flags" where TCP flags wasn't initialized in tcp_keepalive. Reported by Srinivas Gollakota with help of Oleg Tyshev. 19 years ago
goldsimon 95f4c02381 Included switch LWIP_UDPLITE (enabled by default) to switch off UDP-Lite support if not needed (reduces udp.c code size) 19 years ago
fbernon e01f342048 Contrib module by Dominik Spies: autoip.h, autoip.c, dhcp.h, dhcp.c, netif.h, netif.c, etharp.h, etharp.c, opt.h: AutoIP implementation available for IPv4, with new options LWIP_AUTOIP and LWIP_DHCP_AUTOIP_COOP if you want to cooperate with DHCP. Some tips to adapt (see TODO mark in the source code). 19 years ago
goldsimon c028619cdd Modified order of parameters for etharp_output() to match netif->output so etharp_output() can be used directly as netif->output to save one function call. 19 years ago
goldsimon 0e9cb48ea1 Changed define NETIF_INIT_SNMP(type, speed) to include the name of the struct netif to change... 19 years ago
goldsimon 945460c67e Added define NETIF_INIT_SNMP(type, speed) to initialize per-netif snmp variables, added initialization of those to slipif and loopif. 19 years ago
goldsimon 3a607a197e opt.h, ip_frag.c, ip_frag.h, ip.c: Added option IP_FRAG_USES_STATIC_BUF (defaulting to off for now) that can be set to 0 to send fragmented packets by passing PBUF_REFs down the stack. 19 years ago
goldsimon 974cf08e5d udp_input(): Input pbuf was not freed if pcb had no recv function registered, p->payload was modified without modifying p->len if sending icmp_dest_unreach() (had no negative effect but was definitively wrong). 19 years ago
goldsimon 7abfe74fa4 Corrected bug #19937: ICMP assumes p_buf has space for ethernet header. Allocating new pbuf if the input pbuf isn't big enough. 19 years ago
goldsimon add68e0da1 Checked in patch #5914: Moved sockopt processing into tcpip_thread. 19 years ago
fbernon 0a4130a4ff Minor, fix files modified by last patch... 19 years ago
fbernon a3fdc33f88 api_lib.c: Implement SO_RCVTIMEO for accept and recv on TCP connections, such present in patch #5959. 19 years ago
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. 19 years ago
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). 19 years ago
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 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 0aaf69769f Fixed bug #1895 (tcp_bind not correct) by introducing a list of bound but unconnected (and non-listening) tcp_pcbs. 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
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 a4f4e6e71d Addition to patch #5913: decrease size of memp_memory. 19 years ago
goldsimon 5c89228878 Fix bug #19729: free pbuf if netif->input() returns != ERR_OK. 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 fd982597fe Removed semaphores from memp, changed sys_sem_wait calls into sys_arch_sem_wait calls to prevent timers from running while waiting for the heap. This fixes bug #19167. 19 years ago
goldsimon 62d705903e task #6831: removed the option PBUF_POOL_USES_MEMP and removed the old pbuf pool code, pbuf pool now always allocates from a memp pool 19 years ago
goldsimon a5e2e9ea03 (see task #6831): Included new option PBUF_POOL_USES_MEMP to use a memp pool for PBUF_POOL pbufs instead of the old pool implementation in pbuf.c to remove redundant code. 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 84fc489e0c Included patch #5448: include '#ifdef __cplusplus \ extern "C" {' in all header files. Now you can write your application using the lwIP stack in C++ and simply #include the core files. Note I have left out the netif/ppp/*h header files for now, since I don't know which files are included by applications and which are for internal use only. 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
goldsimon 1571881f7a If MEM_LIBC_MALLOC==1, allow the defines (e.g. mem_malloc() -> malloc()) to be overriden in case the C-library malloc implementation is not protected against concurrent access. 19 years ago
goldsimon 824ef1ff2c Another attempt to fix bug #17922 19 years ago
goldsimon 79d9b36ece Further update to ARP queueing: Changed pbuf_copy() implementation so that it can be reused (don't allocate the target pbuf inside pbuf_copy()). 19 years ago
goldsimon be316e81a7 Introduced fast one-entry-cache to speed up ARP lookup when sending multiple packets to the same host. 19 years ago
goldsimon 7f232b43ff checked in patch #5913: in memp_malloc() we can return memp as mem to save a little RAM (next pointer of memp is not used while not in pool). 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 02e194b15f fix bug #2595: "loopif results 19 years ago
jifl eacac8ee1d * sockets.h: FD_SETSIZE needs to match number of sockets, which is 19 years ago
jifl cd19d81411 * pbuf.c: Use s32_t in pbuf_realloc(), as an s16_t can't reliably hold 19 years ago
jifl 748ba22a19 * icmp.c: Reset IP header TTL in ICMP ECHO responses (bug #19580). 19 years ago
goldsimon e54f3fdaac 3rd fix for bug #11400 (arp-queuing): More pbufs than previously thought need to be copied (everything but PBUF_ROM!). Cleaned up pbuf.c: removed functions no needed any more (by etharp). 19 years ago
jifl e8b055b8d3 Oops, forgot final version of Changelog for last change I made. 19 years ago
jifl 0c94f22ded * sys.h, api_lib.c: Provide new sys_mbox_tryfetch function. 19 years ago
kieranm 05909d6fa7 Apply patch #5745: Fix "Constant is long" warnings with 16bit 19 years ago