138 |
#define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000)) |
#define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000)) |
139 |
|
|
140 |
|
|
141 |
#define ip_addr_debug_print(debug, ipaddr) LWIP_DEBUGF(debug, ("%u.%u.%u.%u", \ |
#define ip_addr_debug_print(debug, ipaddr) LWIP_DEBUGF(debug, ("%"U16_F".%"U16_F".%"U16_F".%"U16_F, \ |
142 |
ipaddr?(unsigned int)(ntohl((ipaddr)->addr) >> 24) & 0xff:0, \ |
ipaddr?(u16_t)(ntohl((ipaddr)->addr) >> 24) & 0xff:0, \ |
143 |
ipaddr?(unsigned int)(ntohl((ipaddr)->addr) >> 16) & 0xff:0, \ |
ipaddr?(u16_t)(ntohl((ipaddr)->addr) >> 16) & 0xff:0, \ |
144 |
ipaddr?(unsigned int)(ntohl((ipaddr)->addr) >> 8) & 0xff:0, \ |
ipaddr?(u16_t)(ntohl((ipaddr)->addr) >> 8) & 0xff:0, \ |
145 |
ipaddr?(unsigned int)ntohl((ipaddr)->addr) & 0xff:0U)) |
ipaddr?(u16_t)ntohl((ipaddr)->addr) & 0xff:0U)) |
146 |
|
|
147 |
/* cast to unsigned int, as it is used as argument to printf functions |
/* cast to unsigned int, as it is used as argument to printf functions |
148 |
* which expect integer arguments */ |
* which expect integer arguments. CSi: use cc.h formatters (conversion chars)! */ |
149 |
#define ip4_addr1(ipaddr) ((unsigned int)(ntohl((ipaddr)->addr) >> 24) & 0xff) |
#define ip4_addr1(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 24) & 0xff) |
150 |
#define ip4_addr2(ipaddr) ((unsigned int)(ntohl((ipaddr)->addr) >> 16) & 0xff) |
#define ip4_addr2(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 16) & 0xff) |
151 |
#define ip4_addr3(ipaddr) ((unsigned int)(ntohl((ipaddr)->addr) >> 8) & 0xff) |
#define ip4_addr3(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 8) & 0xff) |
152 |
#define ip4_addr4(ipaddr) ((unsigned int)(ntohl((ipaddr)->addr)) & 0xff) |
#define ip4_addr4(ipaddr) ((u16_t)(ntohl((ipaddr)->addr)) & 0xff) |
153 |
#endif /* __LWIP_IP_ADDR_H__ */ |
#endif /* __LWIP_IP_ADDR_H__ */ |
154 |
|
|
155 |
|
|