summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2017-10-11 05:07:37 +0000
committercy <cy@FreeBSD.org>2017-10-11 05:07:37 +0000
commitd3d1cc5fd05c5d83ea09461d89f054489a89c266 (patch)
treece0ed8646a6f25c2dcb658ba7ccdb58a88c3e485 /lib
parent2b59cfc966d9c438aa1846cbdee247137b136ac0 (diff)
downloadFreeBSD-src-d3d1cc5fd05c5d83ea09461d89f054489a89c266.zip
FreeBSD-src-d3d1cc5fd05c5d83ea09461d89f054489a89c266.tar.gz
MFC r324249, 324260, and 324277
Clarify the wording describing the stayopen flag and style fixes.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/net/gethostbyname.317
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3
index 35f031b..c01bca5 100644
--- a/lib/libc/net/gethostbyname.3
+++ b/lib/libc/net/gethostbyname.3
@@ -28,7 +28,7 @@
.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
.\" $FreeBSD$
.\"
-.Dd May 12, 2006
+.Dd October 4, 2017
.Dt GETHOSTBYNAME 3
.Os
.Sh NAME
@@ -189,19 +189,20 @@ function
may be used to request the use of a connected
.Tn TCP
socket for queries.
+Queries will by default use
+.Tn UDP
+datagrams.
If the
.Fa stayopen
-flag is non-zero,
-this sets the option to send all queries to the name server using
+flag is non-zero, a
.Tn TCP
-and to retain the connection after each call to
+connection to the name server will be used.
+It will remain open after calls to
.Fn gethostbyname ,
.Fn gethostbyname2
or
-.Fn gethostbyaddr .
-Otherwise, queries are performed using
-.Tn UDP
-datagrams.
+.Fn gethostbyaddr
+have completed.
.Pp
The
.Fn endhostent
OpenPOWER on IntegriCloud