summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorlawrance <lawrance@FreeBSD.org>2006-11-04 09:42:22 +0000
committerlawrance <lawrance@FreeBSD.org>2006-11-04 09:42:22 +0000
commit20a2ef67d2c307e970657ffbb38b485f27d7a331 (patch)
tree4c7eef5d972524a326285db5d5bc7de060c35bfe /lib
parentb5fdd84df7c553347ca8e78f16a5c3189629b91c (diff)
downloadFreeBSD-src-20a2ef67d2c307e970657ffbb38b485f27d7a331.zip
FreeBSD-src-20a2ef67d2c307e970657ffbb38b485f27d7a331.tar.gz
Document return values for res_query and res_search.
h_errno is not an extern int, just a macro providing an integer lvalue. PR: doc/50573 Submitted by: Ronald F.Guilmette <rfg@monkeys.com> Reviewed by: trhodes MFC after: 3 days
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/net/gethostbyname.34
-rw-r--r--lib/libc/net/resolver.316
2 files changed, 17 insertions, 3 deletions
diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3
index afd01b0..ef7d55a 100644
--- a/lib/libc/net/gethostbyname.3
+++ b/lib/libc/net/gethostbyname.3
@@ -49,7 +49,7 @@
.Lb libc
.Sh SYNOPSIS
.In netdb.h
-.Vt extern int h_errno ;
+.Vt int h_errno ;
.Ft struct hostent *
.Fn gethostbyname "const char *name"
.Ft struct hostent *
@@ -261,7 +261,7 @@ and
is indicated by return of a
.Dv NULL
pointer.
-The external integer
+The integer
.Va h_errno
may then be checked to see whether this is a temporary failure
or an invalid or unknown host.
diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3
index 28392fb..f21f11a 100644
--- a/lib/libc/net/resolver.3
+++ b/lib/libc/net/resolver.3
@@ -32,7 +32,7 @@
.\" @(#)resolver.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd June 4, 1993
+.Dd November 4, 2006
.Dt RESOLVER 3
.Os
.Sh NAME
@@ -410,6 +410,20 @@ The
.Fn res_init
function will return 0 on success, or \-1 in a threaded program if
per-thread storage could not be allocated.
+.Pp
+The
+.Fn res_mkquery ,
+.Fn res_search ,
+and
+.Fn res_query
+functions return the size of the response on success, or \-1 if an
+error occurs.
+The integer
+.Vt h_errno
+may be checked to determine the reason for error.
+See
+.Xr gethostbyname 3
+for more information.
.Sh FILES
.Bl -tag -width /etc/resolv.conf
.It Pa /etc/resolv.conf
OpenPOWER on IntegriCloud