Fixed compilation of proj/lib

This commit is contained in:
goldsimon 2010-02-21 11:26:15 +00:00
parent 2a41542edb
commit 14d8d2b9e4
6 changed files with 25 additions and 13 deletions

View File

@ -72,6 +72,10 @@
#define IFNAME0 't'
#define IFNAME1 'p'
#ifndef TAPIF_DEBUG
#define TAPIF_DEBUG LWIP_DBG_OFF
#endif
struct tapif {
struct eth_addr *ethaddr;
/* Add whatever per-interface state that is needed here. */
@ -332,7 +336,7 @@ tapif_init(struct netif *netif)
netif->name[1] = IFNAME1;
netif->output = etharp_output;
netif->linkoutput = low_level_output;
netif->mtu = 1500;
netif->mtu = 1500;
/* hardware address length */
netif->hwaddr_len = 6;

View File

@ -39,6 +39,10 @@
#include "lwip/inet.h"
#include "lwip/inet_chksum.h"
#ifndef TCPDUMP_DEBUG
#define TCPDUMP_DEBUG LWIP_DBG_OFF
#endif
static FILE *file = NULL;
/*-----------------------------------------------------------------------------------*/

View File

@ -54,6 +54,10 @@
#define IFNAME0 't'
#define IFNAME1 'n'
#ifndef TUNIF_DEBUG
#define TUNIF_DEBUG LWIP_DBG_OFF
#endif
struct tunif {
/* Add whatever per-interface state that is needed here. */
int fd;

View File

@ -62,6 +62,10 @@
#define UNIXIF_QUEUELEN 6
/*#define UNIXIF_DROP_FIRST */
#ifndef UNIXIF_DEBUG
#define UNIXIF_DEBUG LWIP_DBG_OFF
#endif
struct unixif_buf {
struct pbuf *p;
unsigned short len, tot_len;
@ -225,9 +229,7 @@ unixif_input_handler(void *data)
q = q->next;
}
pbuf_realloc(p, len);
#ifdef LINK_STATS
lwip_stats.link.recv++;
#endif /* LINK_STATS */
LINK_STATS_INC(link.recv);
tcpdump(p);
netif->input(p, netif);
} else {
@ -319,9 +321,7 @@ unixif_output(struct netif *netif, struct pbuf *p, ip_addr_t *ipaddr)
LWIP_DEBUGF(UNIXIF_DEBUG, ("unixif_output: drop\n"));
#endif /* UNIXIF_DROP_FIRST */
#ifdef LINK_STATS
lwip_stats.link.drop++;
#endif /* LINK_STATS */
LINK_STATS_INC(link.drop);
} else {
LWIP_DEBUGF(UNIXIF_DEBUG, ("unixif_output: on list\n"));
@ -393,9 +393,7 @@ unixif_output_timeout(void *arg)
abort();
}
tcpdump(p);
#ifdef LINK_STATS
lwip_stats.link.xmit++;
#endif /* LINK_STATS */
LINK_STATS_INC(link.xmit);
free(data);
free(buf);

View File

@ -43,7 +43,7 @@ CFLAGS=-g -Wall -DIPv4 -DLWIP_DEBUG
CFLAGS:=$(CFLAGS) \
-I$(LWIPDIR)/include -I$(LWIPARCH)/include -I$(LWIPDIR)/include/ipv4 \
-Iapps -I.
-I$(LWIPDIR) -I.
# COREFILES, CORE4FILES: The minimum set of files needed for lwIP.
COREFILES=$(LWIPDIR)/core/mem.c $(LWIPDIR)/core/memp.c $(LWIPDIR)/core/netif.c \
@ -53,7 +53,7 @@ COREFILES=$(LWIPDIR)/core/mem.c $(LWIPDIR)/core/memp.c $(LWIPDIR)/core/netif.c \
$(LWIPDIR)/core/def.c $(LWIPDIR)/core/timers.c
CORE4FILES=$(LWIPDIR)/core/ipv4/icmp.c $(LWIPDIR)/core/ipv4/ip.c \
$(LWIPDIR)/core/ipv4/inet.c $(LWIPDIR)/core/ipv4/ip_addr.c \
$(LWIPDIR)/core/ipv4/inet_chksum.c
$(LWIPDIR)/core/ipv4/inet_chksum.c $(LWIPDIR)/core/ipv4/ip_frag.c
# APIFILES: The files which implement the sequential and socket APIs.
@ -64,7 +64,7 @@ APIFILES=$(LWIPDIR)/api/api_lib.c $(LWIPDIR)/api/api_msg.c $(LWIPDIR)/api/tcpip.
NETIFFILES=$(LWIPDIR)/netif/etharp.c
# ARCHFILES: Architecture specific files.
ARCHFILES=$(wildcard $(LWIPDIR)/arch/$(LWIPARCH)/*.c $(LWIPDIR)/arch/$(LWIPARCH)/netif/*.c)
ARCHFILES=$(wildcard $(LWIPARCH)/*.c $(LWIPARCH)/netif/tapif.c $(LWIPARCH)/netif/tunif.c $(LWIPARCH)/netif/unixif.c $(LWIPARCH)/netif/list.c $(LWIPARCH)/netif/tcpdump.c)
# LWIPFILES: All the above.
LWIPFILES=$(COREFILES) $(CORE4FILES) $(APIFILES) $(NETIFFILES) $(ARCHFILES)

View File

@ -93,9 +93,11 @@ struct sys_thread {
pthread_t pthread;
};
#if SYS_LIGHTWEIGHT_PROT
static pthread_mutex_t lwprot_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_t lwprot_thread = (pthread_t)0xDEAD;
static int lwprot_count = 0;
#endif /* SYS_LIGHTWEIGHT_PROT */
static struct sys_sem *sys_sem_new_internal(u8_t count);
static void sys_sem_free_internal(struct sys_sem *sem);