diff options
author | millert <> | 2003-06-30 16:54:53 +0000 |
---|---|---|
committer | millert <> | 2003-06-30 16:54:53 +0000 |
commit | f4f8abf224b31750266714dcc32a8b8877a5cab8 (patch) | |
tree | 0440bb2c9e8ff04144ced2700f7cf38657714527 | |
parent | 105123162e733d638357b0ba273c2e29f8409a41 (diff) | |
download | openbsd-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.3 | 36 |
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 |
63 | The | 63 | The |
64 | .Fn gethostbyname | 64 | .Fn gethostbyname , |
65 | .Fn gethostbyname2 | ||
65 | and | 66 | and |
66 | .Fn gethostbyaddr | 67 | .Fn gethostbyaddr |
67 | functions each return a pointer to an object with the following structure | 68 | functions 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 |
94 | Official name of the host. | 95 | Official name of the host. |
95 | .It Fa h_aliases | 96 | .It Fa h_aliases |
96 | A zero-terminated array of alternate names for the host. | 97 | A NULL-terminated array of alternate names for the host. |
97 | .It Fa h_addrtype | 98 | .It Fa h_addrtype |
98 | The type of address being returned. | 99 | The type of address being returned. |
99 | .It Fa h_length | 100 | .It Fa h_length |
@@ -119,8 +120,10 @@ and | |||
119 | is an advanced form of | 120 | is an advanced form of |
120 | .Fn gethostbyname | 121 | .Fn gethostbyname |
121 | which allows lookups in address families other than | 122 | which allows lookups in address families other than |
122 | .Dv AF_INET , | 123 | .Dv AF_INET . |
123 | for example | 124 | Currently, the only supported address family besides |
125 | .Dv AF_INET | ||
126 | is | ||
124 | .Dv AF_INET6 . | 127 | .Dv AF_INET6 . |
125 | .Pp | 128 | .Pp |
126 | The | 129 | The |
@@ -170,6 +173,19 @@ The contents of the error message is the same as that returned by | |||
170 | .Fn hstrerror | 173 | .Fn hstrerror |
171 | with argument | 174 | with argument |
172 | .Fa h_errno . | 175 | .Fa h_errno . |
176 | .Sh ENVIRONMENT | ||
177 | .Bl -tag -width HOSTALIASES | ||
178 | .It HOSTALIASES | ||
179 | A file containing local host aliases. | ||
180 | See | ||
181 | .Xr hostname 7 | ||
182 | for more information. | ||
183 | .It RES_OPTIONS | ||
184 | A list of options to override the resolver's internal defaults. | ||
185 | See | ||
186 | .Xr resolver 3 | ||
187 | for 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. | |||
209 | Another type of request to the name server using this domain name | 225 | Another type of request to the name server using this domain name |
210 | will result in an answer; | 226 | will result in an answer; |
211 | for example, a mail-forwarder may be registered for this domain. | 227 | for example, a mail-forwarder may be registered for this domain. |
228 | .It Dv NETDB_INTERNAL | ||
229 | An internal error occurred. | ||
230 | This may occurs when an address family other than | ||
231 | .It Dv AF_INET | ||
232 | or | ||
233 | .It Dv AF_INET6 | ||
234 | is specified or when a resource is unable to be allocated. | ||
235 | the | ||
236 | .It Dv NETDB_SUCCESS | ||
237 | The function completed successfully. | ||
212 | .El | 238 | .El |
213 | .Sh SEE ALSO | 239 | .Sh SEE ALSO |
214 | .Xr getaddrinfo 3 , | 240 | .Xr getaddrinfo 3 , |