mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-16 21:26:43 +08:00
patch #6900: added define ip_ntoa(struct ip_addr*)
This commit is contained in:
@@ -161,6 +161,11 @@ u8_t ip_addr_isbroadcast(struct ip_addr *, struct netif *);
|
||||
#define ip4_addr3(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 8) & 0xff)
|
||||
#define ip4_addr4(ipaddr) ((u16_t)(ntohl((ipaddr)->addr)) & 0xff)
|
||||
|
||||
/**
|
||||
* Same as inet_ntoa() but takes a struct ip_addr*
|
||||
*/
|
||||
#define ip_ntoa(addr) ((addr != NULL) ? inet_ntoa(*((struct in_addr*)(addr))) : "NULL")
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user