]>
Commit | Line | Data |
---|---|---|
a1eaacb1 | 1 | '\" t |
fea681da MK |
2 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
3 | .\" | |
5fbde956 | 4 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
fea681da MK |
5 | .\" |
6 | .\" References consulted: | |
7 | .\" Linux libc source code | |
8 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
9 | .\" 386BSD man pages | |
10 | .\" Modified 1993-05-22, David Metcalfe | |
11 | .\" Modified 1993-07-25, Rik Faith (faith@cs.unc.edu) | |
12 | .\" Modified 1997-02-16, Andries Brouwer (aeb@cwi.nl) | |
13 | .\" Modified 1998-12-21, Andries Brouwer (aeb@cwi.nl) | |
14 | .\" Modified 2000-08-12, Andries Brouwer (aeb@cwi.nl) | |
15 | .\" Modified 2001-05-19, Andries Brouwer (aeb@cwi.nl) | |
16 | .\" Modified 2002-08-05, Michael Kerrisk | |
17 | .\" Modified 2004-10-31, Andries Brouwer | |
18 | .\" | |
4c1c5274 | 19 | .TH gethostbyname 3 (date) "Linux man-pages (unreleased)" |
fea681da | 20 | .SH NAME |
d302a9a9 | 21 | gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent, |
a039244f | 22 | h_errno, |
7fa78155 | 23 | herror, hstrerror, |
1dcf5e2f | 24 | gethostbyaddr_r, |
7fa78155 MK |
25 | gethostbyname2, gethostbyname2_r, gethostbyname_r, |
26 | gethostent_r \- get network host entry | |
42009080 AC |
27 | .SH LIBRARY |
28 | Standard C library | |
29 | .RI ( libc ", " \-lc ) | |
fea681da MK |
30 | .SH SYNOPSIS |
31 | .nf | |
32 | .B #include <netdb.h> | |
c6d039a3 | 33 | .P |
0bda2996 AC |
34 | .BI "void sethostent(int " stayopen ); |
35 | .B void endhostent(void); | |
c6d039a3 | 36 | .P |
dcd7bc53 | 37 | .B [[deprecated]] extern int h_errno; |
c6d039a3 | 38 | .P |
dcd7bc53 | 39 | .BI "[[deprecated]] struct hostent *gethostbyname(const char *" name ); |
c64cd13e AC |
40 | .BI "[[deprecated]] struct hostent *gethostbyaddr(const void " addr [. len ], |
41 | .BI " socklen_t " len ", int " type ); | |
c6d039a3 | 42 | .P |
dcd7bc53 AC |
43 | .BI "[[deprecated]] void herror(const char *" s ); |
44 | .BI "[[deprecated]] const char *hstrerror(int " err ); | |
c6d039a3 | 45 | .P |
80b50848 | 46 | /* System V/POSIX extension */ |
fea681da | 47 | .B struct hostent *gethostent(void); |
c6d039a3 | 48 | .P |
fea681da | 49 | /* GNU extensions */ |
dcd7bc53 | 50 | .B [[deprecated]] |
fea681da | 51 | .BI "struct hostent *gethostbyname2(const char *" name ", int " af ); |
c6d039a3 | 52 | .P |
938c8215 | 53 | .BI "int gethostent_r(struct hostent *restrict " ret , |
1eed67e7 | 54 | .BI " char " buf "[restrict ." buflen "], size_t " buflen , |
938c8215 AC |
55 | .BI " struct hostent **restrict " result , |
56 | .BI " int *restrict " h_errnop ); | |
c6d039a3 | 57 | .P |
dcd7bc53 | 58 | .B [[deprecated]] |
c64cd13e AC |
59 | .BI "int gethostbyaddr_r(const void " addr "[restrict ." len "], socklen_t " len , |
60 | .BI " int " type , | |
938c8215 | 61 | .BI " struct hostent *restrict " ret , |
1eed67e7 | 62 | .BI " char " buf "[restrict ." buflen "], size_t " buflen , |
938c8215 AC |
63 | .BI " struct hostent **restrict " result , |
64 | .BI " int *restrict " h_errnop ); | |
dcd7bc53 | 65 | .B [[deprecated]] |
938c8215 AC |
66 | .BI "int gethostbyname_r(const char *restrict " name , |
67 | .BI " struct hostent *restrict " ret , | |
1eed67e7 | 68 | .BI " char " buf "[restrict ." buflen "], size_t " buflen , |
938c8215 AC |
69 | .BI " struct hostent **restrict " result , |
70 | .BI " int *restrict " h_errnop ); | |
dcd7bc53 | 71 | .B [[deprecated]] |
938c8215 AC |
72 | .BI "int gethostbyname2_r(const char *restrict " name ", int " af, |
73 | .BI " struct hostent *restrict " ret , | |
1eed67e7 | 74 | .BI " char " buf "[restrict ." buflen "], size_t " buflen , |
938c8215 AC |
75 | .BI " struct hostent **restrict " result , |
76 | .BI " int *restrict " h_errnop ); | |
fea681da | 77 | .fi |
c6d039a3 | 78 | .P |
d39ad78f | 79 | .RS -4 |
cc4615cc MK |
80 | Feature Test Macro Requirements for glibc (see |
81 | .BR feature_test_macros (7)): | |
d39ad78f | 82 | .RE |
c6d039a3 | 83 | .P |
cc4615cc MK |
84 | .BR gethostbyname2 (), |
85 | .BR gethostent_r (), | |
dd0fee67 | 86 | .BR gethostbyaddr_r (), |
cc4615cc MK |
87 | .BR gethostbyname_r (), |
88 | .BR gethostbyname2_r (): | |
9d2adbae MK |
89 | .nf |
90 | Since glibc 2.19: | |
91 | _DEFAULT_SOURCE | |
75c018a1 | 92 | glibc up to and including 2.19: |
9d2adbae MK |
93 | _BSD_SOURCE || _SVID_SOURCE |
94 | .fi | |
c6d039a3 | 95 | .P |
f87ab547 | 96 | .BR herror (), |
6d80e8c7 | 97 | .BR hstrerror (): |
9d2adbae MK |
98 | .nf |
99 | Since glibc 2.19: | |
100 | _DEFAULT_SOURCE | |
75c018a1 | 101 | glibc 2.8 to glibc 2.19: |
9d2adbae MK |
102 | _BSD_SOURCE || _SVID_SOURCE |
103 | Before glibc 2.8: | |
104 | none | |
105 | .fi | |
c6d039a3 | 106 | .P |
930c9b6d | 107 | .BR h_errno : |
9d2adbae MK |
108 | .nf |
109 | Since glibc 2.19 | |
110 | _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L | |
75c018a1 | 111 | glibc 2.12 to glibc 2.19: |
9d2adbae MK |
112 | _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L |
113 | Before glibc 2.12: | |
114 | none | |
115 | .fi | |
fea681da | 116 | .SH DESCRIPTION |
aa966d08 | 117 | The |
7d0ec5b6 MK |
118 | .BR gethostbyname* (), |
119 | .BR gethostbyaddr* (), | |
120 | .BR herror (), | |
aa966d08 | 121 | and |
7d0ec5b6 | 122 | .BR hstrerror () |
aa966d08 | 123 | functions are obsolete. |
567e8a7f | 124 | Applications should use |
7d0ec5b6 MK |
125 | .BR getaddrinfo (3), |
126 | .BR getnameinfo (3), | |
567e8a7f | 127 | and |
7d0ec5b6 | 128 | .BR gai_strerror (3) |
567e8a7f | 129 | instead. |
c6d039a3 | 130 | .P |
fea681da | 131 | The |
0bda2996 AC |
132 | .BR sethostent () |
133 | function specifies, if \fIstayopen\fP is true (1), | |
134 | that a connected TCP socket should be used for the name server queries and | |
135 | that the connection should remain open during successive queries. | |
136 | Otherwise, name server queries will use UDP datagrams. | |
c6d039a3 | 137 | .P |
0bda2996 AC |
138 | The |
139 | .BR endhostent () | |
140 | function ends the use of a TCP connection for name | |
141 | server queries. | |
c6d039a3 | 142 | .P |
0bda2996 | 143 | The |
fea681da MK |
144 | .BR gethostbyname () |
145 | function returns a structure of type | |
146 | .I hostent | |
147 | for the given host | |
148 | .IR name . | |
149 | Here | |
150 | .I name | |
0b8a39ad MK |
151 | is either a hostname or an IPv4 address in standard dot notation (as for |
152 | .BR inet_addr (3)). | |
fea681da MK |
153 | If |
154 | .I name | |
0b8a39ad | 155 | is an IPv4 address, no lookup is performed and |
fea681da MK |
156 | .BR gethostbyname () |
157 | simply copies | |
158 | .I name | |
159 | into the | |
160 | .I h_name | |
161 | field and its | |
162 | .I struct in_addr | |
163 | equivalent into the | |
164 | .I h_addr_list[0] | |
165 | field of the returned | |
166 | .I hostent | |
167 | structure. | |
168 | If | |
169 | .I name | |
170 | doesn't end in a dot and the environment variable | |
171 | .B HOSTALIASES | |
172 | is set, the alias file pointed to by | |
173 | .B HOSTALIASES | |
174 | will first be searched for | |
175 | .I name | |
176 | (see | |
177 | .BR hostname (7) | |
178 | for the file format). | |
179 | The current domain and its parents are searched unless \fIname\fP | |
180 | ends in a dot. | |
c6d039a3 | 181 | .P |
60a90ecd MK |
182 | The |
183 | .BR gethostbyaddr () | |
184 | function returns a structure of type \fIhostent\fP | |
fea681da | 185 | for the given host address \fIaddr\fP of length \fIlen\fP and address type |
c13182ef MK |
186 | \fItype\fP. |
187 | Valid address types are | |
fea681da MK |
188 | .B AF_INET |
189 | and | |
1ae6b2c7 | 190 | .B AF_INET6 |
742694e9 MK |
191 | (defined in |
192 | .IR <sys/socket.h> ). | |
fea681da | 193 | The host address argument is a pointer to a struct of a type depending |
89f9f5b2 | 194 | on the address type, for example a \fIstruct in_addr *\fP (probably |
988db661 | 195 | obtained via a call to |
d9c1ae64 | 196 | .BR inet_addr (3)) |
2f0af33b MK |
197 | for address type |
198 | .BR AF_INET . | |
c6d039a3 | 199 | .P |
60a90ecd MK |
200 | The (obsolete) |
201 | .BR herror () | |
202 | function prints the error message associated | |
ce2801d0 | 203 | with the current value of \fIh_errno\fP on \fIstderr\fP. |
c6d039a3 | 204 | .P |
60a90ecd MK |
205 | The (obsolete) |
206 | .BR hstrerror () | |
207 | function takes an error number | |
fea681da | 208 | (typically \fIh_errno\fP) and returns the corresponding message string. |
c6d039a3 | 209 | .P |
60a90ecd MK |
210 | The domain name queries carried out by |
211 | .BR gethostbyname () | |
212 | and | |
213 | .BR gethostbyaddr () | |
923d125a | 214 | rely on the Name Service Switch |
0fe4c79a | 215 | .RB ( nsswitch.conf (5)) |
923d125a CD |
216 | configured sources or a local name server |
217 | .RB ( named (8)). | |
81d6e51d | 218 | The default action is to query the Name Service Switch |
3c320453 | 219 | .RB ( nsswitch.conf (5)) |
923d125a | 220 | configured sources, failing that, a local name server |
0fe4c79a | 221 | .RB ( named (8)). |
787dd4ad | 222 | .\" |
923d125a CD |
223 | .SS Historical |
224 | The | |
225 | .BR nsswitch.conf (5) | |
226 | file is the modern way of controlling the order of host lookups. | |
c6d039a3 | 227 | .P |
923d125a CD |
228 | In glibc 2.4 and earlier, the |
229 | .I order | |
230 | keyword was used to control the order of host lookups as defined in | |
1ae6b2c7 | 231 | .I /etc/host.conf |
beb9356f | 232 | .RB ( host.conf (5)). |
c6d039a3 | 233 | .P |
fea681da | 234 | The \fIhostent\fP structure is defined in \fI<netdb.h>\fP as follows: |
c6d039a3 | 235 | .P |
a08ea57c | 236 | .in +4n |
b8302363 | 237 | .EX |
fea681da | 238 | struct hostent { |
b9f02710 MK |
239 | char *h_name; /* official name of host */ |
240 | char **h_aliases; /* alias list */ | |
241 | int h_addrtype; /* host address type */ | |
242 | int h_length; /* length of address */ | |
243 | char **h_addr_list; /* list of addresses */ | |
fea681da | 244 | } |
b9f02710 | 245 | #define h_addr h_addr_list[0] /* for backward compatibility */ |
b8302363 | 246 | .EE |
a08ea57c | 247 | .in |
c6d039a3 | 248 | .P |
fea681da MK |
249 | The members of the \fIhostent\fP structure are: |
250 | .TP | |
251 | .I h_name | |
252 | The official name of the host. | |
253 | .TP | |
254 | .I h_aliases | |
b437fdd9 | 255 | An array of alternative names for the host, terminated by a null pointer. |
fea681da MK |
256 | .TP |
257 | .I h_addrtype | |
258 | The type of address; always | |
259 | .B AF_INET | |
260 | or | |
261 | .B AF_INET6 | |
262 | at present. | |
263 | .TP | |
264 | .I h_length | |
265 | The length of the address in bytes. | |
266 | .TP | |
267 | .I h_addr_list | |
28d88c17 | 268 | An array of pointers to network addresses for the host (in network byte |
b437fdd9 | 269 | order), terminated by a null pointer. |
fea681da MK |
270 | .TP |
271 | .I h_addr | |
272 | The first address in \fIh_addr_list\fP for backward compatibility. | |
47297adb | 273 | .SH RETURN VALUE |
fea681da MK |
274 | The |
275 | .BR gethostbyname () | |
276 | and | |
63aa9df0 | 277 | .BR gethostbyaddr () |
fea681da MK |
278 | functions return the |
279 | .I hostent | |
b437fdd9 | 280 | structure or a null pointer if an error occurs. |
c13182ef | 281 | On error, the |
fea681da MK |
282 | .I h_errno |
283 | variable holds an error number. | |
284 | When non-NULL, the return value may point at static data, see the notes below. | |
285 | .SH ERRORS | |
286 | The variable \fIh_errno\fP can have the following values: | |
287 | .TP | |
288 | .B HOST_NOT_FOUND | |
289 | The specified host is unknown. | |
290 | .TP | |
1ae6b2c7 | 291 | .B NO_DATA |
fea681da | 292 | The requested name is valid but does not have an IP address. |
ae9b41ac MK |
293 | Another type of request to the name server for this domain |
294 | may return an answer. | |
491e87a5 | 295 | The constant |
1ae6b2c7 | 296 | .B NO_ADDRESS |
491e87a5 MK |
297 | is a synonym for |
298 | .BR NO_DATA . | |
fea681da MK |
299 | .TP |
300 | .B NO_RECOVERY | |
b28f6e56 | 301 | A nonrecoverable name server error occurred. |
fea681da MK |
302 | .TP |
303 | .B TRY_AGAIN | |
c13182ef MK |
304 | A temporary error occurred on an authoritative name server. |
305 | Try again later. | |
fea681da MK |
306 | .SH FILES |
307 | .TP | |
308 | .I /etc/host.conf | |
309 | resolver configuration file | |
310 | .TP | |
311 | .I /etc/hosts | |
312 | host database file | |
24268a72 MK |
313 | .TP |
314 | .I /etc/nsswitch.conf | |
315 | name service switch configuration | |
c7bd50f1 ZL |
316 | .SH ATTRIBUTES |
317 | For an explanation of the terms used in this section, see | |
318 | .BR attributes (7). | |
319 | .TS | |
320 | allbox; | |
c466875e | 321 | lb lb lbx |
c7bd50f1 ZL |
322 | l l l. |
323 | Interface Attribute Value | |
324 | T{ | |
9e54434e BR |
325 | .na |
326 | .nh | |
c7bd50f1 ZL |
327 | .BR gethostbyname () |
328 | T} Thread safety T{ | |
9e54434e BR |
329 | .na |
330 | .nh | |
c7bd50f1 | 331 | MT-Unsafe race:hostbyname env |
c7bd50f1 ZL |
332 | locale |
333 | T} | |
334 | T{ | |
9e54434e BR |
335 | .na |
336 | .nh | |
c7bd50f1 ZL |
337 | .BR gethostbyaddr () |
338 | T} Thread safety T{ | |
9e54434e BR |
339 | .na |
340 | .nh | |
c7bd50f1 | 341 | MT-Unsafe race:hostbyaddr env |
c7bd50f1 ZL |
342 | locale |
343 | T} | |
344 | T{ | |
9e54434e BR |
345 | .na |
346 | .nh | |
c7bd50f1 | 347 | .BR sethostent (), |
c7bd50f1 | 348 | .BR endhostent (), |
c7bd50f1 ZL |
349 | .BR gethostent_r () |
350 | T} Thread safety T{ | |
9e54434e BR |
351 | .na |
352 | .nh | |
c7bd50f1 | 353 | MT-Unsafe race:hostent env |
c7bd50f1 ZL |
354 | locale |
355 | T} | |
356 | T{ | |
9e54434e BR |
357 | .na |
358 | .nh | |
c7bd50f1 | 359 | .BR herror (), |
c7bd50f1 ZL |
360 | .BR hstrerror () |
361 | T} Thread safety MT-Safe | |
362 | T{ | |
9e54434e BR |
363 | .na |
364 | .nh | |
c7bd50f1 ZL |
365 | .BR gethostent () |
366 | T} Thread safety T{ | |
9e54434e BR |
367 | .na |
368 | .nh | |
c7bd50f1 | 369 | MT-Unsafe race:hostent |
c7bd50f1 ZL |
370 | race:hostentbuf env locale |
371 | T} | |
372 | T{ | |
9e54434e BR |
373 | .na |
374 | .nh | |
c7bd50f1 ZL |
375 | .BR gethostbyname2 () |
376 | T} Thread safety T{ | |
9e54434e BR |
377 | .na |
378 | .nh | |
c7bd50f1 | 379 | MT-Unsafe race:hostbyname2 |
c7bd50f1 ZL |
380 | env locale |
381 | T} | |
382 | T{ | |
9e54434e BR |
383 | .na |
384 | .nh | |
c7bd50f1 ZL |
385 | .BR gethostbyaddr_r (), |
386 | .BR gethostbyname_r (), | |
387 | .BR gethostbyname2_r () | |
388 | T} Thread safety MT-Safe env locale | |
389 | .TE | |
c6d039a3 | 390 | .P |
c7bd50f1 ZL |
391 | In the above table, |
392 | .I hostent | |
393 | in | |
394 | .I race:hostent | |
395 | signifies that if any of the functions | |
a39dc3ee MK |
396 | .BR sethostent (), |
397 | .BR gethostent (), | |
398 | .BR gethostent_r (), | |
c7bd50f1 | 399 | or |
18a46670 | 400 | .BR \%endhostent () |
c7bd50f1 ZL |
401 | are used in parallel in different threads of a program, |
402 | then data races could occur. | |
3113c7f3 | 403 | .SH STANDARDS |
4131356c AC |
404 | .TP |
405 | .BR sethostent () | |
406 | .TQ | |
407 | .BR endhostent () | |
408 | .TQ | |
409 | .BR gethostent () | |
410 | POSIX.1-2008. | |
411 | .TP | |
412 | .BR gethostent_r () | |
413 | GNU. | |
414 | .TP | |
415 | Others: | |
416 | None. | |
417 | .SH HISTORY | |
418 | .TP | |
419 | .BR sethostent () | |
420 | .TQ | |
421 | .BR endhostent () | |
422 | .TQ | |
423 | .BR gethostent () | |
424 | POSIX.1-2001. | |
425 | .TP | |
426 | .BR gethostbyname () | |
427 | .TQ | |
428 | .BR gethostbyaddr () | |
429 | .TQ | |
1ae6b2c7 | 430 | .I h_errno |
4131356c AC |
431 | Marked obsolescent in POSIX.1-2001. |
432 | Removed in POSIX.1-2008, | |
aeb2174a MK |
433 | recommending the use of |
434 | .BR getaddrinfo (3) | |
435 | and | |
436 | .BR getnameinfo (3) | |
437 | instead. | |
8af1ba10 MK |
438 | .SH NOTES |
439 | The functions | |
440 | .BR gethostbyname () | |
441 | and | |
442 | .BR gethostbyaddr () | |
443 | may return pointers to static data, which may be overwritten by | |
444 | later calls. | |
445 | Copying the | |
446 | .I struct hostent | |
447 | does not suffice, since it contains pointers; a deep copy is required. | |
c6d039a3 | 448 | .P |
988db661 | 449 | In the original BSD implementation the |
f9ee70bd MK |
450 | .I len |
451 | argument | |
988db661 | 452 | of |
f9ee70bd MK |
453 | .BR gethostbyname () |
454 | was an | |
455 | .IR int . | |
456 | The SUSv2 standard is buggy and declares the | |
8af1ba10 | 457 | .I len |
c4bb193f | 458 | argument of |
8af1ba10 MK |
459 | .BR gethostbyaddr () |
460 | to be of type | |
461 | .IR size_t . | |
462 | (That is wrong, because it has to be | |
463 | .IR int , | |
464 | and | |
465 | .I size_t | |
466 | is not. | |
467 | POSIX.1-2001 makes it | |
468 | .IR socklen_t , | |
469 | which is OK.) | |
f9ee70bd MK |
470 | See also |
471 | .BR accept (2). | |
c6d039a3 | 472 | .P |
8af1ba10 MK |
473 | The BSD prototype for |
474 | .BR gethostbyaddr () | |
475 | uses | |
5049da5b | 476 | .I "const char\ *" |
8af1ba10 | 477 | for the first argument. |
73d8cece | 478 | .SS System V/POSIX extension |
fea681da MK |
479 | POSIX requires the |
480 | .BR gethostent () | |
7f325581 | 481 | call, which should return the next entry in the host data base. |
fea681da MK |
482 | When using DNS/BIND this does not make much sense, but it may |
483 | be reasonable if the host data base is a file that can be read | |
c13182ef | 484 | line by line. |
7f325581 | 485 | On many systems, a routine of this name reads |
fea681da MK |
486 | from the file |
487 | .IR /etc/hosts . | |
1f409d5d | 488 | .\" e.g., Linux, FreeBSD, UnixWare, HP-UX |
fea681da | 489 | It may be available only when the library was built without DNS support. |
75b94dc3 | 490 | .\" e.g., FreeBSD, AIX |
c13182ef MK |
491 | The glibc version will ignore ipv6 entries. |
492 | This function is not reentrant, | |
fea681da MK |
493 | and glibc adds a reentrant version |
494 | .BR gethostent_r (). | |
73d8cece | 495 | .SS GNU extensions |
75c018a1 | 496 | glibc2 also has a |
63aa9df0 | 497 | .BR gethostbyname2 () |
fea681da | 498 | that works like |
63aa9df0 | 499 | .BR gethostbyname (), |
fea681da | 500 | but permits to specify the address family to which the address must belong. |
c6d039a3 | 501 | .P |
75c018a1 | 502 | glibc2 also has reentrant versions |
dd0fee67 MK |
503 | .BR gethostent_r (), |
504 | .BR gethostbyaddr_r (), | |
d556548b | 505 | .BR gethostbyname_r (), |
fea681da | 506 | and |
63aa9df0 | 507 | .BR gethostbyname2_r (). |
635e8d5a MK |
508 | The caller supplies a |
509 | .I hostent | |
510 | structure | |
dd0fee67 | 511 | .I ret |
635e8d5a | 512 | which will be filled in on success, and a temporary work buffer |
fea681da | 513 | .I buf |
dd0fee67 | 514 | of size |
fea681da | 515 | .IR buflen . |
dd0fee67 MK |
516 | After the call, |
517 | .I result | |
20523df7 MK |
518 | will point to the result on success. |
519 | In case of an error | |
dd0fee67 MK |
520 | or if no entry is found |
521 | .I result | |
635e8d5a | 522 | will be NULL. |
c7094399 | 523 | The functions return 0 on success and a nonzero error number on failure. |
54d75d6c | 524 | In addition to the errors returned by the nonreentrant |
dd0fee67 MK |
525 | versions of these functions, if |
526 | .I buf | |
527 | is too small, the functions will return | |
528 | .BR ERANGE , | |
529 | and the call should be retried with a larger buffer. | |
530 | The global variable | |
fea681da | 531 | .I h_errno |
dd0fee67 | 532 | is not modified, but the address of a variable in which to store error numbers |
fea681da MK |
533 | is passed in |
534 | .IR h_errnop . | |
444aa1ce MK |
535 | .SH BUGS |
536 | .BR gethostbyname () | |
537 | does not recognize components of a dotted IPv4 address string | |
538 | that are expressed in hexadecimal. | |
539 | .\" http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482973 | |
47297adb | 540 | .SH SEE ALSO |
fea681da | 541 | .BR getaddrinfo (3), |
652abd33 MK |
542 | .\" .BR getipnodebyaddr (3), |
543 | .\" .BR getipnodebyname (3), | |
fea681da | 544 | .BR getnameinfo (3), |
444aa1ce | 545 | .BR inet (3), |
fea681da MK |
546 | .BR inet_ntop (3), |
547 | .BR inet_pton (3), | |
548 | .BR resolver (3), | |
549 | .BR hosts (5), | |
24268a72 | 550 | .BR nsswitch.conf (5), |
fea681da | 551 | .BR hostname (7), |
24268a72 MK |
552 | .BR named (8) |
553 | .\" .BR resolv+ (8) |