instead of PBUF_ROM. This addition allows support of copy-on-demand where the
lower layers can call pbuf_unref() which tests for any PBUF_REF buffers and
replaces them with PBUF_POOL buffers. This is now used
everywhere. pbuf_unref() is called in ARP queueing and in the coldfire
driver, which puts frames on a DMA queue and frees them later.
Along with this change pbuf_free() now goes through the entire chain of
buffers and tests all the ref counters, not just the first one. Generally now
pbuf_ref_chain() should be called and not pbuf_ref(). This change was made
because it is possible for the head of the pbuf chain to have a different
count than the payload pbuf which might have been passed by the application.
Coldfire ethernet driver also had some minor other updates and STATS was
changed to LWIP_STATS.
Added select() functionality to sockets library.
Support for errno in sockets library.
Byte ordering fixes.
basic lwip_ioctl(), FIONREAD, get/setsockopt() etc. support
- added additional argument to netif_add to pass state pointer so that the
if_init function has access to context information before
the interface is added, without accessing globals.
- added netif_remove()
- to conserve cpu load the tcpip_tcp_timer should only be active
when tcbs that need it exist.
- pass length of available data to callbacks for NETCONN_EVT_RCV events
- added tcpip_link_input(), a hack to allow processing of PPP
packets in tcpip_thread() context. This saves threads and context
switches.
- renamed incompatible ASSERT() macro to LWIP_ASSERT() to avoid name
collision.
- changed a bunch of %d's to %u's in format strings for unsigned values.
- added ip_frag to lwip_stats.
- changed IP_REASS_MAXAGE and IP_REASS_TMO defaults to more realistic
values.
- added sys_timeout_remove() function to cancel timeouts (needed by PPP
amongst other things).
- tolerate NULL returns from sys_arch_timeouts() since some threads might
not need to use or have timeouts.
- added sys_sem_wait_timeout()
- moved mem_malloc() function to end of mem.c to work around tasking
compiler bug.
- automatically bind to local tcp port if 0.
- allow customization of port ranges for automatic local bindings.
- corrected various typos, spelling errors, etc..
Thanks to Marc Boucher for many of these changes.