diff options
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 |
