summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormillert <>2003-06-30 16:54:53 +0000
committermillert <>2003-06-30 16:54:53 +0000
commitf4f8abf224b31750266714dcc32a8b8877a5cab8 (patch)
tree0440bb2c9e8ff04144ced2700f7cf38657714527
parent105123162e733d638357b0ba273c2e29f8409a41 (diff)
downloadopenbsd-f4f8abf224b31750266714dcc32a8b8877a5cab8.tar.gz
openbsd-f4f8abf224b31750266714dcc32a8b8877a5cab8.tar.bz2
openbsd-f4f8abf224b31750266714dcc32a8b8877a5cab8.zip
Mention environment variables used + some other minor fixes.
jmc@ and henning@ OK
-rw-r--r--src/lib/libc/net/gethostbyname.336
1 files changed, 31 insertions, 5 deletions
diff --git a/src/lib/libc/net/gethostbyname.3 b/src/lib/libc/net/gethostbyname.3
index e913871b19..1a627f403b 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.19 2003/06/02 20:18:35 millert Exp $ 1.\" $OpenBSD: gethostbyname.3,v 1.20 2003/06/30 16:54:53 millert 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.
@@ -61,7 +61,8 @@
61.Fn hstrerror "int err" 61.Fn hstrerror "int err"
62.Sh DESCRIPTION 62.Sh DESCRIPTION
63The 63The
64.Fn gethostbyname 64.Fn gethostbyname ,
65.Fn gethostbyname2
65and 66and
66.Fn gethostbyaddr 67.Fn gethostbyaddr
67functions each return a pointer to an object with the following structure 68functions each return a pointer to an object with the following structure
@@ -93,7 +94,7 @@ The members of this structure are:
93.It Fa h_name 94.It Fa h_name
94Official name of the host. 95Official name of the host.
95.It Fa h_aliases 96.It Fa h_aliases
96A zero-terminated array of alternate names for the host. 97A NULL-terminated array of alternate names for the host.
97.It Fa h_addrtype 98.It Fa h_addrtype
98The type of address being returned. 99The type of address being returned.
99.It Fa h_length 100.It Fa h_length
@@ -119,8 +120,10 @@ and
119is an advanced form of 120is an advanced form of
120.Fn gethostbyname 121.Fn gethostbyname
121which allows lookups in address families other than 122which allows lookups in address families other than
122.Dv AF_INET , 123.Dv AF_INET .
123for example 124Currently, the only supported address family besides
125.Dv AF_INET
126is
124.Dv AF_INET6 . 127.Dv AF_INET6 .
125.Pp 128.Pp
126The 129The
@@ -170,6 +173,19 @@ The contents of the error message is the same as that returned by
170.Fn hstrerror 173.Fn hstrerror
171with argument 174with argument
172.Fa h_errno . 175.Fa h_errno .
176.Sh ENVIRONMENT
177.Bl -tag -width HOSTALIASES
178.It HOSTALIASES
179A file containing local host aliases.
180See
181.Xr hostname 7
182for more information.
183.It RES_OPTIONS
184A list of options to override the resolver's internal defaults.
185See
186.Xr resolver 3
187for more information.
188.El
173.Sh FILES 189.Sh FILES
174.Bl -tag -width /etc/resolv.conf -compact 190.Bl -tag -width /etc/resolv.conf -compact
175.It Pa /etc/hosts 191.It Pa /etc/hosts
@@ -209,6 +225,16 @@ associated with this name.
209Another type of request to the name server using this domain name 225Another type of request to the name server using this domain name
210will result in an answer; 226will result in an answer;
211for example, a mail-forwarder may be registered for this domain. 227for example, a mail-forwarder may be registered for this domain.
228.It Dv NETDB_INTERNAL
229An internal error occurred.
230This may occurs when an address family other than
231.It Dv AF_INET
232or
233.It Dv AF_INET6
234is specified or when a resource is unable to be allocated.
235the
236.It Dv NETDB_SUCCESS
237The function completed successfully.
212.El 238.El
213.Sh SEE ALSO 239.Sh SEE ALSO
214.Xr getaddrinfo 3 , 240.Xr getaddrinfo 3 ,