diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/net/getnameinfo.3 | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/lib/libc/net/getnameinfo.3 b/src/lib/libc/net/getnameinfo.3 index a1b3bdabb6..dd1ff6b947 100644 --- a/src/lib/libc/net/getnameinfo.3 +++ b/src/lib/libc/net/getnameinfo.3 | |||
| @@ -30,11 +30,11 @@ | |||
| 30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
| 31 | .\" | 31 | .\" |
| 32 | .\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95 | 32 | .\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95 |
| 33 | .\" $Id: getnameinfo.3,v 1.1 1999/07/03 20:26:55 deraadt Exp $ | 33 | .\" $Id: getnameinfo.3,v 1.2 1999/07/05 04:40:59 aaron Exp $ |
| 34 | .\" | 34 | .\" |
| 35 | .Dd May 25, 1995 | 35 | .Dd May 25, 1995 |
| 36 | .Dt GETNAMEINFO 3 | 36 | .Dt GETNAMEINFO 3 |
| 37 | .Os KAME | 37 | .Os |
| 38 | .Sh NAME | 38 | .Sh NAME |
| 39 | .Nm getnameinfo | 39 | .Nm getnameinfo |
| 40 | .Nd address-to-nodename translation in protocol-independent manner | 40 | .Nd address-to-nodename translation in protocol-independent manner |
| @@ -64,16 +64,16 @@ a non-zero return value indicates failure. | |||
| 64 | The first argument, | 64 | The first argument, |
| 65 | .Fa sa , | 65 | .Fa sa , |
| 66 | points to either a | 66 | points to either a |
| 67 | .Fa sockaddr_in | 67 | .Li sockaddr_in |
| 68 | structure (for IPv4) or a | 68 | structure (for IPv4) or a |
| 69 | .Fa sockaddr_in6 | 69 | .Li sockaddr_in6 |
| 70 | structure (for IPv6) that holds the IP address and port number. | 70 | structure (for IPv6) that holds the IP address and port number. |
| 71 | The | 71 | The |
| 72 | .Fa salen | 72 | .Fa salen |
| 73 | argument gives the length of the | 73 | argument gives the length of the |
| 74 | .Fa sockaddr_in | 74 | .Li sockaddr_in |
| 75 | or | 75 | or |
| 76 | .Fa sockaddr_in6 | 76 | .Li sockaddr_in6 |
| 77 | structure. | 77 | structure. |
| 78 | .Pp | 78 | .Pp |
| 79 | The function returns the nodename associated with the IP address in | 79 | The function returns the nodename associated with the IP address in |
| @@ -102,7 +102,7 @@ Unfortunately most systems do not provide constants that specify the | |||
| 102 | maximum size of either a fully-qualified domain name or a service name. | 102 | maximum size of either a fully-qualified domain name or a service name. |
| 103 | Therefore to aid the application in allocating buffers for these two | 103 | Therefore to aid the application in allocating buffers for these two |
| 104 | returned strings the following constants are defined in | 104 | returned strings the following constants are defined in |
| 105 | .Li <netdb.h> : | 105 | .Aq Pa netdb.h : |
| 106 | .Bd -literal -offset | 106 | .Bd -literal -offset |
| 107 | #define NI_MAXHOST 1025 | 107 | #define NI_MAXHOST 1025 |
| 108 | #define NI_MAXSERV 32 | 108 | #define NI_MAXSERV 32 |
| @@ -111,11 +111,8 @@ returned strings the following constants are defined in | |||
| 111 | The first value is actually defined as the constant | 111 | The first value is actually defined as the constant |
| 112 | .Dv MAXDNAME | 112 | .Dv MAXDNAME |
| 113 | in recent versions of BIND's | 113 | in recent versions of BIND's |
| 114 | .Li <arpa/nameser.h> | 114 | .Aq Pa arpa/nameser.h |
| 115 | header | 115 | header (older versions of BIND define this constant to be 256) |
| 116 | .Po | ||
| 117 | older versions of BIND define this constant to be 256 | ||
| 118 | .Pc | ||
| 119 | and the second is a guess based on the services listed in the current | 116 | and the second is a guess based on the services listed in the current |
| 120 | Assigned Numbers RFC. | 117 | Assigned Numbers RFC. |
| 121 | .Pp | 118 | .Pp |
| @@ -154,21 +151,24 @@ instead of its name. | |||
| 154 | The two | 151 | The two |
| 155 | .Dv NI_NUMERICxxx | 152 | .Dv NI_NUMERICxxx |
| 156 | flags are required to support the | 153 | flags are required to support the |
| 157 | .Li "-n" | 154 | .Fl n |
| 158 | flag that many commands provide. | 155 | flag that many commands provide. |
| 159 | .Pp | 156 | .Pp |
| 160 | A fifth flag bit, | 157 | A fifth flag bit, |
| 161 | .Dv NI_DGRAM , | 158 | .Dv NI_DGRAM , |
| 162 | specifies that the service is a datagram service, and causes | 159 | specifies that the service is a datagram service, and causes |
| 163 | .Fn getservbyport | 160 | .Fn getservbyport |
| 164 | to be called with a second argument of "udp" instead of its default of "tcp". | 161 | to be called with a second argument of |
| 162 | .Qq udp | ||
| 163 | instead of its default of | ||
| 164 | .Qq tcp . | ||
| 165 | This is required for the few ports (512-514) | 165 | This is required for the few ports (512-514) |
| 166 | that have different services for UDP and TCP. | 166 | that have different services for UDP and TCP. |
| 167 | .Pp | 167 | .Pp |
| 168 | These | 168 | These |
| 169 | .Dv NI_xxx | 169 | .Dv NI_xxx |
| 170 | flags are defined in | 170 | flags are defined in |
| 171 | .Li <netdb.h> . | 171 | .Aq Pa netdb.h . |
| 172 | .Sh FILES | 172 | .Sh FILES |
| 173 | .Bl -tag -width /etc/resolv.conf -compact | 173 | .Bl -tag -width /etc/resolv.conf -compact |
| 174 | .It Pa /etc/hosts | 174 | .It Pa /etc/hosts |
| @@ -193,7 +193,8 @@ R. Gilligan, S. Thomson, J. Bound, and W. Stevens, | |||
| 193 | The | 193 | The |
| 194 | .Fn getaddrinfo | 194 | .Fn getaddrinfo |
| 195 | function is defined IEEE POSIX 1003.1g draft specification, | 195 | function is defined IEEE POSIX 1003.1g draft specification, |
| 196 | and documented in ``Basic Socket Interface Extensions for IPv6'' | 196 | and documented in |
| 197 | .Dq Basic Socket Interface Extensions for IPv6 | ||
| 197 | .Pq RFC2533 . | 198 | .Pq RFC2533 . |
| 198 | .Sh BUGS | 199 | .Sh BUGS |
| 199 | The text was shamelessly copied from RFC2553. | 200 | The text was shamelessly copied from RFC2553. |
