Add inet_ntop and inet_pton to esp8266

PUBLISHED_FROM=0a321ace3753a518e299b795fb7a4eed19708bb6
This commit is contained in:
Dmitry Frank 2017-12-14 19:26:30 +02:00 committed by Cesanta Bot
parent 4e11d5cdbf
commit 04aeeba2fa

View File

@ -591,6 +591,12 @@ typedef struct stat cs_stat_t;
#define CS_ENABLE_STDIO 1
#endif
#define inet_ntop(af, src, dst, size) \
(((af) == AF_INET) ? ipaddr_ntoa_r((const ip_addr_t *) (src), (dst), (size)) \
: NULL)
#define inet_pton(af, src, dst) \
(((af) == AF_INET) ? ipaddr_aton((src), (ip_addr_t *) (dst)) : 0)
#endif /* CS_PLATFORM == CS_P_ESP8266 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_ESP8266_H_ */
#ifdef MG_MODULE_LINES