1195972f6Sopenharmony_ciThis file lists major changes between release versions that require
2195972f6Sopenharmony_ciports or applications to be changed. Use it to update a port or an
3195972f6Sopenharmony_ciapplication written for an older version of lwIP to correctly work
4195972f6Sopenharmony_ciwith newer versions.
5195972f6Sopenharmony_ci
6195972f6Sopenharmony_ci
7195972f6Sopenharmony_ci(git master)
8195972f6Sopenharmony_ci
9195972f6Sopenharmony_ci  * [Enter new changes just after this line - do not remove this line]
10195972f6Sopenharmony_ci
11195972f6Sopenharmony_ci(2.1.0)
12195972f6Sopenharmony_ci
13195972f6Sopenharmony_ci  ++ Application changes:
14195972f6Sopenharmony_ci
15195972f6Sopenharmony_ci  * Use the new altcp API for seamless TLS integration into existing TCP applications (see changelog)
16195972f6Sopenharmony_ci  * TCP only kills existing connections with a LOWER priority than the one currently being opened.
17195972f6Sopenharmony_ci    Previous implementations also kill existing connections of the SAME priority.
18195972f6Sopenharmony_ci  * ip4_route_src: parameter order is reversed: ip4_route_src(dest, src) -> ip4_route_src(src, dest)
19195972f6Sopenharmony_ci    to make parameter order consistent with other ip*_route*() functions.
20195972f6Sopenharmony_ci    Same also applies to LWIP_HOOK_IP4_ROUTE_SRC() parameter order.
21195972f6Sopenharmony_ci  * pbuf API: pbuf->type (an u8_t holding the enum 'pbuf_type') has changed to only hold a
22195972f6Sopenharmony_ci    description of the pbuf (e.g. data following pbuf struct, data volatile, allocation
23195972f6Sopenharmony_ci    source heap/pool/etc.). As a consequence, applications can't test pbuf->type any more.
24195972f6Sopenharmony_ci    Use pbuf_match_type(pbuf, type) instead.
25195972f6Sopenharmony_ci  * socket API: according to the standard, SO_ERROR now only returns asynchronous errors.
26195972f6Sopenharmony_ci    All other/normal/synchronous errors are (and always were) available via 'errno'.
27195972f6Sopenharmony_ci    LWIP_SOCKET_SET_ERRNO has been removed - 'errno' is always set - and required!
28195972f6Sopenharmony_ci  * httpd LWIP_HTTPD_CGI_SSI: httpd_cgi_handler() has an additional parameter "struct fs_file *"
29195972f6Sopenharmony_ci
30195972f6Sopenharmony_ci  ++ Port changes:
31195972f6Sopenharmony_ci
32195972f6Sopenharmony_ci  * tcpip_trycallback() was renamed to tcpip_callbackmsg_trycallback() to avoid confusion
33195972f6Sopenharmony_ci    with tcpip_try_callback()
34195972f6Sopenharmony_ci  * compatibility headers: moved from 'src/include/posix' to 'src/include/compat/posix',
35195972f6Sopenharmony_ci    'src/include/compat/stdc' etc.
36195972f6Sopenharmony_ci  * The IPv6 implementation now supports address scopes. (See LWIP_IPV6_SCOPES documentation
37195972f6Sopenharmony_ci    and ip6_zone.h for more documentation)
38195972f6Sopenharmony_ci  * LWIP_HOOK_DHCP_APPEND_OPTIONS() has changed, see description in opt.h (options_out_len is not
39195972f6Sopenharmony_ci    available in struct dhcp any more)
40195972f6Sopenharmony_ci  * Added debug helper asserts to ensure threading/locking requirements are met (define
41195972f6Sopenharmony_ci    LWIP_MARK_TCPIP_THREAD() and LWIP_ASSERT_CORE_LOCKED()).
42195972f6Sopenharmony_ci  * Added sys_mbox_trypost_fromisr() and tcpip_callbackmsg_trycallback_fromisr()
43195972f6Sopenharmony_ci    These can be used to post preallocated messages from an ISR to the tcpip thread
44195972f6Sopenharmony_ci    (e.g. when using FreeRTOS)
45195972f6Sopenharmony_ci
46195972f6Sopenharmony_ci(2.0.2)
47195972f6Sopenharmony_ci
48195972f6Sopenharmony_ci  ++ Application changes:
49195972f6Sopenharmony_ci
50195972f6Sopenharmony_ci  * slipif: The way to pass serial port number has changed. netif->num is not
51195972f6Sopenharmony_ci    supported any more, netif->state is interpreted as an u8_t port number now
52195972f6Sopenharmony_ci    (it's not a POINTER to an u8_t any more!)
53195972f6Sopenharmony_ci
54195972f6Sopenharmony_ci(2.0.1)
55195972f6Sopenharmony_ci
56195972f6Sopenharmony_ci  ++ Application changes:
57195972f6Sopenharmony_ci
58195972f6Sopenharmony_ci  * UDP does NOT receive multicast traffic from ALL netifs on an UDP PCB bound to a specific
59195972f6Sopenharmony_ci    netif any more. Users need to bind to IP_ADDR_ANY to receive multicast traffic and compare 
60195972f6Sopenharmony_ci    ip_current_netif() to the desired netif for every packet.
61195972f6Sopenharmony_ci    See bug #49662 for an explanation.
62195972f6Sopenharmony_ci
63195972f6Sopenharmony_ci(2.0.0)
64195972f6Sopenharmony_ci
65195972f6Sopenharmony_ci  ++ Application changes:
66195972f6Sopenharmony_ci
67195972f6Sopenharmony_ci  * Changed netif "up" flag handling to be an administrative flag (as opposed to the previous meaning of
68195972f6Sopenharmony_ci    "ip4-address-valid", a netif will now not be used for transmission if not up) -> even a DHCP netif
69195972f6Sopenharmony_ci    has to be set "up" before starting the DHCP client
70195972f6Sopenharmony_ci  * Added IPv6 support (dual-stack or IPv4/IPv6 only)
71195972f6Sopenharmony_ci  * Changed ip_addr_t to be a union in dual-stack mode (use ip4_addr_t where referring to IPv4 only).
72195972f6Sopenharmony_ci  * Major rewrite of SNMP (added MIB parser that creates code stubs for custom MIBs);
73195972f6Sopenharmony_ci    supports SNMPv2c (experimental v3 support)
74195972f6Sopenharmony_ci  * Moved some core applications from contrib repository to src/apps (and include/lwip/apps)
75195972f6Sopenharmony_ci
76195972f6Sopenharmony_ci  +++ Raw API:
77195972f6Sopenharmony_ci    * Changed TCP listen backlog: removed tcp_accepted(), added the function pair tcp_backlog_delayed()/
78195972f6Sopenharmony_ci      tcp_backlog_accepted() to explicitly delay backlog handling on a connection pcb
79195972f6Sopenharmony_ci
80195972f6Sopenharmony_ci  +++ Socket API:
81195972f6Sopenharmony_ci    * Added an implementation for posix sendmsg()
82195972f6Sopenharmony_ci    * Added LWIP_FIONREAD_LINUXMODE that makes ioctl/FIONREAD return the size of the next pending datagram
83195972f6Sopenharmony_ci
84195972f6Sopenharmony_ci  ++ Port changes
85195972f6Sopenharmony_ci
86195972f6Sopenharmony_ci  +++ new files:
87195972f6Sopenharmony_ci    * MANY new and moved files! 
88195972f6Sopenharmony_ci    * Added src/Filelists.mk for use in Makefile projects
89195972f6Sopenharmony_ci    * Continued moving stack-internal parts from abc.h to abc_priv.h in sub-folder "priv"
90195972f6Sopenharmony_ci      to let abc.h only contain the actual application programmer's API
91195972f6Sopenharmony_ci
92195972f6Sopenharmony_ci  +++ sys layer:
93195972f6Sopenharmony_ci    * Made LWIP_TCPIP_CORE_LOCKING==1 the default as it usually performs better than
94195972f6Sopenharmony_ci      the traditional message passing (although with LWIP_COMPAT_MUTEX you are still
95195972f6Sopenharmony_ci      open to priority inversion, so this is not recommended any more)
96195972f6Sopenharmony_ci    * Added LWIP_NETCONN_SEM_PER_THREAD to use one "op_completed" semaphore per thread
97195972f6Sopenharmony_ci      instead of using one per netconn (these semaphores are used even with core locking
98195972f6Sopenharmony_ci      enabled as some longer lasting functions like big writes still need to delay)
99195972f6Sopenharmony_ci    * Added generalized abstraction for itoa(), strnicmp(), stricmp() and strnstr()
100195972f6Sopenharmony_ci      in def.h (to be overridden in cc.h) instead of config 
101195972f6Sopenharmony_ci      options for netbiosns, httpd, dns, etc. ...
102195972f6Sopenharmony_ci    * New abstraction for hton* and ntoh* functions in def.h.
103195972f6Sopenharmony_ci      To override them, use the following in cc.h: 
104195972f6Sopenharmony_ci      #define lwip_htons(x) <your_htons>
105195972f6Sopenharmony_ci      #define lwip_htonl(x) <your_htonl>
106195972f6Sopenharmony_ci
107195972f6Sopenharmony_ci  +++ new options:
108195972f6Sopenharmony_ci     * TODO
109195972f6Sopenharmony_ci
110195972f6Sopenharmony_ci  +++ new pools:
111195972f6Sopenharmony_ci     * Added LWIP_MEMPOOL_* (declare/init/alloc/free) to declare private memp pools
112195972f6Sopenharmony_ci       that share memp.c code but do not have to be made global via lwippools.h
113195972f6Sopenharmony_ci     * Added pools for IPv6, MPU_COMPATIBLE, dns-api, netif-api, etc.
114195972f6Sopenharmony_ci     * added hook LWIP_HOOK_MEMP_AVAILABLE() to get informed when a memp pool was empty and an item
115195972f6Sopenharmony_ci       is now available
116195972f6Sopenharmony_ci
117195972f6Sopenharmony_ci  * Signature of LWIP_HOOK_VLAN_SET macro was changed
118195972f6Sopenharmony_ci
119195972f6Sopenharmony_ci  * LWIP_DECLARE_MEMORY_ALIGNED() may be used to declare aligned memory buffers (mem/memp)
120195972f6Sopenharmony_ci    or to move buffers to dedicated memory using compiler attributes
121195972f6Sopenharmony_ci
122195972f6Sopenharmony_ci  * Standard C headers are used to define sized types and printf formatters
123195972f6Sopenharmony_ci    (disable by setting LWIP_NO_STDINT_H=1 or LWIP_NO_INTTYPES_H=1 if your compiler
124195972f6Sopenharmony_ci    does not support these)
125195972f6Sopenharmony_ci
126195972f6Sopenharmony_ci
127195972f6Sopenharmony_ci  ++ Major bugfixes/improvements
128195972f6Sopenharmony_ci
129195972f6Sopenharmony_ci  * Added IPv6 support (dual-stack or IPv4/IPv6 only)
130195972f6Sopenharmony_ci  * Major rewrite of PPP (incl. keep-up with apache pppd)
131195972f6Sopenharmony_ci    see doc/ppp.txt for an upgrading how-to
132195972f6Sopenharmony_ci  * Major rewrite of SNMP (incl. MIB parser)
133195972f6Sopenharmony_ci  * Fixed timing issues that might have lead to losing a DHCP lease
134195972f6Sopenharmony_ci  * Made rx processing path more robust against crafted errors
135195972f6Sopenharmony_ci  * TCP window scaling support
136195972f6Sopenharmony_ci  * modification of api modules to support FreeRTOS-MPU (don't pass stack-pointers to other threads)
137195972f6Sopenharmony_ci  * made DNS client more robust
138195972f6Sopenharmony_ci  * support PBUF_REF for RX packets
139195972f6Sopenharmony_ci  * LWIP_NETCONN_FULLDUPLEX allows netconn/sockets to be used for reading/writing from separate
140195972f6Sopenharmony_ci    threads each (needs LWIP_NETCONN_SEM_PER_THREAD)
141195972f6Sopenharmony_ci  * Moved and reordered stats (mainly memp/mib2)
142195972f6Sopenharmony_ci
143195972f6Sopenharmony_ci(1.4.0)
144195972f6Sopenharmony_ci
145195972f6Sopenharmony_ci  ++ Application changes:
146195972f6Sopenharmony_ci
147195972f6Sopenharmony_ci  * Replaced struct ip_addr by typedef ip_addr_t (struct ip_addr is kept for
148195972f6Sopenharmony_ci    compatibility to old applications, but will be removed in the future).
149195972f6Sopenharmony_ci
150195972f6Sopenharmony_ci  * Renamed mem_realloc() to mem_trim() to prevent confusion with realloc()
151195972f6Sopenharmony_ci
152195972f6Sopenharmony_ci  +++ Raw API:
153195972f6Sopenharmony_ci    * Changed the semantics of tcp_close() (since it was rather a
154195972f6Sopenharmony_ci      shutdown before): Now the application does *NOT* get any calls to the recv
155195972f6Sopenharmony_ci      callback (aside from NULL/closed) after calling tcp_close()
156195972f6Sopenharmony_ci
157195972f6Sopenharmony_ci    * When calling tcp_abort() from a raw API TCP callback function,
158195972f6Sopenharmony_ci      make sure you return ERR_ABRT to prevent accessing unallocated memory.
159195972f6Sopenharmony_ci      (ERR_ABRT now means the applicaiton has called tcp_abort!)
160195972f6Sopenharmony_ci
161195972f6Sopenharmony_ci  +++ Netconn API:
162195972f6Sopenharmony_ci    * Changed netconn_receive() and netconn_accept() to return
163195972f6Sopenharmony_ci      err_t, not a pointer to new data/netconn.
164195972f6Sopenharmony_ci
165195972f6Sopenharmony_ci  +++ Socket API:
166195972f6Sopenharmony_ci    * LWIP_SO_RCVTIMEO: when accept() or recv() time out, they
167195972f6Sopenharmony_ci      now set errno to EWOULDBLOCK/EAGAIN, not ETIMEDOUT.
168195972f6Sopenharmony_ci
169195972f6Sopenharmony_ci    * Added a minimal version of posix fctl() to have a
170195972f6Sopenharmony_ci      standardised way to set O_NONBLOCK for nonblocking sockets.
171195972f6Sopenharmony_ci
172195972f6Sopenharmony_ci  +++ all APIs:
173195972f6Sopenharmony_ci    * correctly implemented SO(F)_REUSEADDR
174195972f6Sopenharmony_ci
175195972f6Sopenharmony_ci  ++ Port changes
176195972f6Sopenharmony_ci
177195972f6Sopenharmony_ci  +++ new files:
178195972f6Sopenharmony_ci
179195972f6Sopenharmony_ci    * Added 4 new files: def.c, timers.c, timers.h, tcp_impl.h:
180195972f6Sopenharmony_ci
181195972f6Sopenharmony_ci    * Moved stack-internal parts of tcp.h to tcp_impl.h, tcp.h now only contains
182195972f6Sopenharmony_ci      the actual application programmer's API
183195972f6Sopenharmony_ci  
184195972f6Sopenharmony_ci    * Separated timer implementation from sys.h/.c, moved to timers.h/.c;
185195972f6Sopenharmony_ci      Added timer implementation for NO_SYS==1, set NO_SYS_NO_TIMERS==1 if you
186195972f6Sopenharmony_ci      still want to use your own timer implementation for NO_SYS==0 (as before).
187195972f6Sopenharmony_ci
188195972f6Sopenharmony_ci  +++ sys layer:
189195972f6Sopenharmony_ci
190195972f6Sopenharmony_ci    * Converted mbox- and semaphore-functions to take pointers to sys_mbox_t/
191195972f6Sopenharmony_ci      sys_sem_t;
192195972f6Sopenharmony_ci
193195972f6Sopenharmony_ci    * Converted sys_mbox_new/sys_sem_new to take pointers and return err_t;
194195972f6Sopenharmony_ci
195195972f6Sopenharmony_ci    * Added Mutex concept in sys_arch (define LWIP_COMPAT_MUTEX to let sys.h use
196195972f6Sopenharmony_ci      binary semaphores instead of mutexes - as before)
197195972f6Sopenharmony_ci
198195972f6Sopenharmony_ci  +++ new options:
199195972f6Sopenharmony_ci
200195972f6Sopenharmony_ci     * Don't waste memory when chaining segments, added option TCP_OVERSIZE to
201195972f6Sopenharmony_ci       prevent creating many small pbufs when calling tcp_write with many small
202195972f6Sopenharmony_ci       blocks of data. Instead, pbufs are allocated larger than needed and the
203195972f6Sopenharmony_ci       space is used for later calls to tcp_write.
204195972f6Sopenharmony_ci
205195972f6Sopenharmony_ci     * Added LWIP_NETIF_TX_SINGLE_PBUF to always copy to try to create single pbufs
206195972f6Sopenharmony_ci       in tcp_write/udp_send.
207195972f6Sopenharmony_ci
208195972f6Sopenharmony_ci    * Added an additional option LWIP_ETHERNET to support ethernet without ARP
209195972f6Sopenharmony_ci      (necessary for pure PPPoE)
210195972f6Sopenharmony_ci
211195972f6Sopenharmony_ci    * Add MEMP_SEPARATE_POOLS to place memory pools in separate arrays. This may
212195972f6Sopenharmony_ci      be used to place these pools into user-defined memory by using external
213195972f6Sopenharmony_ci      declaration.
214195972f6Sopenharmony_ci
215195972f6Sopenharmony_ci    * Added TCP_SNDQUEUELOWAT corresponding to TCP_SNDLOWAT
216195972f6Sopenharmony_ci
217195972f6Sopenharmony_ci  +++ new pools:
218195972f6Sopenharmony_ci
219195972f6Sopenharmony_ci     * Netdb uses a memp pool for allocating memory when getaddrinfo() is called,
220195972f6Sopenharmony_ci       so MEMP_NUM_NETDB has to be set accordingly.
221195972f6Sopenharmony_ci
222195972f6Sopenharmony_ci     * DNS_LOCAL_HOSTLIST_IS_DYNAMIC uses a memp pool instead of the heap, so
223195972f6Sopenharmony_ci       MEMP_NUM_LOCALHOSTLIST has to be set accordingly.
224195972f6Sopenharmony_ci
225195972f6Sopenharmony_ci     * Snmp-agent uses a memp pools instead of the heap, so MEMP_NUM_SNMP_* have
226195972f6Sopenharmony_ci       to be set accordingly.
227195972f6Sopenharmony_ci
228195972f6Sopenharmony_ci     * PPPoE uses a MEMP pool instead of the heap, so MEMP_NUM_PPPOE_INTERFACES
229195972f6Sopenharmony_ci       has to be set accordingly
230195972f6Sopenharmony_ci
231195972f6Sopenharmony_ci  * Integrated loopif into netif.c - loopif does not have to be created by the
232195972f6Sopenharmony_ci    port any more, just define LWIP_HAVE_LOOPIF to 1.
233195972f6Sopenharmony_ci
234195972f6Sopenharmony_ci  * Added define LWIP_RAND() for lwip-wide randomization (needs to be defined
235195972f6Sopenharmony_ci    in cc.h, e.g. used by igmp)
236195972f6Sopenharmony_ci
237195972f6Sopenharmony_ci  * Added printf-formatter X8_F to printf u8_t as hex
238195972f6Sopenharmony_ci
239195972f6Sopenharmony_ci  * The heap now may be moved to user-defined memory by defining
240195972f6Sopenharmony_ci    LWIP_RAM_HEAP_POINTER as a void pointer to that memory's address
241195972f6Sopenharmony_ci
242195972f6Sopenharmony_ci  * added autoip_set_struct() and dhcp_set_struct() to let autoip and dhcp work
243195972f6Sopenharmony_ci    with user-allocated structs instead of calling mem_malloc
244195972f6Sopenharmony_ci
245195972f6Sopenharmony_ci  * Added const char* name to mem- and memp-stats for easier debugging.
246195972f6Sopenharmony_ci
247195972f6Sopenharmony_ci  * Calculate the TCP/UDP checksum while copying to only fetch data once:
248195972f6Sopenharmony_ci    Define LWIP_CHKSUM_COPY to a memcpy-like function that returns the checksum
249195972f6Sopenharmony_ci
250195972f6Sopenharmony_ci  * Added SO_REUSE_RXTOALL to pass received UDP broadcast/multicast packets to
251195972f6Sopenharmony_ci    more than one pcb.
252195972f6Sopenharmony_ci
253195972f6Sopenharmony_ci  * Changed the semantics of ARP_QUEUEING==0: ARP_QUEUEING now cannot be turned
254195972f6Sopenharmony_ci    off any more, if this is set to 0, only one packet (the most recent one) is
255195972f6Sopenharmony_ci    queued (like demanded by RFC 1122).
256195972f6Sopenharmony_ci
257195972f6Sopenharmony_ci  
258195972f6Sopenharmony_ci  ++ Major bugfixes/improvements
259195972f6Sopenharmony_ci
260195972f6Sopenharmony_ci  * Implemented tcp_shutdown() to only shut down one end of a connection
261195972f6Sopenharmony_ci  * Implemented shutdown() at socket- and netconn-level
262195972f6Sopenharmony_ci  * Added errorset support to select() + improved select speed overhead
263195972f6Sopenharmony_ci  * Merged pppd to v2.3.11 (including some backported bugfixes from 2.4.x)
264195972f6Sopenharmony_ci  * Added timer implementation for NO_SYS==1 (may be disabled with NO_SYS_NO_TIMERS==1
265195972f6Sopenharmony_ci  * Use macros defined in ip_addr.h to work with IP addresses
266195972f6Sopenharmony_ci  * Implemented many nonblocking socket/netconn functions
267195972f6Sopenharmony_ci  * Fixed ARP input processing: only add a new entry if a request was directed as us
268195972f6Sopenharmony_ci  * mem_realloc() to mem_trim() to prevent confusion with realloc()
269195972f6Sopenharmony_ci  * Some improvements for AutoIP (don't route/forward link-local addresses, don't break
270195972f6Sopenharmony_ci    existing connections when assigning a routable address)
271195972f6Sopenharmony_ci  * Correctly handle remote side overrunning our rcv_wnd in ooseq case
272195972f6Sopenharmony_ci  * Removed packing from ip_addr_t, the packed version is now only used in protocol headers
273195972f6Sopenharmony_ci  * Corrected PBUF_POOL_BUFSIZE for ports where ETH_PAD_SIZE > 0
274195972f6Sopenharmony_ci  * Added support for static ARP table entries
275195972f6Sopenharmony_ci
276195972f6Sopenharmony_ci(STABLE-1.3.2)
277195972f6Sopenharmony_ci
278195972f6Sopenharmony_ci  * initial version of this file
279