xref: /minix3/minix/lib/liblwip/dist/UPGRADING (revision 5d5fbe79c1b60734f34c69330aec5496644e8651)
1*5d5fbe79SDavid van MoolenbroekThis file lists major changes between release versions that require
2*5d5fbe79SDavid van Moolenbroekports or applications to be changed. Use it to update a port or an
3*5d5fbe79SDavid van Moolenbroekapplication written for an older version of lwIP to correctly work
4*5d5fbe79SDavid van Moolenbroekwith newer versions.
5*5d5fbe79SDavid van Moolenbroek
6*5d5fbe79SDavid van Moolenbroek
7*5d5fbe79SDavid van Moolenbroek(git master)
8*5d5fbe79SDavid van Moolenbroek
9*5d5fbe79SDavid van Moolenbroek  * [Enter new changes just after this line - do not remove this line]
10*5d5fbe79SDavid van Moolenbroek
11*5d5fbe79SDavid van Moolenbroek  ++ Application changes:
12*5d5fbe79SDavid van Moolenbroek
13*5d5fbe79SDavid van Moolenbroek  * slipif: The way to pass serial port number has changed. netif->num is not
14*5d5fbe79SDavid van Moolenbroek    supported any more, netif->state is interpreted as an u8_t port number now
15*5d5fbe79SDavid van Moolenbroek    (it's not a POINTER to an u8_t any more!)
16*5d5fbe79SDavid van Moolenbroek
17*5d5fbe79SDavid van Moolenbroek  * The IPv6 implementation now supports address scopes. All addresses that have a scope according
18*5d5fbe79SDavid van Moolenbroek    to the default policy (link-local unicast addresses, interface-local and link-local multicast
19*5d5fbe79SDavid van Moolenbroek    addresses) should now have a zone set on them before being passed to the core API, although
20*5d5fbe79SDavid van Moolenbroek    lwIP will currently attempt to select a zone on the caller's behalf when necessary.
21*5d5fbe79SDavid van Moolenbroek    Applications that directly assign IPv6 addresses to interfaces (which is NOT recommended)
22*5d5fbe79SDavid van Moolenbroek    must now ensure that link-local addresses carry the netif's zone. See the new ip6_zone.h header
23*5d5fbe79SDavid van Moolenbroek    file for more information and relevant macros. For now it is still possible to turn off scopes
24*5d5fbe79SDavid van Moolenbroek    support through the new LWIP_IPV6_SCOPES option. When upgrading an implementation that uses the
25*5d5fbe79SDavid van Moolenbroek    core API directly, it is highly recommended to enable LWIP_IPV6_SCOPES_DEBUG at least for
26*5d5fbe79SDavid van Moolenbroek    a while, to ensure e.g. proper address initialization.
27*5d5fbe79SDavid van Moolenbroek
28*5d5fbe79SDavid van Moolenbroek(2.0.1)
29*5d5fbe79SDavid van Moolenbroek
30*5d5fbe79SDavid van Moolenbroek  ++ Application changes:
31*5d5fbe79SDavid van Moolenbroek
32*5d5fbe79SDavid van Moolenbroek  * UDP does NOT receive multicast traffic from ALL netifs on an UDP PCB bound to a specific
33*5d5fbe79SDavid van Moolenbroek    netif any more. Users need to bind to IP_ADDR_ANY to receive multicast traffic and compare
34*5d5fbe79SDavid van Moolenbroek    ip_current_netif() to the desired netif for every packet.
35*5d5fbe79SDavid van Moolenbroek    See bug #49662 for an explanation.
36*5d5fbe79SDavid van Moolenbroek
37*5d5fbe79SDavid van Moolenbroek(2.0.0)
38*5d5fbe79SDavid van Moolenbroek
39*5d5fbe79SDavid van Moolenbroek  ++ Application changes:
40*5d5fbe79SDavid van Moolenbroek
41*5d5fbe79SDavid van Moolenbroek  * Changed netif "up" flag handling to be an administrative flag (as opposed to the previous meaning of
42*5d5fbe79SDavid van Moolenbroek    "ip4-address-valid", a netif will now not be used for transmission if not up) -> even a DHCP netif
43*5d5fbe79SDavid van Moolenbroek    has to be set "up" before starting the DHCP client
44*5d5fbe79SDavid van Moolenbroek  * Added IPv6 support (dual-stack or IPv4/IPv6 only)
45*5d5fbe79SDavid van Moolenbroek  * Changed ip_addr_t to be a union in dual-stack mode (use ip4_addr_t where referring to IPv4 only).
46*5d5fbe79SDavid van Moolenbroek  * Major rewrite of SNMP (added MIB parser that creates code stubs for custom MIBs);
47*5d5fbe79SDavid van Moolenbroek    supports SNMPv2c (experimental v3 support)
48*5d5fbe79SDavid van Moolenbroek  * Moved some core applications from contrib repository to src/apps (and include/lwip/apps)
49*5d5fbe79SDavid van Moolenbroek
50*5d5fbe79SDavid van Moolenbroek  +++ Raw API:
51*5d5fbe79SDavid van Moolenbroek    * Changed TCP listen backlog: removed tcp_accepted(), added the function pair tcp_backlog_delayed()/
52*5d5fbe79SDavid van Moolenbroek      tcp_backlog_accepted() to explicitly delay backlog handling on a connection pcb
53*5d5fbe79SDavid van Moolenbroek
54*5d5fbe79SDavid van Moolenbroek  +++ Socket API:
55*5d5fbe79SDavid van Moolenbroek    * Added an implementation for posix sendmsg()
56*5d5fbe79SDavid van Moolenbroek    * Added LWIP_FIONREAD_LINUXMODE that makes ioctl/FIONREAD return the size of the next pending datagram
57*5d5fbe79SDavid van Moolenbroek
58*5d5fbe79SDavid van Moolenbroek  ++ Port changes
59*5d5fbe79SDavid van Moolenbroek
60*5d5fbe79SDavid van Moolenbroek  +++ new files:
61*5d5fbe79SDavid van Moolenbroek    * MANY new and moved files!
62*5d5fbe79SDavid van Moolenbroek    * Added src/Filelists.mk for use in Makefile projects
63*5d5fbe79SDavid van Moolenbroek    * Continued moving stack-internal parts from abc.h to abc_priv.h in sub-folder "priv"
64*5d5fbe79SDavid van Moolenbroek      to let abc.h only contain the actual application programmer's API
65*5d5fbe79SDavid van Moolenbroek
66*5d5fbe79SDavid van Moolenbroek  +++ sys layer:
67*5d5fbe79SDavid van Moolenbroek    * Made LWIP_TCPIP_CORE_LOCKING==1 the default as it usually performs better than
68*5d5fbe79SDavid van Moolenbroek      the traditional message passing (although with LWIP_COMPAT_MUTEX you are still
69*5d5fbe79SDavid van Moolenbroek      open to priority inversion, so this is not recommended any more)
70*5d5fbe79SDavid van Moolenbroek    * Added LWIP_NETCONN_SEM_PER_THREAD to use one "op_completed" semaphore per thread
71*5d5fbe79SDavid van Moolenbroek      instead of using one per netconn (these semaphores are used even with core locking
72*5d5fbe79SDavid van Moolenbroek      enabled as some longer lasting functions like big writes still need to delay)
73*5d5fbe79SDavid van Moolenbroek    * Added generalized abstraction for itoa(), strnicmp(), stricmp() and strnstr()
74*5d5fbe79SDavid van Moolenbroek      in def.h (to be overridden in cc.h) instead of config
75*5d5fbe79SDavid van Moolenbroek      options for netbiosns, httpd, dns, etc. ...
76*5d5fbe79SDavid van Moolenbroek    * New abstraction for hton* and ntoh* functions in def.h.
77*5d5fbe79SDavid van Moolenbroek      To override them, use the following in cc.h:
78*5d5fbe79SDavid van Moolenbroek      #define lwip_htons(x) <your_htons>
79*5d5fbe79SDavid van Moolenbroek      #define lwip_htonl(x) <your_htonl>
80*5d5fbe79SDavid van Moolenbroek
81*5d5fbe79SDavid van Moolenbroek  +++ new options:
82*5d5fbe79SDavid van Moolenbroek     * TODO
83*5d5fbe79SDavid van Moolenbroek
84*5d5fbe79SDavid van Moolenbroek  +++ new pools:
85*5d5fbe79SDavid van Moolenbroek     * Added LWIP_MEMPOOL_* (declare/init/alloc/free) to declare private memp pools
86*5d5fbe79SDavid van Moolenbroek       that share memp.c code but do not have to be made global via lwippools.h
87*5d5fbe79SDavid van Moolenbroek     * Added pools for IPv6, MPU_COMPATIBLE, dns-api, netif-api, etc.
88*5d5fbe79SDavid van Moolenbroek     * added hook LWIP_HOOK_MEMP_AVAILABLE() to get informed when a memp pool was empty and an item
89*5d5fbe79SDavid van Moolenbroek       is now available
90*5d5fbe79SDavid van Moolenbroek
91*5d5fbe79SDavid van Moolenbroek  * Signature of LWIP_HOOK_VLAN_SET macro was changed
92*5d5fbe79SDavid van Moolenbroek
93*5d5fbe79SDavid van Moolenbroek  * LWIP_DECLARE_MEMORY_ALIGNED() may be used to declare aligned memory buffers (mem/memp)
94*5d5fbe79SDavid van Moolenbroek    or to move buffers to dedicated memory using compiler attributes
95*5d5fbe79SDavid van Moolenbroek
96*5d5fbe79SDavid van Moolenbroek  * Standard C headers are used to define sized types and printf formatters
97*5d5fbe79SDavid van Moolenbroek    (disable by setting LWIP_NO_STDINT_H=1 or LWIP_NO_INTTYPES_H=1 if your compiler
98*5d5fbe79SDavid van Moolenbroek    does not support these)
99*5d5fbe79SDavid van Moolenbroek
100*5d5fbe79SDavid van Moolenbroek
101*5d5fbe79SDavid van Moolenbroek  ++ Major bugfixes/improvements
102*5d5fbe79SDavid van Moolenbroek
103*5d5fbe79SDavid van Moolenbroek  * Added IPv6 support (dual-stack or IPv4/IPv6 only)
104*5d5fbe79SDavid van Moolenbroek  * Major rewrite of PPP (incl. keep-up with apache pppd)
105*5d5fbe79SDavid van Moolenbroek    see doc/ppp.txt for an upgrading how-to
106*5d5fbe79SDavid van Moolenbroek  * Major rewrite of SNMP (incl. MIB parser)
107*5d5fbe79SDavid van Moolenbroek  * Fixed timing issues that might have lead to losing a DHCP lease
108*5d5fbe79SDavid van Moolenbroek  * Made rx processing path more robust against crafted errors
109*5d5fbe79SDavid van Moolenbroek  * TCP window scaling support
110*5d5fbe79SDavid van Moolenbroek  * modification of api modules to support FreeRTOS-MPU (don't pass stack-pointers to other threads)
111*5d5fbe79SDavid van Moolenbroek  * made DNS client more robust
112*5d5fbe79SDavid van Moolenbroek  * support PBUF_REF for RX packets
113*5d5fbe79SDavid van Moolenbroek  * LWIP_NETCONN_FULLDUPLEX allows netconn/sockets to be used for reading/writing from separate
114*5d5fbe79SDavid van Moolenbroek    threads each (needs LWIP_NETCONN_SEM_PER_THREAD)
115*5d5fbe79SDavid van Moolenbroek  * Moved and reordered stats (mainly memp/mib2)
116*5d5fbe79SDavid van Moolenbroek
117*5d5fbe79SDavid van Moolenbroek(1.4.0)
118*5d5fbe79SDavid van Moolenbroek
119*5d5fbe79SDavid van Moolenbroek  ++ Application changes:
120*5d5fbe79SDavid van Moolenbroek
121*5d5fbe79SDavid van Moolenbroek  * Replaced struct ip_addr by typedef ip_addr_t (struct ip_addr is kept for
122*5d5fbe79SDavid van Moolenbroek    compatibility to old applications, but will be removed in the future).
123*5d5fbe79SDavid van Moolenbroek
124*5d5fbe79SDavid van Moolenbroek  * Renamed mem_realloc() to mem_trim() to prevent confusion with realloc()
125*5d5fbe79SDavid van Moolenbroek
126*5d5fbe79SDavid van Moolenbroek  +++ Raw API:
127*5d5fbe79SDavid van Moolenbroek    * Changed the semantics of tcp_close() (since it was rather a
128*5d5fbe79SDavid van Moolenbroek      shutdown before): Now the application does *NOT* get any calls to the recv
129*5d5fbe79SDavid van Moolenbroek      callback (aside from NULL/closed) after calling tcp_close()
130*5d5fbe79SDavid van Moolenbroek
131*5d5fbe79SDavid van Moolenbroek    * When calling tcp_abort() from a raw API TCP callback function,
132*5d5fbe79SDavid van Moolenbroek      make sure you return ERR_ABRT to prevent accessing unallocated memory.
133*5d5fbe79SDavid van Moolenbroek      (ERR_ABRT now means the applicaiton has called tcp_abort!)
134*5d5fbe79SDavid van Moolenbroek
135*5d5fbe79SDavid van Moolenbroek  +++ Netconn API:
136*5d5fbe79SDavid van Moolenbroek    * Changed netconn_receive() and netconn_accept() to return
137*5d5fbe79SDavid van Moolenbroek      err_t, not a pointer to new data/netconn.
138*5d5fbe79SDavid van Moolenbroek
139*5d5fbe79SDavid van Moolenbroek  +++ Socket API:
140*5d5fbe79SDavid van Moolenbroek    * LWIP_SO_RCVTIMEO: when accept() or recv() time out, they
141*5d5fbe79SDavid van Moolenbroek      now set errno to EWOULDBLOCK/EAGAIN, not ETIMEDOUT.
142*5d5fbe79SDavid van Moolenbroek
143*5d5fbe79SDavid van Moolenbroek    * Added a minimal version of posix fctl() to have a
144*5d5fbe79SDavid van Moolenbroek      standardised way to set O_NONBLOCK for nonblocking sockets.
145*5d5fbe79SDavid van Moolenbroek
146*5d5fbe79SDavid van Moolenbroek  +++ all APIs:
147*5d5fbe79SDavid van Moolenbroek    * correctly implemented SO(F)_REUSEADDR
148*5d5fbe79SDavid van Moolenbroek
149*5d5fbe79SDavid van Moolenbroek  ++ Port changes
150*5d5fbe79SDavid van Moolenbroek
151*5d5fbe79SDavid van Moolenbroek  +++ new files:
152*5d5fbe79SDavid van Moolenbroek
153*5d5fbe79SDavid van Moolenbroek    * Added 4 new files: def.c, timers.c, timers.h, tcp_impl.h:
154*5d5fbe79SDavid van Moolenbroek
155*5d5fbe79SDavid van Moolenbroek    * Moved stack-internal parts of tcp.h to tcp_impl.h, tcp.h now only contains
156*5d5fbe79SDavid van Moolenbroek      the actual application programmer's API
157*5d5fbe79SDavid van Moolenbroek
158*5d5fbe79SDavid van Moolenbroek    * Separated timer implementation from sys.h/.c, moved to timers.h/.c;
159*5d5fbe79SDavid van Moolenbroek      Added timer implementation for NO_SYS==1, set NO_SYS_NO_TIMERS==1 if you
160*5d5fbe79SDavid van Moolenbroek      still want to use your own timer implementation for NO_SYS==0 (as before).
161*5d5fbe79SDavid van Moolenbroek
162*5d5fbe79SDavid van Moolenbroek  +++ sys layer:
163*5d5fbe79SDavid van Moolenbroek
164*5d5fbe79SDavid van Moolenbroek    * Converted mbox- and semaphore-functions to take pointers to sys_mbox_t/
165*5d5fbe79SDavid van Moolenbroek      sys_sem_t;
166*5d5fbe79SDavid van Moolenbroek
167*5d5fbe79SDavid van Moolenbroek    * Converted sys_mbox_new/sys_sem_new to take pointers and return err_t;
168*5d5fbe79SDavid van Moolenbroek
169*5d5fbe79SDavid van Moolenbroek    * Added Mutex concept in sys_arch (define LWIP_COMPAT_MUTEX to let sys.h use
170*5d5fbe79SDavid van Moolenbroek      binary semaphores instead of mutexes - as before)
171*5d5fbe79SDavid van Moolenbroek
172*5d5fbe79SDavid van Moolenbroek  +++ new options:
173*5d5fbe79SDavid van Moolenbroek
174*5d5fbe79SDavid van Moolenbroek     * Don't waste memory when chaining segments, added option TCP_OVERSIZE to
175*5d5fbe79SDavid van Moolenbroek       prevent creating many small pbufs when calling tcp_write with many small
176*5d5fbe79SDavid van Moolenbroek       blocks of data. Instead, pbufs are allocated larger than needed and the
177*5d5fbe79SDavid van Moolenbroek       space is used for later calls to tcp_write.
178*5d5fbe79SDavid van Moolenbroek
179*5d5fbe79SDavid van Moolenbroek     * Added LWIP_NETIF_TX_SINGLE_PBUF to always copy to try to create single pbufs
180*5d5fbe79SDavid van Moolenbroek       in tcp_write/udp_send.
181*5d5fbe79SDavid van Moolenbroek
182*5d5fbe79SDavid van Moolenbroek    * Added an additional option LWIP_ETHERNET to support ethernet without ARP
183*5d5fbe79SDavid van Moolenbroek      (necessary for pure PPPoE)
184*5d5fbe79SDavid van Moolenbroek
185*5d5fbe79SDavid van Moolenbroek    * Add MEMP_SEPARATE_POOLS to place memory pools in separate arrays. This may
186*5d5fbe79SDavid van Moolenbroek      be used to place these pools into user-defined memory by using external
187*5d5fbe79SDavid van Moolenbroek      declaration.
188*5d5fbe79SDavid van Moolenbroek
189*5d5fbe79SDavid van Moolenbroek    * Added TCP_SNDQUEUELOWAT corresponding to TCP_SNDLOWAT
190*5d5fbe79SDavid van Moolenbroek
191*5d5fbe79SDavid van Moolenbroek  +++ new pools:
192*5d5fbe79SDavid van Moolenbroek
193*5d5fbe79SDavid van Moolenbroek     * Netdb uses a memp pool for allocating memory when getaddrinfo() is called,
194*5d5fbe79SDavid van Moolenbroek       so MEMP_NUM_NETDB has to be set accordingly.
195*5d5fbe79SDavid van Moolenbroek
196*5d5fbe79SDavid van Moolenbroek     * DNS_LOCAL_HOSTLIST_IS_DYNAMIC uses a memp pool instead of the heap, so
197*5d5fbe79SDavid van Moolenbroek       MEMP_NUM_LOCALHOSTLIST has to be set accordingly.
198*5d5fbe79SDavid van Moolenbroek
199*5d5fbe79SDavid van Moolenbroek     * Snmp-agent uses a memp pools instead of the heap, so MEMP_NUM_SNMP_* have
200*5d5fbe79SDavid van Moolenbroek       to be set accordingly.
201*5d5fbe79SDavid van Moolenbroek
202*5d5fbe79SDavid van Moolenbroek     * PPPoE uses a MEMP pool instead of the heap, so MEMP_NUM_PPPOE_INTERFACES
203*5d5fbe79SDavid van Moolenbroek       has to be set accordingly
204*5d5fbe79SDavid van Moolenbroek
205*5d5fbe79SDavid van Moolenbroek  * Integrated loopif into netif.c - loopif does not have to be created by the
206*5d5fbe79SDavid van Moolenbroek    port any more, just define LWIP_HAVE_LOOPIF to 1.
207*5d5fbe79SDavid van Moolenbroek
208*5d5fbe79SDavid van Moolenbroek  * Added define LWIP_RAND() for lwip-wide randomization (needs to be defined
209*5d5fbe79SDavid van Moolenbroek    in cc.h, e.g. used by igmp)
210*5d5fbe79SDavid van Moolenbroek
211*5d5fbe79SDavid van Moolenbroek  * Added printf-formatter X8_F to printf u8_t as hex
212*5d5fbe79SDavid van Moolenbroek
213*5d5fbe79SDavid van Moolenbroek  * The heap now may be moved to user-defined memory by defining
214*5d5fbe79SDavid van Moolenbroek    LWIP_RAM_HEAP_POINTER as a void pointer to that memory's address
215*5d5fbe79SDavid van Moolenbroek
216*5d5fbe79SDavid van Moolenbroek  * added autoip_set_struct() and dhcp_set_struct() to let autoip and dhcp work
217*5d5fbe79SDavid van Moolenbroek    with user-allocated structs instead of calling mem_malloc
218*5d5fbe79SDavid van Moolenbroek
219*5d5fbe79SDavid van Moolenbroek  * Added const char* name to mem- and memp-stats for easier debugging.
220*5d5fbe79SDavid van Moolenbroek
221*5d5fbe79SDavid van Moolenbroek  * Calculate the TCP/UDP checksum while copying to only fetch data once:
222*5d5fbe79SDavid van Moolenbroek    Define LWIP_CHKSUM_COPY to a memcpy-like function that returns the checksum
223*5d5fbe79SDavid van Moolenbroek
224*5d5fbe79SDavid van Moolenbroek  * Added SO_REUSE_RXTOALL to pass received UDP broadcast/multicast packets to
225*5d5fbe79SDavid van Moolenbroek    more than one pcb.
226*5d5fbe79SDavid van Moolenbroek
227*5d5fbe79SDavid van Moolenbroek  * Changed the semantics of ARP_QUEUEING==0: ARP_QUEUEING now cannot be turned
228*5d5fbe79SDavid van Moolenbroek    off any more, if this is set to 0, only one packet (the most recent one) is
229*5d5fbe79SDavid van Moolenbroek    queued (like demanded by RFC 1122).
230*5d5fbe79SDavid van Moolenbroek
231*5d5fbe79SDavid van Moolenbroek
232*5d5fbe79SDavid van Moolenbroek  ++ Major bugfixes/improvements
233*5d5fbe79SDavid van Moolenbroek
234*5d5fbe79SDavid van Moolenbroek  * Implemented tcp_shutdown() to only shut down one end of a connection
235*5d5fbe79SDavid van Moolenbroek  * Implemented shutdown() at socket- and netconn-level
236*5d5fbe79SDavid van Moolenbroek  * Added errorset support to select() + improved select speed overhead
237*5d5fbe79SDavid van Moolenbroek  * Merged pppd to v2.3.11 (including some backported bugfixes from 2.4.x)
238*5d5fbe79SDavid van Moolenbroek  * Added timer implementation for NO_SYS==1 (may be disabled with NO_SYS_NO_TIMERS==1
239*5d5fbe79SDavid van Moolenbroek  * Use macros defined in ip_addr.h to work with IP addresses
240*5d5fbe79SDavid van Moolenbroek  * Implemented many nonblocking socket/netconn functions
241*5d5fbe79SDavid van Moolenbroek  * Fixed ARP input processing: only add a new entry if a request was directed as us
242*5d5fbe79SDavid van Moolenbroek  * mem_realloc() to mem_trim() to prevent confusion with realloc()
243*5d5fbe79SDavid van Moolenbroek  * Some improvements for AutoIP (don't route/forward link-local addresses, don't break
244*5d5fbe79SDavid van Moolenbroek    existing connections when assigning a routable address)
245*5d5fbe79SDavid van Moolenbroek  * Correctly handle remote side overrunning our rcv_wnd in ooseq case
246*5d5fbe79SDavid van Moolenbroek  * Removed packing from ip_addr_t, the packed version is now only used in protocol headers
247*5d5fbe79SDavid van Moolenbroek  * Corrected PBUF_POOL_BUFSIZE for ports where ETH_PAD_SIZE > 0
248*5d5fbe79SDavid van Moolenbroek  * Added support for static ARP table entries
249*5d5fbe79SDavid van Moolenbroek
250*5d5fbe79SDavid van Moolenbroek(STABLE-1.3.2)
251*5d5fbe79SDavid van Moolenbroek
252*5d5fbe79SDavid van Moolenbroek  * initial version of this file
253