Add the following features and bugfixes:

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.
This commit is contained in:
davidhaas
2003-02-06 22:18:56 +00:00
parent d2e008d4b4
commit dd2fa15e8a
28 changed files with 1599 additions and 300 deletions

View File

@@ -217,7 +217,7 @@ ip_input(struct pbuf *p, struct netif *inp) {
#if IP_DEBUG
/* DEBUGF("ip_input: \n");
ip_debug_print(p);
DEBUGF("ip_input: p->len %d p->tot_len %d\n", p->len, p->tot_len);*/
DEBUGF("ip_input: p->len %u p->tot_len %u\n", p->len, p->tot_len);*/
#endif /* IP_DEBUG */
@@ -237,7 +237,7 @@ ip_input(struct pbuf *p, struct netif *inp) {
/* send ICMP destination protocol unreachable */
icmp_dest_unreach(p, ICMP_DUR_PROTO);
pbuf_free(p);
DEBUGF(IP_DEBUG, ("Unsupported transportation protocol %d\n",
DEBUGF(IP_DEBUG, ("Unsupported transportation protocol %u\n",
iphdr->nexthdr));
#ifdef IP_STATS
@@ -266,7 +266,7 @@ ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
PERF_START;
printf("len %d tot_len %d\n", p->len, p->tot_len);
printf("len %u tot_len %u\n", p->len, p->tot_len);
if(pbuf_header(p, IP_HLEN)) {
DEBUGF(IP_DEBUG, ("ip_output: not enough room for IP header in pbuf\n"));
#ifdef IP_STATS
@@ -275,7 +275,7 @@ ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
return ERR_BUF;
}
printf("len %d tot_len %d\n", p->len, p->tot_len);
printf("len %u tot_len %u\n", p->len, p->tot_len);
iphdr = p->payload;
@@ -303,7 +303,7 @@ ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
++lwip_stats.ip.xmit;
#endif /* IP_STATS */
DEBUGF(IP_DEBUG, ("ip_output_if: %c%c (len %d)\n", netif->name[0], netif->name[1], p->tot_len));
DEBUGF(IP_DEBUG, ("ip_output_if: %c%c (len %u)\n", netif->name[0], netif->name[1], p->tot_len));
#if IP_DEBUG
ip_debug_print(p);
#endif /* IP_DEBUG */
@@ -350,7 +350,7 @@ ip_debug_print(struct pbuf *p)
iphdr->tclass1, iphdr->tclass2,
iphdr->flow1, iphdr->flow2));
DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
DEBUGF(IP_DEBUG, ("| %5d | %2d | %2d | (len, nexthdr, hoplim)\n",
DEBUGF(IP_DEBUG, ("| %5u | %2u | %2u | (len, nexthdr, hoplim)\n",
ntohs(iphdr->len),
iphdr->nexthdr,
iphdr->hoplim));