Commit 04aeeba2 authored by Dmitry Frank's avatar Dmitry Frank Committed by Cesanta Bot

Add inet_ntop and inet_pton to esp8266

PUBLISHED_FROM=0a321ace3753a518e299b795fb7a4eed19708bb6
parent 4e11d5cd
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment