summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/gethostbyname.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net/gethostbyname.3')
-rw-r--r--src/lib/libc/net/gethostbyname.323
1 files changed, 8 insertions, 15 deletions
diff --git a/src/lib/libc/net/gethostbyname.3 b/src/lib/libc/net/gethostbyname.3
index f1353288c5..94a848eecc 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.15 2000/04/18 03:01:31 aaron Exp $ 1.\" $OpenBSD: gethostbyname.3,v 1.16 2000/12/24 00:30:56 aaron 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.
@@ -68,10 +68,8 @@ The
68.Fn gethostbyname 68.Fn gethostbyname
69and 69and
70.Fn gethostbyaddr 70.Fn gethostbyaddr
71functions 71functions each return a pointer to an object with the following structure
72each return a pointer to an object with the 72describing an internet host referenced by name or by address, respectively.
73following structure describing an internet host
74referenced by name or by address, respectively.
75This structure contains either information obtained from the name server (i.e., 73This structure contains either information obtained from the name server (i.e.,
76.Xr resolver 3 74.Xr resolver 3
77and 75and
@@ -140,8 +138,7 @@ The only address family currently supported is
140.Pp 138.Pp
141The 139The
142.Fn sethostent 140.Fn sethostent
143function 141function may be used to request the use of a connected
144may be used to request the use of a connected
145.Tn TCP 142.Tn TCP
146socket for queries. 143socket for queries.
147If the 144If the
@@ -159,8 +156,7 @@ datagrams.
159.Pp 156.Pp
160The 157The
161.Fn endhostent 158.Fn endhostent
162function 159function closes the
163closes the
164.Tn TCP 160.Tn TCP
165connection. 161connection.
166.Pp 162.Pp
@@ -239,13 +235,11 @@ re-opening the file if necessary.
239.Pp 235.Pp
240The 236The
241.Fn sethostent 237.Fn sethostent
242function 238function opens and/or rewinds the file
243opens and/or rewinds the file
244.Pa /etc/hosts . 239.Pa /etc/hosts .
245If the 240If the
246.Fa stayopen 241.Fa stayopen
247argument is non-zero, 242argument is non-zero, the file will not be closed after each call to
248the file will not be closed after each call to
249.Fn gethostbyname , 243.Fn gethostbyname ,
250.Fn gethostbyname2 , 244.Fn gethostbyname2 ,
251or 245or
@@ -253,8 +247,7 @@ or
253.Pp 247.Pp
254The 248The
255.Fn endhostent 249.Fn endhostent
256function 250function closes the file.
257closes the file.
258.Sh HISTORY 251.Sh HISTORY
259The 252The
260.Fn herror 253.Fn herror