184 Commits (3a0ab861c20a31bcb38ececf2b1368bb81787231)

Author SHA1 Message Date
goldsimon 96e4ec4a15 Added option LWIP_NETIF_HWADDRHINT (default=off) to cache ARP table indices with each pcb instead of single-entry cache for the complete stack. 19 years ago
goldsimon fa4b711495 Added some ASSERTS and casts to prevent warnings when assigning to smaller types. 19 years ago
fbernon b6750de9e8 sockets.h, sockets.c: Implement MSG_PEEK flag for recv/recvfrom functions. 19 years ago
goldsimon 6c3c184bc7 Added check to prevent tcp_pcb->snd_queuelen from overflowing. 19 years ago
goldsimon 24e29cecae Fixed bug #20287: Fixed nagle algorithm (sending was done too early if a segment contained chained pbufs) 19 years ago
fbernon ab4c3a326f autoip.c: replace most of rand() calls by a macro LWIP_AUTOIP_RAND which compute a "pseudo-random" value based on netif's MAC and some autoip fields. It's always possible to define this macro in your own lwipopts.h to always use C library's rand(). Note that autoip_create_rand_addr doesn't use this macro. 19 years ago
fbernon d6fbe45296 netifapi.h, netifapi.c, tcpip.h, tcpip.c: Update code to handle the option LWIP_TCPIP_CORE_LOCKING, and do some changes to be coherent with last modifications in api_lib/api_msg (use pointers and not type with table, etc...) 19 years ago
goldsimon 2270f0d172 Fixed bug #20259: struct udp_hdr was lacking the packin defines. 19 years ago
goldsimon dcc2247a90 Fixed bug #20253: icmp_dest_unreach was called with a wrong p->payload for udp packets with no matching pcb. 19 years ago
goldsimon 00b7aeb49b Fixed bug #20220: UDP PCB search in udp_input(): a non-local match could get udp input packets if the remote side matched. 19 years ago
goldsimon b51d1b79a3 Combined etharp_request with etharp_raw for both LWIP_AUTOIP =0 and =1 to remove redundant code. 19 years ago
goldsimon 0c18e653e8 Introduced the option MEM_USE_POOLS to use 4 pools with different sized elements instead of a heap. This both prevents memory fragmentation and gives a higher speed at the cost of more memory consumption. Turned off by default. 19 years ago
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). 19 years ago
goldsimon 2aef8bad55 Moved the nagle algorithm from netconn_write/do_write into a define (tcp_output_nagle) in tcp.h to provide it to raw api users, too. 19 years ago
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. 19 years ago
goldsimon d3f0a3211d Changed etharp to use a defined hardware address length of 6 to avoid loading netif->hwaddr_len every time (since this file is only used for ethernet and struct eth_addr already had a defined length of 6). 19 years ago
goldsimon ea7b0052f3 Implemented socket options SO_NO_CHECK for UDP sockets to disable UDP checksum generation on transmit. 19 years ago
goldsimon cbf281589b Fixed bug #20180 (TCP pcbs listening on IP_ADDR_ANY could get changed in netif_set_ipaddr if previous netif->ip_addr.addr was 0. 19 years ago
goldsimon 15e8208457 pcb_new sets conn->err if protocol is not implemented -> netconn_new_..() does not allocate a new connection for unsupported protocols. 19 years ago
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