diff options
Diffstat (limited to 'src/lib/libc/net/gethostbyname.3')
-rw-r--r-- | src/lib/libc/net/gethostbyname.3 | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/libc/net/gethostbyname.3 b/src/lib/libc/net/gethostbyname.3 index c2db100c9b..f3f3ea580f 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.23 2005/06/08 18:32:34 millert Exp $ | 1 | .\" $OpenBSD: gethostbyname.3,v 1.24 2005/07/22 04:50:51 jaredy 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. |
@@ -42,7 +42,7 @@ | |||
42 | .Nd get network host entry | 42 | .Nd get network host entry |
43 | .Sh SYNOPSIS | 43 | .Sh SYNOPSIS |
44 | .Fd #include <netdb.h> | 44 | .Fd #include <netdb.h> |
45 | .Fd extern int h_errno; | 45 | .Vt extern int h_errno ; |
46 | .Ft struct hostent * | 46 | .Ft struct hostent * |
47 | .Fn gethostbyname "const char *name" | 47 | .Fn gethostbyname "const char *name" |
48 | .Ft struct hostent * | 48 | .Ft struct hostent * |
@@ -62,11 +62,11 @@ | |||
62 | .Sh DESCRIPTION | 62 | .Sh DESCRIPTION |
63 | The | 63 | The |
64 | .Fn gethostbyname , | 64 | .Fn gethostbyname , |
65 | .Fn gethostbyname2 | 65 | .Fn gethostbyname2 , |
66 | and | 66 | and |
67 | .Fn gethostbyaddr | 67 | .Fn gethostbyaddr |
68 | 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 |
69 | describing an internet host referenced by name or by address, respectively. | 69 | describing an Internet host referenced by name or by address, respectively. |
70 | This structure contains either information obtained from the name server (i.e., | 70 | This structure contains either information obtained from the name server (i.e., |
71 | .Xr resolver 3 | 71 | .Xr resolver 3 |
72 | and | 72 | and |
@@ -78,15 +78,15 @@ or database entries supplied by the | |||
78 | system. | 78 | system. |
79 | .Xr resolv.conf 5 | 79 | .Xr resolv.conf 5 |
80 | describes how the particular database is chosen. | 80 | describes how the particular database is chosen. |
81 | .Bd -literal | 81 | .Bd -literal -offset indent |
82 | struct hostent { | 82 | struct hostent { |
83 | char *h_name; /* official name of host */ | 83 | char *h_name; /* official name of host */ |
84 | char **h_aliases; /* alias list */ | 84 | char **h_aliases; /* alias list */ |
85 | int h_addrtype; /* host address type */ | 85 | int h_addrtype; /* host address type */ |
86 | int h_length; /* length of address */ | 86 | int h_length; /* length of address */ |
87 | char **h_addr_list; /* list of addresses from name server */ | 87 | char **h_addr_list; /* list of returned addresses */ |
88 | }; | 88 | }; |
89 | #define h_addr h_addr_list[0] /* address, for backward compatibility */ | 89 | #define h_addr h_addr_list[0] /* address, for backward compat */ |
90 | .Ed | 90 | .Ed |
91 | .Pp | 91 | .Pp |
92 | The members of this structure are: | 92 | The members of this structure are: |
@@ -94,13 +94,13 @@ The members of this structure are: | |||
94 | .It Fa h_name | 94 | .It Fa h_name |
95 | Official name of the host. | 95 | Official name of the host. |
96 | .It Fa h_aliases | 96 | .It Fa h_aliases |
97 | A NULL-terminated array of alternate names for the host. | 97 | A null-terminated array of alternate names for the host. |
98 | .It Fa h_addrtype | 98 | .It Fa h_addrtype |
99 | The type of address being returned. | 99 | The type of address being returned. |
100 | .It Fa h_length | 100 | .It Fa h_length |
101 | The length, in bytes, of the address. | 101 | The length, in bytes, of the address. |
102 | .It Fa h_addr_list | 102 | .It Fa h_addr_list |
103 | A zero-terminated array of network addresses for the host. | 103 | A null-terminated array of network addresses for the host. |
104 | Host addresses are returned in network byte order. | 104 | Host addresses are returned in network byte order. |
105 | .It Fa h_addr | 105 | .It Fa h_addr |
106 | The first address in | 106 | The first address in |
@@ -227,7 +227,7 @@ will result in an answer; | |||
227 | 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 | 228 | .It Dv NETDB_INTERNAL |
229 | An internal error occurred. | 229 | An internal error occurred. |
230 | This may occurs when an address family other than | 230 | This may occur when an address family other than |
231 | .Dv AF_INET | 231 | .Dv AF_INET |
232 | or | 232 | or |
233 | .Dv AF_INET6 | 233 | .Dv AF_INET6 |
@@ -287,6 +287,7 @@ function closes the file. | |||
287 | These functions use static data storage; | 287 | These functions use static data storage; |
288 | if the data is needed for future use, it should be | 288 | if the data is needed for future use, it should be |
289 | copied before any subsequent calls overwrite it. | 289 | copied before any subsequent calls overwrite it. |
290 | .Pp | ||
290 | Only the Internet | 291 | Only the Internet |
291 | address formats are currently understood. | 292 | address formats are currently understood. |
292 | .Pp | 293 | .Pp |