From 91706a08e16d52ddb74db2da8b17a29667e2ddbf Mon Sep 17 00:00:00 2001 From: jani Date: Fri, 14 Nov 2003 13:39:05 +0000 Subject: [PATCH] make loopif optional --- src/include/lwip/opt.h | 6 ++++-- src/netif/loopif.c | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 237bde45..3c887838 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -299,8 +299,10 @@ a lot of data that needs to be copied, this should be set high. */ #define TCP_SNDLOWAT TCP_SND_BUF/2 #endif - - +/* Support loop interface (127.0.0.1) */ +#ifndef LWIP_HAVE_LOOPIF +#define LWIP_HAVE_LOOPIF 1 +#endif #ifndef LWIP_EVENT_API #define LWIP_EVENT_API 0 diff --git a/src/netif/loopif.c b/src/netif/loopif.c index 1a8e2e28..9e7c03a0 100644 --- a/src/netif/loopif.c +++ b/src/netif/loopif.c @@ -29,9 +29,12 @@ * Author: Adam Dunkels * */ -#include "lwip/mem.h" #include "lwip/opt.h" + +#if LWIP_HAVE_LOOPIF + #include "netif/loopif.h" +#include "lwip/mem.h" #if defined(LWIP_DEBUG) && defined(LWIP_TCPDUMP) #include "netif/tcpdump.h" @@ -106,6 +109,7 @@ loopif_init(struct netif *netif) return ERR_OK; } +#endif /* LWIP_HAVE_LOOPIF */