Replaced ip_addr_isbroadcast() macro by function.

Overrides patch #2679, as this must be solved inside ip_addr_isbroadcast(), inspired by BSD.
This commit is contained in:
likewise
2004-03-11 21:20:10 +00:00
parent 6434f7efad
commit 10d42c6fa3
8 changed files with 26 additions and 29 deletions

View File

@@ -110,10 +110,14 @@ extern const struct ip_addr ip_addr_broadcast;
#define ip_addr_isany(addr1) ((addr1) == NULL || (addr1)->addr == 0)
u8_t ip_addr_isbroadcast(ip_addr *addr1, struct netif *netif);
#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))
#endif
#define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000))