diff options
author | Yonatan Goldschmidt <yon.goldschmidt@gmail.com> | 2020-05-10 23:36:59 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-11 09:50:42 +0200 |
commit | 6c4fe6989918f160438d5ffbcc346aa323cf2099 (patch) | |
tree | fed174ed207cc21c70ef181a838aaab05919d8fb /Libraries | |
parent | 107c83bd424d571f1ecf5ece567b2f47471c4f69 (diff) | |
download | serenity-6c4fe6989918f160438d5ffbcc346aa323cf2099.zip |
LibC: Add inet_aton, based on inet_pton
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibC/arpa/inet.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Libraries/LibC/arpa/inet.h b/Libraries/LibC/arpa/inet.h index 82f319b0ab..634facf858 100644 --- a/Libraries/LibC/arpa/inet.h +++ b/Libraries/LibC/arpa/inet.h @@ -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) |