Wed Mar 19 18:21:39 2014 UTC ()
Clarify some wording in getaddrinfo.1.


(riastradh)
diff -r1.2 -r1.3 src/usr.bin/getaddrinfo/getaddrinfo.1

cvs diff -r1.2 -r1.3 src/usr.bin/getaddrinfo/getaddrinfo.1 (expand / switch to unified diff)

--- src/usr.bin/getaddrinfo/getaddrinfo.1 2013/09/30 08:13:59 1.2
+++ src/usr.bin/getaddrinfo/getaddrinfo.1 2014/03/19 18:21:39 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: getaddrinfo.1,v 1.2 2013/09/30 08:13:59 wiz Exp $ 1.\" $NetBSD: getaddrinfo.1,v 1.3 2014/03/19 18:21:39 riastradh Exp $
2.\" 2.\"
3.\" Copyright (c) 2013 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2013 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This documentation is derived from text contributed to The NetBSD 6.\" This documentation is derived from text contributed to The NetBSD
7.\" Foundation by Taylor R. Campbell. 7.\" Foundation by Taylor R. Campbell.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
@@ -17,53 +17,58 @@ @@ -17,53 +17,58 @@
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\" 29.\"
30.Dd September 30, 2013 30.Dd March 19, 2014
31.Dt GETADDRINFO 1 31.Dt GETADDRINFO 1
32.Os 32.Os
33.Sh NAME 33.Sh NAME
34.Nm getaddrinfo 34.Nm getaddrinfo
35.Nd resolve names to socket addresses 35.Nd resolve names to socket addresses
36.Sh SYNOPSIS 36.Sh SYNOPSIS
37.Nm 37.Nm
38.Op Fl cNnP 38.Op Fl cNnP
39.Op Fl f Ar family 39.Op Fl f Ar family
40.Op Fl p Ar protocol 40.Op Fl p Ar protocol
41.Op Fl s Ar service 41.Op Fl s Ar service
42.Op Fl t Ar socktype 42.Op Fl t Ar socktype
43.Op Ar hostname 43.Op Ar hostname
44.Sh DESCRIPTION 44.Sh DESCRIPTION
45The 45The
46.Nm 46.Nm
47utility resolves host and service names to socket addresses as if with 47utility resolves host and service names to socket addresses as if with
48the 48the
49.Xr getaddrinfo 3 49.Xr getaddrinfo 3
50routine and formats them to standard output. 50routine and formats them to standard output.
51.Pp 51.Pp
52The output is a sequence of lines of space-separated fields: 52The output is a sequence of lines of space-separated fields:
 53.Pp
53.Dl socket-type address-family protocol [af-specific data ...] 54.Dl socket-type address-family protocol [af-specific data ...]
54.Pp 55.Pp
55For the internet family, the address-family-specific data are the 56For the
56internet address and the port number. 57.Dq inet
 58and
 59.Dq inet6
 60address families, the af-specific data are the IP/IPv6 address and port
 61number.
57.Pp 62.Pp
58Although the 63Although the
59.Nm 64.Nm
60utility may query the DNS to give answers, depending on the 65utility may query the DNS to give answers, depending on the
61system's 66system's
62.Xr nsswitch.conf 5 67.Xr nsswitch.conf 5
63configuration, it is not intended to be a general-purpose utility to 68configuration, it is not intended to be a general-purpose utility to
64query the DNS; use the 69query the DNS; use the
65.Xr dig 1 70.Xr dig 1
66utility for that. 71utility for that.
67.Pp 72.Pp
68The following options are available: 73The following options are available:
69.Bl -tag -width Ds 74.Bl -tag -width Ds
@@ -133,27 +138,28 @@ corresponds with @@ -133,27 +138,28 @@ corresponds with
133.El 138.El
134.Sh EXIT STATUS 139.Sh EXIT STATUS
135.Ex -std getaddrinfo 140.Ex -std getaddrinfo
136.Sh EXAMPLES 141.Sh EXAMPLES
137Look up 142Look up
138.Dq www.NetBSD.org : 143.Dq www.NetBSD.org :
139.Bd -literal -offset indent 144.Bd -literal -offset indent
140$ getaddrinfo www.NetBSD.org 145$ getaddrinfo www.NetBSD.org
141dgram inet6 udp 2001:4f8:3:7:2e0:81ff:fe52:9ab6 0 146dgram inet6 udp 2001:4f8:3:7:2e0:81ff:fe52:9ab6 0
142dgram inet udp 149.20.53.67 0 147dgram inet udp 149.20.53.67 0
143stream inet6 tcp 2001:4f8:3:7:2e0:81ff:fe52:9ab6 0 148stream inet6 tcp 2001:4f8:3:7:2e0:81ff:fe52:9ab6 0
144stream inet tcp 149.20.53.67 0 149stream inet tcp 149.20.53.67 0
145.Ed 150.Ed
146The unspecified service manifested as a port number of zero. 151.Pp
 152The port number here is zero because no service was specified.
147.Pp 153.Pp
148Look up 154Look up
149.Dq morden.NetBSD.org 155.Dq morden.NetBSD.org
150for stream sockets on port 80, and show the canonical name: 156for stream sockets on port 80, and show the canonical name:
151.Bd -literal -offset indent 157.Bd -literal -offset indent
152$ getaddrinfo -c -t stream -s 80 morden.NetBSD.org 158$ getaddrinfo -c -t stream -s 80 morden.NetBSD.org
153canonname ftp.NetBSD.org 159canonname ftp.NetBSD.org
154stream inet6 tcp 2001:470:1f05:3d::21 80 160stream inet6 tcp 2001:470:1f05:3d::21 80
155stream inet tcp 199.233.217.249 80 161stream inet tcp 199.233.217.249 80
156.Ed 162.Ed
157.Sh SEE ALSO 163.Sh SEE ALSO
158.Xr dig 1 , 164.Xr dig 1 ,
159.Xr getent 1 , 165.Xr getent 1 ,