loopif is not required for loopback traffic any more but passed through any netif (ENABLE_LOOPBACK has to be enabled) (task #13515)

This commit is contained in:
sg
2015-03-24 21:22:19 +01:00
parent 71d121fab2
commit 521c92764d
5 changed files with 61 additions and 3 deletions

View File

@@ -170,6 +170,8 @@ extern const ip_addr_t ip_addr_broadcast;
#define ip_addr_set_any(ipaddr) ((ipaddr)->addr = IPADDR_ANY)
/** Set address to loopback address */
#define ip_addr_set_loopback(ipaddr) ((ipaddr)->addr = PP_HTONL(IPADDR_LOOPBACK))
/** Check if an address is in the loopback region */
#define ip_addr_isloopback(ipaddr) (((ipaddr)->addr & PP_HTONL(IP_CLASSA_NET)) == PP_HTONL(((u32_t)IP_LOOPBACKNET) << 24))
/** Safely copy one IP address to another and change byte order
* from host- to network-order. */
#define ip_addr_set_hton(dest, src) ((dest)->addr = \

View File

@@ -1375,7 +1375,9 @@
------------------------------------
*/
/**
* LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1)
* LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1).
* This is only needed when no real netifs are available. If at least one other
* netif is available, loopback traffic uses this netif.
*/
#ifndef LWIP_HAVE_LOOPIF
#define LWIP_HAVE_LOOPIF 0