UPGRADING 12 KB

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