LibC: Add inet_aton, based on inet_pton

This commit is contained in:
Yonatan Goldschmidt 2020-05-10 23:36:59 +03:00 committed by Andreas Kling
parent 107c83bd42
commit 6c4fe69899
Notes: sideshowbarker 2024-07-19 06:44:17 +09:00

View File

@ -37,6 +37,11 @@ __BEGIN_DECLS
const char* inet_ntop(int af, const void* src, char* dst, socklen_t);
int inet_pton(int af, const char* src, void* dst);
static inline int inet_aton(const char *cp, struct in_addr *inp)
{
return inet_pton(AF_INET, cp, inp);
}
char* inet_ntoa(struct in_addr);
inline uint16_t htons(uint16_t value)