]> andersk Git - openssh.git/blobdiff - openbsd-compat/inet_ntop.c
- halex@cvs.openbsd.org 2009/11/22 13:18:00
[openssh.git] / openbsd-compat / inet_ntop.c
index 7031625b4441b98c9184e34c4e0101018fadd7d8..e7ca4b7f8bebe0f7f3be13de5917e085b62a5383 100644 (file)
@@ -1,6 +1,4 @@
-/* OPENBSD ORIGINAL: lib/libc/net/inet_ntop.c */
-
-/*     $OpenBSD: inet_ntop.c,v 1.5 2002/08/23 16:27:31 itojun Exp $    */
+/*     $OpenBSD: inet_ntop.c,v 1.7 2005/08/06 20:30:03 espie Exp $     */
 
 /* Copyright (c) 1996 by Internet Software Consortium.
  *
  * SOFTWARE.
  */
 
+/* OPENBSD ORIGINAL: lib/libc/net/inet_ntop.c */
+
 #include "includes.h"
 
 #ifndef HAVE_INET_NTOP
 
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char rcsid[] = "$From: inet_ntop.c,v 8.7 1996/08/05 08:41:18 vixie Exp $";
-#else
-static char rcsid[] = "$OpenBSD: inet_ntop.c,v 1.5 2002/08/23 16:27:31 itojun Exp $";
-#endif
-#endif /* LIBC_SCCS and not lint */
-
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#ifndef HAVE_CYGWIN
 #include <arpa/nameser.h>
-#endif
 #include <string.h>
 #include <errno.h>
 #include <stdio.h>
@@ -67,11 +57,7 @@ static const char *inet_ntop6(const u_char *src, char *dst, size_t size);
  *     Paul Vixie, 1996.
  */
 const char *
-inet_ntop(af, src, dst, size)
-       int af;
-       const void *src;
-       char *dst;
-       size_t size;
+inet_ntop(int af, const void *src, char *dst, size_t size)
 {
        switch (af) {
        case AF_INET:
@@ -97,10 +83,7 @@ inet_ntop(af, src, dst, size)
  *     Paul Vixie, 1996.
  */
 static const char *
-inet_ntop4(src, dst, size)
-       const u_char *src;
-       char *dst;
-       size_t size;
+inet_ntop4(const u_char *src, char *dst, size_t size)
 {
        static const char fmt[] = "%u.%u.%u.%u";
        char tmp[sizeof "255.255.255.255"];
@@ -122,10 +105,7 @@ inet_ntop4(src, dst, size)
  *     Paul Vixie, 1996.
  */
 static const char *
-inet_ntop6(src, dst, size)
-       const u_char *src;
-       char *dst;
-       size_t size;
+inet_ntop6(const u_char *src, char *dst, size_t size)
 {
        /*
         * Note that int32_t and int16_t need only be "at least" large enough
This page took 0.036997 seconds and 4 git commands to generate.