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.334
1 files changed, 17 insertions, 17 deletions
diff --git a/src/lib/libc/net/gethostbyname.3 b/src/lib/libc/net/gethostbyname.3
index a71048779b..4465fa5734 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.11 1999/05/21 18:18:09 deraadt Exp $ 1.\" $OpenBSD: gethostbyname.3,v 1.12 1999/07/05 04:40:59 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.
@@ -72,11 +72,11 @@ functions
72each return a pointer to an object with the 72each return a pointer to an object with the
73following structure describing an internet host 73following structure describing an internet host
74referenced by name or by address, respectively. 74referenced by name or by address, respectively.
75This structure contains either information obtained from the name server (ie. 75This structure contains either information obtained from the name server (i.e.,
76.Xr resolver 3 76.Xr resolver 3
77and 77and
78.Xr named 8 ), Ns 78.Xr named 8 ),
79broken-out fields from a line in 79broken-out fields from a line in
80.Pa /etc/hosts , 80.Pa /etc/hosts ,
81or database entries supplied by the 81or database entries supplied by the
82.Xr yp 8 82.Xr yp 8
@@ -99,13 +99,13 @@ The members of this structure are:
99.It Fa h_name 99.It Fa h_name
100Official name of the host. 100Official name of the host.
101.It Fa h_aliases 101.It Fa h_aliases
102A zero terminated array of alternate names for the host. 102A zero-terminated array of alternate names for the host.
103.It Fa h_addrtype 103.It Fa h_addrtype
104The type of address being returned. 104The type of address being returned.
105.It Fa h_length 105.It Fa h_length
106The length, in bytes, of the address. 106The length, in bytes, of the address.
107.It Fa h_addr_list 107.It Fa h_addr_list
108A zero terminated array of network addresses for the host. 108A zero-terminated array of network addresses for the host.
109Host addresses are returned in network byte order. 109Host addresses are returned in network byte order.
110.It Fa h_addr 110.It Fa h_addr
111The first address in 111The first address in
@@ -132,9 +132,9 @@ for example
132The 132The
133.Fn gethostbyaddr 133.Fn gethostbyaddr
134function will search for the specified address of length 134function will search for the specified address of length
135.Dv len 135.Fa len
136in the address family 136in the address family
137.Dv af . 137.Fa af .
138The only address family currently supported is 138The only address family currently supported is
139.Dv AF_INET . 139.Dv AF_INET .
140.Pp 140.Pp
@@ -149,7 +149,7 @@ If the
149flag is non-zero, 149flag is non-zero,
150this sets the option to send all queries to the name server using 150this sets the option to send all queries to the name server using
151.Tn TCP 151.Tn TCP
152and to retain the connection after each call to 152and to retain the connection after each call to
153.Fn gethostbyname 153.Fn gethostbyname
154or 154or
155.Fn gethostbyaddr . 155.Fn gethostbyaddr .
@@ -168,11 +168,11 @@ The
168.Fn herror 168.Fn herror
169function prints an error message describing the failure. If its argument 169function prints an error message describing the failure. If its argument
170.Fa string 170.Fa string
171is 171is non-null,
172.Pf non Dv -NULL ,
173it is prepended to the message string and separated from it by a colon 172it is prepended to the message string and separated from it by a colon
173.Pq Ql \&:
174and a space. The error message is printed with a trailing newline. 174and a space. The error message is printed with a trailing newline.
175The contents of the error message is the same as that returned by 175The contents of the error message is the same as that returned by
176.Fn hstrerror 176.Fn hstrerror
177with argument 177with argument
178.Fa h_errno . 178.Fa h_errno .
@@ -182,7 +182,7 @@ with argument
182.It Pa /etc/resolv.conf 182.It Pa /etc/resolv.conf
183.El 183.El
184.Sh DIAGNOSTICS 184.Sh DIAGNOSTICS
185Error return status from 185Error return status from
186.Fn gethostbyname , 186.Fn gethostbyname ,
187.Fn gethostbyname2 , 187.Fn gethostbyname2 ,
188and 188and
@@ -208,8 +208,8 @@ A retry at some later time may succeed.
208Some unexpected server failure was encountered. 208Some unexpected server failure was encountered.
209This is a non-recoverable error. 209This is a non-recoverable error.
210.It Dv NO_DATA 210.It Dv NO_DATA
211The requested name is valid but does not have an IP address; 211The requested name is valid but does not have an IP address;
212this is not a temporary error. 212this is not a temporary error.
213This means that the name is known to the name server but there is no address 213This means that the name is known to the name server but there is no address
214associated with this name. 214associated with this name.
215Another type of request to the name server using this domain name 215Another type of request to the name server using this domain name
@@ -254,7 +254,7 @@ closes the file.
254.Sh HISTORY 254.Sh HISTORY
255The 255The
256.Fn herror 256.Fn herror
257function appeared in 257function appeared in
258.Bx 4.3 . 258.Bx 4.3 .
259The 259The
260.Fn endhostent , 260.Fn endhostent ,
@@ -272,7 +272,7 @@ copied before any subsequent calls overwrite it.
272Only the Internet 272Only the Internet
273address formats are currently understood. 273address formats are currently understood.
274.Pp 274.Pp
275YP does not support any address families other than 275YP does not support any address families other than
276.Dv AF_INET 276.Dv AF_INET
277and uses 277and uses
278the traditional database format. 278the traditional database format.