Module Name:    src
Committed By:   christos
Date:           Sun Jan  4 16:06:29 UTC 2015

Modified Files:
        src/lib/libc/net: nsdispatch.3

Log Message:
Correct API for the gethostby{name,addr}


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libc/net/nsdispatch.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/net/nsdispatch.3
diff -u src/lib/libc/net/nsdispatch.3:1.31 src/lib/libc/net/nsdispatch.3:1.32
--- src/lib/libc/net/nsdispatch.3:1.31	Thu Apr 28 12:16:23 2011
+++ src/lib/libc/net/nsdispatch.3	Sun Jan  4 11:06:29 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: nsdispatch.3,v 1.31 2011/04/28 16:16:23 wiz Exp $
+.\"	$NetBSD: nsdispatch.3,v 1.32 2015/01/04 16:06:29 christos Exp $
 .\"
 .\" Copyright (c) 1997, 1998, 1999, 2004, 2005, 2008
 .\" The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 8, 2008
+.Dd January 4, 2015
 .Dt NSDISPATCH 3
 .Os
 .Sh NAME
@@ -434,8 +434,6 @@ The callback function names and
 organization for various standard database callback functions are:
 .\"
 .Ss Methods for hosts database
-.Sy NOTE:
-The method APIs for this database will be changing in the near future.
 .Bl -tag -width 3n
 .It Sy getaddrinfo
 .Ft "char *name" ,
@@ -451,7 +449,7 @@ via
 .Ft "int af"
 .Pp
 Returns
-.Ft "struct hostent *"
+.Ft "struct getnamaddr *"
 via
 .Ft "void *cbrv" .
 .It Sy gethostbyname
@@ -460,10 +458,22 @@ via
 .Ft "int af"
 .Pp
 Returns
-.Ft "struct hostent *"
+.Ft "struct getnamaddr *"
 via
 .Ft "void *cbrv" .
 .El
+.Pp
+The
+.Ft "struct getnamaddr"
+is defined internally in libc as:
+.Bd -literal
+struct getnamaddr { 
+        struct hostent *hp;
+        char *buf; 
+        size_t buflen;
+        int *he; 
+}; 
+.Ed
 .\"
 .Ss Methods for group and group_compat databases
 .Bl -tag -width 3n

Reply via email to