LibC: Implement inet_aton

This is not POSIX but IMO it makes sense to have the counter part to
inet_ntoa
This commit is contained in:
2025-06-02 11:29:52 +03:00
parent be6da3e0db
commit 022bb69782
2 changed files with 31 additions and 21 deletions

View File

@@ -11,6 +11,7 @@ __BEGIN_DECLS
#include <bits/types/socklen_t.h>
in_addr_t inet_addr(const char* cp);
int inet_aton(const char* cp, struct in_addr* inp);
char* inet_ntoa(struct in_addr in);
const char* inet_ntop(int af, const void* __restrict src, char* __restrict dst, socklen_t size);
int inet_pton(int af, const char* __restrict src, void* __restrict dst);