34 |
#include "lwip/inet.h" |
#include "lwip/inet.h" |
35 |
|
|
36 |
|
|
37 |
int |
u8_t |
38 |
ip_addr_netcmp(struct ip_addr *addr1, struct ip_addr *addr2, |
ip_addr_netcmp(struct ip_addr *addr1, struct ip_addr *addr2, |
39 |
struct ip_addr *mask) |
struct ip_addr *mask) |
40 |
{ |
{ |
45 |
|
|
46 |
} |
} |
47 |
|
|
48 |
int |
u8_t |
49 |
ip_addr_cmp(struct ip_addr *addr1, struct ip_addr *addr2) |
ip_addr_cmp(struct ip_addr *addr1, struct ip_addr *addr2) |
50 |
{ |
{ |
51 |
return(addr1->addr[0] == addr2->addr[0] && |
return(addr1->addr[0] == addr2->addr[0] && |
64 |
dest->addr[3] = src->addr[3];*/ |
dest->addr[3] = src->addr[3];*/ |
65 |
} |
} |
66 |
|
|
67 |
int |
u8_t |
68 |
ip_addr_isany(struct ip_addr *addr) |
ip_addr_isany(struct ip_addr *addr) |
69 |
{ |
{ |
70 |
if (addr == NULL) return 1; |
if (addr == NULL) return 1; |
76 |
void |
void |
77 |
ip_addr_debug_print(struct ip_addr *addr) |
ip_addr_debug_print(struct ip_addr *addr) |
78 |
{ |
{ |
79 |
printf("%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx", |
printf("%"X32_F":%"X32_F":%"X32_F":%"X32_F":%"X32_F":%"X32_F":%"X32_F":%"X32_F", |
80 |
ntohl(addr->addr[0]) >> 16 & 0xffff, |
ntohl(addr->addr[0]) >> 16 & 0xffff, |
81 |
ntohl(addr->addr[0]) & 0xffff, |
ntohl(addr->addr[0]) & 0xffff, |
82 |
ntohl(addr->addr[1]) >> 16 & 0xffff, |
ntohl(addr->addr[1]) >> 16 & 0xffff, |