3 * TODO: The lwIP source code makes some invalid assumptions on processor
4 word-length, storage sizes and alignment. See the mailing lists for
5 problems with exoteric (/DSP) architectures showing these problems.
6 We still have to fix some of these issues neatly.
8 * TODO: the ARP layer is not protected against concurrent access. If
9 you run from a multitasking OS, serialize access to ARP (called from
10 your network device driver and from a timeout thread.)
12 * TODO: the PPP code is broken in a few ways. There are namespace
13 collisions on BSD systems and many assumptions on word-length
14 (sizeof(int)). In ppp.c an assumption is made on the availability of
15 a thread subsystem. Either PPP needs to be moved to contrib/ports/???
16 or rearranged to be more generic.
22 * [New changes go here]
26 2006-03-03 Christiaan Simons
27 * ipv4/ip_frag.c: Added bound-checking assertions on ip_reassbitmap
28 access and added pbuf_alloc() return value checks.
30 2006-01-01 Leon Woestenberg <leon.woestenberg@gmx.net>
31 * tcp_{in,out}.c, tcp_out.c: Removed 'even sndbuf' fix in TCP, which is
32 now handled by the checksum routine properly.
34 2006-02-27 Leon Woestenberg <leon.woestenberg@gmx.net>
35 * pbuf.c: Fix alignment; pbuf_init() would not work unless
36 pbuf_pool_memory[] was properly aligned. (Patch by Curt McDowell.)
38 2005-12-20 Leon Woestenberg <leon.woestenberg@gmx.net>
39 * tcp.c: Remove PCBs which stay in LAST_ACK state too long. Patch
40 submitted by Mitrani Hiroshi.
42 2005-12-15 Christiaan Simons
43 * inet.c: Disabled the added summing routine to preserve code space.
45 2005-12-14 Leon Woestenberg <leon.woestenberg@gmx.net>
46 * tcp_in.c: Duplicate FIN ACK race condition fix by Kelvin Lawson.
47 Added Curt McDowell's optimized checksumming routine for future
48 inclusion. Need to create test case for unaliged, aligned, odd,
49 even length combination of cases on various endianess machines.
51 2005-12-09 Christiaan Simons
52 * inet.c: Rewrote standard checksum routine in proper portable C.
54 2005-11-25 Christiaan Simons
55 * udp.c tcp.c: Removed SO_REUSE hack. Should reside in socket code only.
56 * *.c: introduced cc.h LWIP_DEBUG formatters matching the u16_t, s16_t,
57 u32_t, s32_t typedefs. This solves most debug word-length assumes.
59 2005-07-17 Leon Woestenberg <leon.woestenberg@gmx.net>
60 * inet.c: Fixed unaligned 16-bit access in the standard checksum
61 routine by Peter Jolasson.
62 * slipif.c: Fixed implementation assumption of single-pbuf datagrams.
64 2005-02-04 Leon Woestenberg <leon.woestenberg@gmx.net>
65 * tcp_out.c: Fixed uninitialized 'queue' referenced in memerr branch.
66 * tcp_{out|in}.c: Applied patch fixing unaligned access.
68 2005-01-04 Leon Woestenberg <leon.woestenberg@gmx.net>
69 * pbuf.c: Fixed missing semicolon after LWIP_DEBUG statement.
71 2005-01-03 Leon Woestenberg <leon.woestenberg@gmx.net>
72 * udp.c: UDP pcb->recv() was called even when it was NULL.
76 2004-12-28 Leon Woestenberg <leon.woestenberg@gmx.net>
77 * etharp.*: Disabled multiple packets on the ARP queue.
78 This clashes with TCP queueing.
80 2004-11-28 Leon Woestenberg <leon.woestenberg@gmx.net>
81 * etharp.*: Fixed race condition from ARP request to ARP timeout.
82 Halved the ARP period, doubled the period counts.
83 ETHARP_MAX_PENDING now should be at least 2. This prevents
84 the counter from reaching 0 right away (which would allow
85 too little time for ARP responses to be received).
87 2004-11-25 Leon Woestenberg <leon.woestenberg@gmx.net>
88 * dhcp.c: Decline messages were not multicast but unicast.
89 * etharp.c: ETHARP_CREATE is renamed to ETHARP_TRY_HARD.
90 Do not try hard to insert arbitrary packet's source address,
91 etharp_ip_input() now calls etharp_update() without ETHARP_TRY_HARD.
92 etharp_query() now always DOES call ETHARP_TRY_HARD so that users
93 querying an address will see it appear in the cache (DHCP could
94 suffer from this when a server invalidly gave an in-use address.)
95 * ipv4/ip_addr.h: Renamed ip_addr_maskcmp() to _netcmp() as we are
96 comparing network addresses (identifiers), not the network masks
98 * ipv4/ip_addr.c: ip_addr_isbroadcast() now checks that the given
99 IP address actually belongs to the network of the given interface.
101 2004-11-24 Kieran Mansley <kjm25@cam.ac.uk>
102 * tcp.c: Increment pcb->snd_buf when ACK is received in SYN_SENT state.
106 2004-10-16 Kieran Mansley <kjm25@cam.ac.uk>
107 * tcp.c: Add code to tcp_recved() to send an ACK (window update) immediately,
108 even if one is already pending, if the rcv_wnd is above a threshold
109 (currently TCP_WND/2). This avoids waiting for a timer to expire to send a
110 delayed ACK in order to open the window if the stack is only receiving data.
112 2004-09-12 Kieran Mansley <kjm25@cam.ac.uk>
113 * tcp*.*: Retransmit time-out handling improvement by Sam Jansen.
115 2004-08-20 Tony Mountifield <tony@softins.co.uk>
116 * etharp.c: Make sure the first pbuf queued on an ARP entry
117 is properly ref counted.
119 2004-07-27 Tony Mountifield <tony@softins.co.uk>
120 * debug.h: Added (int) cast in LWIP_DEBUGF() to avoid compiler
121 warnings about comparison.
122 * pbuf.c: Stopped compiler complaining of empty if statement
123 when LWIP_DEBUGF() empty. Closed an unclosed comment.
124 * tcp.c: Stopped compiler complaining of empty if statement
125 when LWIP_DEBUGF() empty.
126 * ip.h Corrected IPH_TOS() macro: returns a byte, so doesn't need htons().
127 * inet.c: Added a couple of casts to quiet the compiler.
128 No need to test isascii(c) before isdigit(c) or isxdigit(c).
130 2004-07-22 Tony Mountifield <tony@softins.co.uk>
131 * inet.c: Made data types consistent in inet_ntoa().
132 Added casts for return values of checksum routines, to pacify compiler.
133 * ip_frag.c, tcp_out.c, sockets.c, pbuf.c
134 Small corrections to some debugging statements, to pacify compiler.
136 2004-07-21 Tony Mountifield <tony@softins.co.uk>
137 * etharp.c: Removed spurious semicolon and added missing end-of-comment.
138 * ethernetif.c Updated low_level_output() to match prototype for
139 netif->linkoutput and changed low_level_input() similarly for consistency.
140 * api_msg.c: Changed recv_raw() from int to u8_t, to match prototype
141 of raw_recv() in raw.h and so avoid compiler error.
142 * sockets.c: Added trivial (int) cast to keep compiler happier.
143 * ip.c, netif.c Changed debug statements to use the tidier ip4_addrN() macros.
149 2004-07-05 Leon Woestenberg <leon.woestenberg@gmx.net>
150 * sockets.*: Restructured LWIP_PRIVATE_TIMEVAL. Make sure
151 your cc.h file defines this either 1 or 0. If non-defined,
153 * .c: Added <string.h> and <errno.h> includes where used.
154 * etharp.c: Made some array indices unsigned.
156 2004-06-27 Leon Woestenberg <leon.woestenberg@gmx.net>
157 * netif.*: Added netif_set_up()/down().
158 * dhcp.c: Changes to restart program flow.
160 2004-05-07 Leon Woestenberg <leon.woestenberg@gmx.net>
161 * etharp.c: In find_entry(), instead of a list traversal per candidate, do a
162 single-pass lookup for different candidates. Should exploit locality.
164 2004-04-29 Leon Woestenberg <leon.woestenberg@gmx.net>
165 * tcp*.c: Cleaned up source comment documentation for Doxygen processing.
166 * opt.h: ETHARP_ALWAYS_INSERT option removed to comply with ARP RFC.
167 * etharp.c: update_arp_entry() only adds new ARP entries when adviced to by
168 the caller. This deprecates the ETHARP_ALWAYS_INSERT overrule option.
172 2004-04-27 Leon Woestenberg <leon.woestenberg@gmx.net>
173 * etharp.c: Applied patch of bug #8708 by Toni Mountifield with a solution
174 suggested by Timmy Brolin. Fix for 32-bit processors that cannot access
175 non-aligned 32-bit words, such as soms 32-bit TCP/IP header fields. Fix
176 is to prefix the 14-bit Ethernet headers with two padding bytes.
178 2004-04-23 Leon Woestenberg <leon.woestenberg@gmx.net>
179 * ip_addr.c: Fix in the ip_addr_isbroadcast() check.
180 * etharp.c: Fixed the case where the packet that initiates the ARP request
181 is not queued, and gets lost. Fixed the case where the packets destination
182 address is already known; we now always queue the packet and perform an ARP
189 * Fixed TCP bug for SYN_SENT to ESTABLISHED state transition.
190 * Fixed TCP bug in dequeueing of FIN from out of order segment queue.
191 * Fixed two possible NULL references in rare cases.
197 * Fixed DHCP which did not include the IP address in DECLINE messages.
201 * etharp.c has been hauled over a bit.
207 * Fixed TCP bug induced by bad window resizing with unidirectional TCP traffic.
208 * Packets sent from ARP queue had invalid source hardware address.
212 * Pass-by ARP requests do now update the cache.
216 * No longer dependent on ctype.h.
217 * New socket options.
218 * Raw IP pcb support.
224 * Some debug formatters and casts fixed.
225 * Numereous fixes in PPP.
229 * DEBUGF now is LWIP_DEBUGF
230 * pbuf_dechain() has been re-enabled.
231 * Mentioned the changed use of CVS branches in README.
237 * Fixed pool pbuf memory leak in pbuf_alloc().
238 Occured if not enough PBUF_POOL pbufs for a packet pbuf chain.
239 Reported by Savin Zlobec.
241 * PBUF_POOL chains had their tot_len field not set for non-first
242 pbufs. Fixed in pbuf_alloc().
246 * Added PPP stack contributed by Marc Boucher
250 * Now drops short packets for ICMP/UDP/TCP protocols. More robust.
252 * ARP queueuing now queues the latest packet instead of the first.
253 This is the RFC recommended behaviour, but can be overridden in
260 * TCP has been fixed to deal with the new use of the pbuf->ref
263 * DHCP dhcp_inform() crash bug fixed.
267 * Removed pbuf_pool_free_cache and pbuf_pool_alloc_cache. Also removed
268 pbuf_refresh(). This has sped up pbuf pool operations considerably.
269 Implemented by David Haas.
275 * The packet buffer implementation has been enhanced to support
276 zero-copy and copy-on-demand for packet buffers which have their
277 payloads in application-managed memory.
278 Implemented by David Haas.
280 Use PBUF_REF to make a pbuf refer to RAM. lwIP will use zero-copy
281 if an outgoing packet can be directly sent on the link, or perform
282 a copy-on-demand when necessary.
284 The application can safely assume the packet is sent, and the RAM
285 is available to the application directly after calling udp_send()
290 * ARP_QUEUEING should now correctly work for all cases, including
292 Implemented by Leon Woestenberg.
296 * IP_ADDR_ANY is no longer a NULL pointer. Instead, it is a pointer
297 to a '0.0.0.0' IP address.
299 * The packet buffer implementation is changed. The pbuf->ref counter
300 meaning has changed, and several pbuf functions have been
303 * netif drivers have to be changed to set the hardware address length field
304 that must be initialized correctly by the driver (hint: 6 for Ethernet MAC).
305 See the contrib/ports/c16x cs8900 driver as a driver example.
307 * netif's have a dhcp field that must be initialized to NULL by the driver.
308 See the contrib/ports/c16x cs8900 driver as a driver example.
310 (0.5.x) This file has been unmaintained up to 0.6.1. All changes are
311 logged in CVS but have not been explained here.
313 (0.5.3) Changes since version 0.5.2
317 * memp_malloc(MEMP_API_MSG) could fail with multiple application
318 threads because it wasn't protected by semaphores.
322 * struct ip_addr now packed.
324 * The name of the time variable in arp.c has been changed to ctime
325 to avoid conflicts with the time() function.
327 (0.5.2) Changes since version 0.5.1
331 * A new TCP function, tcp_tmr(), now handles both TCP timers.
335 * A bug in tcp_parseopt() could cause the stack to hang because of a
336 malformed TCP option.
338 * The address of new connections in the accept() function in the BSD
339 socket library was not handled correctly.
341 * pbuf_dechain() did not update the ->tot_len field of the tail.
343 * Aborted TCP connections were not handled correctly in all
348 * All protocol header structs are now packed.
350 * The ->len field in the tcp_seg structure now counts the actual
351 amount of data, and does not add one for SYN and FIN segments.
353 (0.5.1) Changes since version 0.5.0
357 * Possible to run as a user process under Linux.
359 * Preliminary support for cross platform packed structs.
361 * ARP timer now implemented.
365 * TCP output queue length was badly initialized when opening
368 * TCP delayed ACKs were not sent correctly.
370 * Explicit initialization of BSS segment variables.
372 * read() in BSD socket library could drop data.
374 * Problems with memory alignment.
376 * Situations when all TCP buffers were used could lead to
379 * TCP MSS option wasn't parsed correctly.
381 * Problems with UDP checksum calculation.
383 * IP multicast address tests had endianess problems.
385 * ARP requests had wrong destination hardware address.
389 * struct eth_addr changed from u16_t[3] array to u8_t[6].
391 * A ->linkoutput() member was added to struct netif.
393 * TCP and UDP ->dest_* struct members where changed to ->remote_*.
395 * ntoh* macros are now null definitions for big endian CPUs.
397 (0.5.0) Changes since version 0.4.2
401 * Redesigned operating system emulation layer to make porting easier.
403 * Better control over TCP output buffers.
405 * Documenation added.
409 * Locking issues in buffer management.
411 * Bugfixes in the sequential API.
413 * IP forwarding could cause memory leakage. This has been fixed.
417 * Directory structure somewhat changed; the core/ tree has been
420 (0.4.2) Changes since version 0.4.1
424 * Experimental ARP implementation added.
426 * Skeleton Ethernet driver added.
428 * Experimental BSD socket API library added.
432 * In very intense situations, memory leakage could occur. This has
437 * Variables named "data" and "code" have been renamed in order to
438 avoid name conflicts in certain compilers.
440 * Variable++ have in appliciable cases been translated to ++variable
441 since some compilers generate better code in the latter case.
443 (0.4.1) Changes since version 0.4
447 * TCP: Connection attempts time out earlier than data
448 transmissions. Nagle algorithm implemented. Push flag set on the
449 last segment in a burst.
451 * UDP: experimental support for UDP-Lite extensions.
455 * TCP: out of order segments were in some cases handled incorrectly,
456 and this has now been fixed. Delayed acknowledgements was broken
457 in 0.4, has now been fixed. Binding to an address that is in use
458 now results in an error. Reset connections sometimes hung an
459 application; this has been fixed.
461 * Checksum calculation sometimes failed for chained pbufs with odd
462 lengths. This has been fixed.
464 * API: a lot of bug fixes in the API. The UDP API has been improved
465 and tested. Error reporting and handling has been
466 improved. Logical flaws and race conditions for incoming TCP
467 connections has been found and removed.
469 * Memory manager: alignment issues. Reallocating memory sometimes
470 failed, this has been fixed.
472 * Generic library: bcopy was flawed and has been fixed.
476 * API: all datatypes has been changed from generic ones such as
477 ints, to specified ones such as u16_t. Functions that return
478 errors now have the correct type (err_t).
480 * General: A lot of code cleaned up and debugging code removed. Many
481 portability issues have been fixed.
483 * The license was changed; the advertising clause was removed.
487 * Thanks: Huge thanks go to Dagan Galarneau, Horst Garnetzke, Petri
488 Kosunen, Mikael Caleres, and Frits Wilmink for reporting and
491 (0.4) Changes since version 0.3.1
493 * Memory management has been radically changed; instead of
494 allocating memory from a shared heap, memory for objects that are
495 rapidly allocated and deallocated is now kept in pools. Allocation
496 and deallocation from those memory pools is very fast. The shared
497 heap is still present but is used less frequently.
499 * The memory, memory pool, and packet buffer subsystems now support
500 4-, 2-, or 1-byte alignment.
502 * "Out of memory" situations are handled in a more robust way.
504 * Stack usage has been reduced.
506 * Easier configuration of lwIP parameters such as memory usage,
507 TTLs, statistics gathering, etc. All configuration parameters are
508 now kept in a single header file "lwipopts.h".
510 * The directory structure has been changed slightly so that all
511 architecture specific files are kept under the src/arch
514 * Error propagation has been improved, both in the protocol modules
517 * The code for the RTXC architecture has been implemented, tested
520 * Bugs have been found and corrected in the TCP, UDP, IP, API, and
521 the Internet checksum modules.
523 * Bugs related to porting between a 32-bit and a 16-bit architecture
524 have been found and corrected.
526 * The license has been changed slightly to conform more with the
527 original BSD license, including the advertisement clause.
529 (0.3.1) Changes since version 0.3
531 * Fix of a fatal bug in the buffer management. Pbufs with allocated
532 RAM never returned the RAM when the pbuf was deallocated.
534 * TCP congestion control, window updates and retransmissions did not
535 work correctly. This has now been fixed.
537 * Bugfixes in the API.
539 (0.3) Changes since version 0.2
541 * New and improved directory structure. All include files are now
542 kept in a dedicated include/ directory.
544 * The API now has proper error handling. A new function,
545 netconn_err(), now returns an error code for the connection in
548 * Improvements in the memory management subsystem. The system now
549 keeps a pointer to the lowest free memory block. A new function,
550 mem_malloc2() tries to allocate memory once, and if it fails tries
551 to free some memory and retry the allocation.
553 * Much testing has been done with limited memory
554 configurations. lwIP now does a better job when overloaded.
556 * Some bugfixes and improvements to the buffer (pbuf) subsystem.
558 * Many bugfixes in the TCP code:
560 - Fixed a bug in tcp_close().
562 - The TCP receive window was incorrectly closed when out of
563 sequence segments was received. This has been fixed.
565 - Connections are now timed-out of the FIN-WAIT-2 state.
567 - The initial congestion window could in some cases be too
568 large. This has been fixed.
570 - The retransmission queue could in some cases be screwed up. This
573 - TCP RST flag now handled correctly.
575 - Out of sequence data was in some cases never delivered to the
576 application. This has been fixed.
578 - Retransmitted segments now contain the correct acknowledgment
579 number and advertised window.
581 - TCP retransmission timeout backoffs are not correctly computed
582 (ala BSD). After a number of retransmissions, TCP now gives up
585 * TCP connections now are kept on three lists, one for active
586 connections, one for listening connections, and one for
587 connections that are in TIME-WAIT. This greatly speeds up the fast
588 timeout processing for sending delayed ACKs.
590 * TCP now provides proper feedback to the application when a
591 connection has been successfully set up.
593 * More comments have been added to the code. The code has also been
596 (0.2) Initial public release.