Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/net Correct API for the gethostby{name, addr}
details: https://anonhg.NetBSD.org/src/rev/b653775a2dd9
branches: trunk
changeset: 335360:b653775a2dd9
user: christos <christos%NetBSD.org@localhost>
date: Sun Jan 04 16:06:29 2015 +0000
description:
Correct API for the gethostby{name,addr}
diffstat:
lib/libc/net/nsdispatch.3 | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diffs (60 lines):
diff -r 302bf46992f6 -r b653775a2dd9 lib/libc/net/nsdispatch.3
--- a/lib/libc/net/nsdispatch.3 Sun Jan 04 15:59:32 2015 +0000
+++ b/lib/libc/net/nsdispatch.3 Sun Jan 04 16:06:29 2015 +0000
@@ -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 @@
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 @@
.Ft "int af"
.Pp
Returns
-.Ft "struct hostent *"
+.Ft "struct getnamaddr *"
via
.Ft "void *cbrv" .
.It Sy gethostbyname
@@ -460,10 +458,22 @@
.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
Home |
Main Index |
Thread Index |
Old Index