diff options
Diffstat (limited to 'openbsd-compat/inet_ntop.c')
-rw-r--r-- | openbsd-compat/inet_ntop.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/openbsd-compat/inet_ntop.c b/openbsd-compat/inet_ntop.c index c75a80d2b..e7ca4b7f8 100644 --- a/openbsd-compat/inet_ntop.c +++ b/openbsd-compat/inet_ntop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: inet_ntop.c,v 1.5 2002/08/23 16:27:31 itojun Exp $ */ | 1 | /* $OpenBSD: inet_ntop.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ |
2 | 2 | ||
3 | /* Copyright (c) 1996 by Internet Software Consortium. | 3 | /* Copyright (c) 1996 by Internet Software Consortium. |
4 | * | 4 | * |
@@ -22,14 +22,6 @@ | |||
22 | 22 | ||
23 | #ifndef HAVE_INET_NTOP | 23 | #ifndef HAVE_INET_NTOP |
24 | 24 | ||
25 | #if defined(LIBC_SCCS) && !defined(lint) | ||
26 | #if 0 | ||
27 | static char rcsid[] = "$From: inet_ntop.c,v 8.7 1996/08/05 08:41:18 vixie Exp $"; | ||
28 | #else | ||
29 | static char rcsid[] = "$OpenBSD: inet_ntop.c,v 1.5 2002/08/23 16:27:31 itojun Exp $"; | ||
30 | #endif | ||
31 | #endif /* LIBC_SCCS and not lint */ | ||
32 | |||
33 | #include <sys/param.h> | 25 | #include <sys/param.h> |
34 | #include <sys/types.h> | 26 | #include <sys/types.h> |
35 | #include <sys/socket.h> | 27 | #include <sys/socket.h> |
@@ -65,11 +57,7 @@ static const char *inet_ntop6(const u_char *src, char *dst, size_t size); | |||
65 | * Paul Vixie, 1996. | 57 | * Paul Vixie, 1996. |
66 | */ | 58 | */ |
67 | const char * | 59 | const char * |
68 | inet_ntop(af, src, dst, size) | 60 | inet_ntop(int af, const void *src, char *dst, size_t size) |
69 | int af; | ||
70 | const void *src; | ||
71 | char *dst; | ||
72 | size_t size; | ||
73 | { | 61 | { |
74 | switch (af) { | 62 | switch (af) { |
75 | case AF_INET: | 63 | case AF_INET: |
@@ -95,10 +83,7 @@ inet_ntop(af, src, dst, size) | |||
95 | * Paul Vixie, 1996. | 83 | * Paul Vixie, 1996. |
96 | */ | 84 | */ |
97 | static const char * | 85 | static const char * |
98 | inet_ntop4(src, dst, size) | 86 | inet_ntop4(const u_char *src, char *dst, size_t size) |
99 | const u_char *src; | ||
100 | char *dst; | ||
101 | size_t size; | ||
102 | { | 87 | { |
103 | static const char fmt[] = "%u.%u.%u.%u"; | 88 | static const char fmt[] = "%u.%u.%u.%u"; |
104 | char tmp[sizeof "255.255.255.255"]; | 89 | char tmp[sizeof "255.255.255.255"]; |
@@ -120,10 +105,7 @@ inet_ntop4(src, dst, size) | |||
120 | * Paul Vixie, 1996. | 105 | * Paul Vixie, 1996. |
121 | */ | 106 | */ |
122 | static const char * | 107 | static const char * |
123 | inet_ntop6(src, dst, size) | 108 | inet_ntop6(const u_char *src, char *dst, size_t size) |
124 | const u_char *src; | ||
125 | char *dst; | ||
126 | size_t size; | ||
127 | { | 109 | { |
128 | /* | 110 | /* |
129 | * Note that int32_t and int16_t need only be "at least" large enough | 111 | * Note that int32_t and int16_t need only be "at least" large enough |