diff --git a/ports/unix/netif/tapif.c b/ports/unix/netif/tapif.c index dfe3b53..ffd048c 100644 --- a/ports/unix/netif/tapif.c +++ b/ports/unix/netif/tapif.c @@ -312,13 +312,6 @@ tapif_input(struct netif *netif) } } /*-----------------------------------------------------------------------------------*/ -static void -arp_timer(void *arg) -{ - etharp_tmr(); - sys_timeout(ARP_TMR_INTERVAL, (sys_timeout_handler)arp_timer, NULL); -} -/*-----------------------------------------------------------------------------------*/ /* * tapif_init(): * @@ -347,9 +340,7 @@ tapif_init(struct netif *netif) tapif->ethaddr = (struct eth_addr *)&(netif->hwaddr[0]); low_level_init(netif); - etharp_init(); - sys_timeout(ARP_TMR_INTERVAL, (sys_timeout_handler)arp_timer, NULL); return ERR_OK; } /*-----------------------------------------------------------------------------------*/ diff --git a/ports/unix/netif/tcpdump.c b/ports/unix/netif/tcpdump.c index 2b27f4e..9a2bec1 100644 --- a/ports/unix/netif/tcpdump.c +++ b/ports/unix/netif/tcpdump.c @@ -58,7 +58,9 @@ tcpdump(struct pbuf *p) { struct ip_hdr *iphdr; struct tcp_hdr *tcphdr; +#if LWIP_UDP struct udp_hdr *udphdr; +#endif char flags[5]; int i; int len; @@ -139,6 +141,7 @@ tcpdump(struct pbuf *p) pbuf_header(p, IP_HLEN); break; +#if LWIP_UDP case IP_PROTO_UDP: udphdr = (struct udp_hdr *)((char *)iphdr + IP_HLEN); @@ -174,6 +177,7 @@ tcpdump(struct pbuf *p) pbuf_header(p, IP_HLEN); break; +#endif /* LWIP_UDP */ } #endif /* IPv4 */ diff --git a/ports/unix/proj/unixsim/apps/shell.c b/ports/unix/proj/unixsim/apps/shell.c index 8dad785..869d232 100644 --- a/ports/unix/proj/unixsim/apps/shell.c +++ b/ports/unix/proj/unixsim/apps/shell.c @@ -80,7 +80,7 @@ clos [connection #]: closes a TCP or UDP connection.\n\ stat: prints out lwIP statistics.\n\ quit: quits.\n"; -#define STAT_NUM ((6 * 13) + (6) + (4) + (11 * 4) + (2 * 3)) +#define STAT_NUM (((5 + LWIP_UDP) * 13) + (4) + (11 * 4) + (2 * 3)) static char *stat_msgs[STAT_NUM] = { "Link level * transmitted ", @@ -135,6 +135,7 @@ static char *stat_msgs[STAT_NUM] = { " option errors ", " * misc errors ", " cache hits ", +#if LWIP_UDP "UDP * transmitted ", " retransmitted ", " * received ", @@ -148,6 +149,7 @@ static char *stat_msgs[STAT_NUM] = { " option errors ", " * misc errors ", " cache hits ", +#endif "TCP * transmitted ", " * retransmitted ", " * received ", @@ -161,12 +163,6 @@ static char *stat_msgs[STAT_NUM] = { " * option errors ", " * misc errors ", " * cache hits ", - "Pbufs * available ", - " * used ", - " * high water mark ", - " * errors ", - " pbuf_alloc() locked ", - " pbuf_refresh() locked ", "Memory * available ", " * used ", " * high water mark ", @@ -280,6 +276,7 @@ static char *stat_formats[STAT_NUM] = { U16_F, /* icmp err */ U16_F, /* icmp cachehit */ +#if LWIP_UDP U16_F, /* udp xmit */ U16_F, /* udp rexmit */ U16_F, /* udp recv */ @@ -293,6 +290,7 @@ static char *stat_formats[STAT_NUM] = { U16_F, /* udp opterr */ U16_F, /* udp err */ U16_F, /* udp cachehit */ +#endif U16_F, /* tcp xmit */ U16_F, /* tcp exmit */ @@ -308,14 +306,6 @@ static char *stat_formats[STAT_NUM] = { U16_F, /* tcp err */ U16_F, /* tcp cachehit */ - /* FIXME: pbuf stats have moved to memp stats */ - U16_F, /* pbuf avail */ - U16_F, /* pbuf used */ - U16_F, /* pbuf max */ - U16_F, /* pbuf err */ - U16_F, /* pbuf alloc_locked */ - U16_F, /* pbuf refresh_locked */ - /* FIXME: always using 11 memp pools is wrong! */ U32_F, /* mem avail */ U32_F, /* mem used */ @@ -443,6 +433,7 @@ static void *stat_ptrs[STAT_NUM] = { &lwip_stats.icmp.err, &lwip_stats.icmp.cachehit, +#if LWIP_UDP &lwip_stats.udp.xmit, &lwip_stats.udp.rexmit, &lwip_stats.udp.recv, @@ -456,6 +447,7 @@ static void *stat_ptrs[STAT_NUM] = { &lwip_stats.udp.opterr, &lwip_stats.udp.err, &lwip_stats.udp.cachehit, +#endif &lwip_stats.tcp.xmit, &lwip_stats.tcp.rexmit, @@ -471,15 +463,6 @@ static void *stat_ptrs[STAT_NUM] = { &lwip_stats.tcp.err, &lwip_stats.tcp.cachehit, - /* FIXME: pbuf stats have moved to memp stats */ - NULL, NULL, NULL, NULL, NULL, NULL, - /*&lwip_stats.pbuf.avail, - &lwip_stats.pbuf.used, - &lwip_stats.pbuf.max, - &lwip_stats.pbuf.err, - &lwip_stats.pbuf.alloc_locked, - &lwip_stats.pbuf.refresh_locked,*/ - &lwip_stats.mem.avail, &lwip_stats.mem.used, &lwip_stats.mem.max,