diff --git a/src/core/ipv4/ip_addr.c b/src/core/ipv4/ip_addr.c index d7989142..05c08bb8 100644 --- a/src/core/ipv4/ip_addr.c +++ b/src/core/ipv4/ip_addr.c @@ -32,6 +32,7 @@ #include "lwip/ip_addr.h" #include "lwip/inet.h" +#include "lwip/netif.h" /* used by IP_ADDR_ANY and IP_ADDR_BROADCAST in ip_addr.h */ const struct ip_addr ip_addr_any = { 0x00000000UL }; @@ -47,8 +48,6 @@ const struct ip_addr ip_addr_broadcast = { 0xffffffffUL }; * as it does not support non-broadcast interfaces. * see lwip-devel mailing list on 18-2-2004 */ -#if 1 /* going to replace macro in ip_addr.h */ -#include "lwip/netif.h" u8_t ip_addr_isbroadcast(struct ip_addr *addr, struct netif *netif) { @@ -70,4 +69,3 @@ u8_t ip_addr_isbroadcast(struct ip_addr *addr, struct netif *netif) else return 0; } -#endif diff --git a/src/include/ipv4/lwip/ip_addr.h b/src/include/ipv4/lwip/ip_addr.h index ef8898a2..990ae289 100644 --- a/src/include/ipv4/lwip/ip_addr.h +++ b/src/include/ipv4/lwip/ip_addr.h @@ -125,14 +125,7 @@ extern const struct ip_addr ip_addr_broadcast; #define ip_addr_isany(addr1) ((addr1) == NULL || (addr1)->addr == 0) -#if 0 /* replaced by function in ip_addr.c */ -#define ip_addr_isbroadcast(addr1, mask) (((((addr1)->addr) & ~((mask)->addr)) == \ - (0xffffffff & ~((mask)->addr))) || \ - ((addr1)->addr == 0xffffffff) || \ - ((addr1)->addr == 0x00000000)) -#else u8_t ip_addr_isbroadcast(struct ip_addr *, struct netif *); -#endif #define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000))