diff options
| author | Jakob Kaivo <jkk@ung.org> | 2024-01-30 15:45:38 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2024-01-30 15:45:38 -0500 |
| commit | bafccb2f57ac1a1852be2d6aafe33cf02d1630c1 (patch) | |
| tree | a6164b42b37b941cb64bbc3db8af7a1daf381ace /src/arpa/inet/inet_ntop.c | |
| parent | 910a86c095b6d7311d73fa88a632aa9b673243b2 (diff) | |
update dependencies
Diffstat (limited to 'src/arpa/inet/inet_ntop.c')
| -rw-r--r-- | src/arpa/inet/inet_ntop.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/arpa/inet/inet_ntop.c b/src/arpa/inet/inet_ntop.c deleted file mode 100644 index efd14684..00000000 --- a/src/arpa/inet/inet_ntop.c +++ /dev/null @@ -1,39 +0,0 @@ -#if 0 - -#include <arpa/inet.h> -#include <errno.h> -#include <stdio.h> -#include <string.h> - -const char *inet_ntop(int af, const void *restrict src, char *restrict dst, socklen_t size) -{ - if (af == AF_INET) { - in_addr_t *a = src; - char s[INET_ADDRSTRLEN] = ""; - if (snprintf(s, sizeof(s), "%hhu.%hhu.%hhu.%hhu", - (*src >> 24) & 0xff, - (*src >> 16) & 0xff, - (*src >> 8) & 0xff, - (*src) & 0xff) > size) { - errno = ENOSPC; - return NULL; - } - strcpy(dst, s); - return dst; - } - - if (af != AF_INET6) { - errno = EAFNOSUPPORT; - return NULL; - } - - /* - char s[INET6_ADDRSTRLEN] = ""; - unsigned char *a = src; - */ - /* do IPv6 conversion */ - return dst; -} - - -#endif |
