diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/net/getaddrinfo.3 | 22 | ||||
-rw-r--r-- | lib/libc/net/getnameinfo.3 | 16 |
2 files changed, 19 insertions, 19 deletions
diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3 index 5c4be167328..12b55004367 100644 --- a/lib/libc/net/getaddrinfo.3 +++ b/lib/libc/net/getaddrinfo.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getaddrinfo.3,v 1.20 2002/04/30 16:31:42 mpech Exp $ +.\" $OpenBSD: getaddrinfo.3,v 1.21 2003/05/01 19:10:09 jmc Exp $ .\" $KAME: getaddrinfo.3,v 1.29 2001/02/12 09:24:45 itojun Exp $ .\" .\" Copyright (c) 1983, 1987, 1991, 1993 @@ -351,32 +351,32 @@ indicate an unknown error. The implementation allows experimental numeric IPv6 address notation with scope identifier. By appending the percent character and scope identifier to addresses, -you can fill +you can fill the .Li sin6_scope_id field for addresses. This would make management of scoped address easier, and allows cut-and-paste input of scoped address. .Pp At this moment the code supports only link-local addresses with the format. -Scope identifier is hardcoded to name of hardware interface associated +Scope identifier is hardcoded to the name of the hardware interface associated with the link. .Po such as .Li ne0 .Pc . -Example would be like +An example is .Dq Li fe80::1%ne0 , which means .Do .Li fe80::1 -on the link associated with +on the link associated with the .Li ne0 interface .Dc . .Pp The implementation is still very experimental and non-standard. -The current implementation assumes one-by-one relationship between -interface and link, which is not necessarily true from the specification. +The current implementation assumes a one-to-one relationship between +the interface and link, which is not necessarily true from the specification. .\" .Sh EXAMPLES The following code tries to connect to @@ -384,14 +384,14 @@ The following code tries to connect to service .Dq Li http . via stream socket. -It loops through all the addresses available, regardless from address family. -If the destination resolves to IPv4 address, it will use +It loops through all the addresses available, regardless of address family. +If the destination resolves to an IPv4 address, it will use .Dv AF_INET socket. Similarly, if it resolves to IPv6, .Dv AF_INET6 socket is used. -Observe that there is no hardcoded reference to particular address family. +Observe that there is no hardcoded reference to a particular address family. The code works even if .Nm getaddrinfo returns addresses that are not IPv4/v6. @@ -532,8 +532,8 @@ values, the function still returns a pointer to a string whose contents indicate an unknown error. .\" .Sh SEE ALSO -.Xr getnameinfo 3 , .Xr gethostbyname 3 , +.Xr getnameinfo 3 , .Xr getservbyname 3 , .Xr hosts 5 , .Xr resolv.conf 5 , diff --git a/lib/libc/net/getnameinfo.3 b/lib/libc/net/getnameinfo.3 index 76c64499066..e1511579493 100644 --- a/lib/libc/net/getnameinfo.3 +++ b/lib/libc/net/getnameinfo.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getnameinfo.3,v 1.17 2001/11/15 06:53:09 itojun Exp $ +.\" $OpenBSD: getnameinfo.3,v 1.18 2003/05/01 19:10:09 jmc Exp $ .\" $KAME: getnameinfo.3,v 1.20 2001/01/05 13:37:37 itojun Exp $ .\" .\" Copyright (c) 1983, 1987, 1991, 1993 @@ -56,11 +56,11 @@ The function is defined for protocol-independent address-to-nodename translation. Its functionality is a reverse conversion of .Xr getaddrinfo 3 , -and implements similar functionality with +and implements similar functionality to .Xr gethostbyaddr 3 and .Xr getservbyport 3 -in more sophisticated manner. +in a more sophisticated manner. .Pp This function looks up an IP address and port number provided by the caller in the DNS and system-specific database, and returns text @@ -180,16 +180,16 @@ flags are defined in .Ss Extension for scoped IPv6 address The implementation allows experimental numeric IPv6 address notation with scope identifier. -IPv6 link-local address will appear as string like +IPv6 link-local address will appear as a string like .Dq Li fe80::1%ne0 . Refer to .Xr getaddrinfo 3 for the notation. .\" .Sh EXAMPLES -The following code tries to get numeric hostname, and service name, +The following code tries to get a numeric hostname, and service name, for given socket address. -Observe that there is no hardcoded reference to particular address family. +Observe that there is no hardcoded reference to a particular address family. .Bd -literal -offset indent struct sockaddr *sa; /* input */ char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; @@ -281,7 +281,7 @@ The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit. .Sh STANDARDS The .Fn getaddrinfo -function is defined IEEE POSIX 1003.1g draft specification, +function is defined in IEEE POSIX 1003.1g draft specification, and documented in .Dq Basic Socket Interface Extensions for IPv6 .Pq RFC2553 . @@ -292,6 +292,6 @@ The current implementation is not thread-safe. The text was shamelessly copied from RFC2553. .Pp .Ox -intentionally uses different +intentionally uses a different .Dv NI_MAXHOST value from what RFC2553 suggests, to avoid buffer length handling mistakes. |