Adapted contrib ports to loopif moved into netif.c
This commit is contained in:
parent
e70c0bd3f5
commit
540bac6fa3
|
@ -61,8 +61,7 @@ APIFILES=$(LWIPDIR)/api/api_lib.c $(LWIPDIR)/api/api_msg.c $(LWIPDIR)/api/tcpip.
|
|||
$(LWIPDIR)/api/err.c $(LWIPDIR)/api/sockets.c $(LWIPDIR)/api/netbuf.c $(LWIPDIR)/api/netdb.c
|
||||
|
||||
# NETIFFILES: Files implementing various generic network interface functions.'
|
||||
NETIFFILES=$(LWIPDIR)/netif/loopif.c \
|
||||
$(LWIPDIR)/netif/etharp.c
|
||||
NETIFFILES=$(LWIPDIR)/netif/etharp.c
|
||||
|
||||
# ARCHFILES: Architecture specific files.
|
||||
ARCHFILES=$(wildcard $(LWIPDIR)/arch/$(LWIPARCH)/*.c $(LWIPDIR)/arch/$(LWIPARCH)/netif/*.c)
|
||||
|
|
|
@ -70,8 +70,7 @@ APIFILES=$(LWIPDIR)/api/api_lib.c $(LWIPDIR)/api/api_msg.c $(LWIPDIR)/api/tcpip.
|
|||
$(LWIPDIR)/api/err.c $(LWIPDIR)/api/sockets.c $(LWIPDIR)/api/netbuf.c $(LWIPDIR)/api/netdb.c
|
||||
|
||||
# NETIFFILES: Files implementing various generic network interface functions.'
|
||||
NETIFFILES=$(LWIPDIR)/netif/loopif.c \
|
||||
$(LWIPDIR)/netif/etharp.c $(LWIPDIR)/netif/slipif.c
|
||||
NETIFFILES=$(LWIPDIR)/netif/etharp.c $(LWIPDIR)/netif/slipif.c
|
||||
|
||||
# NETIFFILES: Add PPP netif
|
||||
NETIFFILES+=$(LWIPDIR)/netif/ppp/auth.c $(LWIPDIR)/netif/ppp/chap.c \
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
#include "netif/unixif.h"
|
||||
#include "netif/dropif.h"
|
||||
#include "netif/pcapif.h"
|
||||
#include "netif/loopif.h"
|
||||
|
||||
#include "netif/tcpdump.h"
|
||||
|
||||
|
@ -313,9 +312,6 @@ ping_thread(void *arg)
|
|||
#endif
|
||||
|
||||
struct netif netif;
|
||||
#if LWIP_HAVE_LOOPIF
|
||||
struct netif loopif;
|
||||
#endif
|
||||
|
||||
static void
|
||||
init_netifs(void)
|
||||
|
@ -363,15 +359,6 @@ init_netifs(void)
|
|||
/* Only used for testing purposes: */
|
||||
netif_add(&ipaddr, &netmask, &gw, NULL, pcapif_init, tcpip_input);
|
||||
#endif
|
||||
|
||||
#if LWIP_HAVE_LOOPIF
|
||||
IP4_ADDR(&gw, 127,0,0,1);
|
||||
IP4_ADDR(&ipaddr, 127,0,0,1);
|
||||
IP4_ADDR(&netmask, 255,0,0,0);
|
||||
|
||||
netif_set_default(netif_add(&loopif, &ipaddr, &netmask, &gw, NULL, loopif_init,
|
||||
tcpip_input));
|
||||
#endif
|
||||
|
||||
#if LWIP_TCP
|
||||
tcpecho_init();
|
||||
|
|
|
@ -49,8 +49,6 @@
|
|||
#include "netif/unixif.h"
|
||||
#include "netif/dropif.h"
|
||||
|
||||
#include "netif/loopif.h"
|
||||
|
||||
#include "netif/tcpdump.h"
|
||||
|
||||
#include "lwip/ip_addr.h"
|
||||
|
|
|
@ -50,8 +50,6 @@
|
|||
#include "netif/unixif.h"
|
||||
#include "netif/dropif.h"
|
||||
|
||||
#include "netif/loopif.h"
|
||||
|
||||
#include "netif/tcpdump.h"
|
||||
|
||||
|
||||
|
|
|
@ -1078,10 +1078,6 @@
|
|||
RelativePath="$(LWIP_DIR)\src\include\netif\etharp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="$(LWIP_DIR)\src\include\netif\loopif.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="$(LWIP_DIR)\src\include\netif\ppp_oe.h"
|
||||
>
|
||||
|
@ -1121,10 +1117,6 @@
|
|||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="$(LWIP_DIR)\src\netif\loopif.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="$(LWIP_DIR)\src\netif\slipif.c"
|
||||
>
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
#include "lwip/autoip.h"
|
||||
|
||||
/* lwIP netif includes */
|
||||
#include "netif/loopif.h"
|
||||
#include "netif/etharp.h"
|
||||
|
||||
/* applications includes */
|
||||
|
@ -108,10 +107,6 @@
|
|||
/* THE ethernet interface */
|
||||
struct netif netif;
|
||||
#endif /* USE_ETHERNET */
|
||||
#if LWIP_HAVE_LOOPIF
|
||||
/* THE loopback interface */
|
||||
struct netif loop_netif;
|
||||
#endif /* LWIP_HAVE_LOOPIF */
|
||||
#if PPP_SUPPORT
|
||||
/* THE PPP descriptor */
|
||||
int ppp_desc = -1;
|
||||
|
@ -212,9 +207,6 @@ msvc_netif_init()
|
|||
#if USE_ETHERNET
|
||||
ip_addr_t ipaddr, netmask, gw;
|
||||
#endif /* USE_ETHERNET */
|
||||
#if LWIP_HAVE_LOOPIF
|
||||
ip_addr_t loop_ipaddr, loop_netmask, loop_gw;
|
||||
#endif /* LWIP_HAVE_LOOPIF */
|
||||
|
||||
#if PPP_SUPPORT
|
||||
const char *username = NULL, *password = NULL;
|
||||
|
@ -238,20 +230,6 @@ msvc_netif_init()
|
|||
#endif /* PPPOS_SUPPORT */
|
||||
#endif /* PPP_SUPPORT */
|
||||
|
||||
#if LWIP_HAVE_LOOPIF
|
||||
IP4_ADDR(&loop_gw, 127,0,0,1);
|
||||
IP4_ADDR(&loop_ipaddr, 127,0,0,1);
|
||||
IP4_ADDR(&loop_netmask, 255,0,0,0);
|
||||
printf("Starting lwIP, loopback interface IP is %s\n", ip_ntoa(&loop_ipaddr));
|
||||
|
||||
#if NO_SYS
|
||||
netif_add(&loop_netif, &loop_ipaddr, &loop_netmask, &loop_gw, NULL, loopif_init, ip_input);
|
||||
#else /* NO_SYS */
|
||||
netif_add(&loop_netif, &loop_ipaddr, &loop_netmask, &loop_gw, NULL, loopif_init, tcpip_input);
|
||||
#endif /* NO_SYS */
|
||||
netif_set_up(&loop_netif);
|
||||
#endif /* LWIP_HAVE_LOOPIF */
|
||||
|
||||
#if USE_ETHERNET
|
||||
ip_addr_set_zero(&gw);
|
||||
ip_addr_set_zero(&ipaddr);
|
||||
|
|
Loading…
Reference in New Issue