mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-25 15:42:56 +00:00
Removed old broadcast check macro.
This commit is contained in:
parent
b8ee8808b4
commit
5b12c61a81
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "lwip/ip_addr.h"
|
#include "lwip/ip_addr.h"
|
||||||
#include "lwip/inet.h"
|
#include "lwip/inet.h"
|
||||||
|
#include "lwip/netif.h"
|
||||||
|
|
||||||
/* used by IP_ADDR_ANY and IP_ADDR_BROADCAST in ip_addr.h */
|
/* used by IP_ADDR_ANY and IP_ADDR_BROADCAST in ip_addr.h */
|
||||||
const struct ip_addr ip_addr_any = { 0x00000000UL };
|
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.
|
* as it does not support non-broadcast interfaces.
|
||||||
* see lwip-devel mailing list on 18-2-2004
|
* 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)
|
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
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
@ -125,14 +125,7 @@ extern const struct ip_addr ip_addr_broadcast;
|
|||||||
|
|
||||||
#define ip_addr_isany(addr1) ((addr1) == NULL || (addr1)->addr == 0)
|
#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 *);
|
u8_t ip_addr_isbroadcast(struct ip_addr *, struct netif *);
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000))
|
#define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user