summaryrefslogtreecommitdiff
path: root/src/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc')
-rw-r--r--src/lib/libc/net/gethostbyname.326
1 files changed, 15 insertions, 11 deletions
diff --git a/src/lib/libc/net/gethostbyname.3 b/src/lib/libc/net/gethostbyname.3
index 1394fa3467..9df758af23 100644
--- a/src/lib/libc/net/gethostbyname.3
+++ b/src/lib/libc/net/gethostbyname.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: gethostbyname.3,v 1.4 1997/03/13 19:07:23 downsj Exp $ 1.\" $OpenBSD: gethostbyname.3,v 1.5 1997/04/26 22:06:38 michaels Exp $
2.\" 2.\"
3.\" Copyright (c) 1983, 1987, 1991, 1993 3.\" Copyright (c) 1983, 1987, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -59,7 +59,7 @@
59.Ft void 59.Ft void
60.Fn endhostent void 60.Fn endhostent void
61.Ft void 61.Ft void
62.Fn herror "char *string" 62.Fn herror "const char *string"
63.Sh DESCRIPTION 63.Sh DESCRIPTION
64The 64The
65.Fn gethostbyname 65.Fn gethostbyname
@@ -153,6 +153,19 @@ function
153closes the 153closes the
154.Tn TCP 154.Tn TCP
155connection. 155connection.
156.Pp
157The
158.Fn herror
159function prints an error message describing the failure. If it's argument
160.Fa string
161is
162.Pf non Dv -NULL ,
163it is prepended to the message string and seperated from it by a colon
164and a space. The error message is printed with a trailing newline.
165The contents of the error message is the same as that returned by
166.Fn hstrerror
167with arrgument
168.Fa h_errno .
156.Sh FILES 169.Sh FILES
157.Bl -tag -width /etc/hosts -compact 170.Bl -tag -width /etc/hosts -compact
158.It Pa /etc/hosts 171.It Pa /etc/hosts
@@ -168,15 +181,6 @@ The external integer
168.Va h_errno 181.Va h_errno
169may then be checked to see whether this is a temporary failure 182may then be checked to see whether this is a temporary failure
170or an invalid or unknown host. 183or an invalid or unknown host.
171The routine
172.Fn herror
173can be used to print an error message describing the failure.
174If its argument
175.Fa string
176is
177.Pf non Dv -NULL ,
178it is printed, followed by a colon and a space.
179The error message is printed with a trailing newline.
180.Pp 184.Pp
181The variable 185The variable
182.Va h_errno 186.Va h_errno