6 \fB\h'-\w'\\$1'u-1m'\\$1\h'1m'\fP\c
8 .TH gai 1 "13 September 2017" "Straylight/Edgeware"
10 gai \- look up names using getaddrinfo
25 program looks up host and/or service names
29 and reports the results in a machine-readable manner.
31 The following command-line options are recognized.
34 Give a short help message describing the options available.
40 report plain IPv4 address
42 the corresponding v6-mapped addresses.
50 Report the canonical name of the host.
58 If the canonical name is an IDN,
59 then convert it back into the local character set before display.
67 Return only addresses for the given address
71 (any address family is acceptable; the default),
81 Return only addresses of families
82 for which the host has a configured address.
83 This is less useful than it sounds
84 because of IPv6 link-local addresses.
90 Convert hostnames containing unusual characters to IDNs.
96 Return IPv4 addresses as their v6-mapped equivalents.
104 Accept only numeric host addresses;
105 do not attempt to resolve hostnames.
106 (Scope ids on link-local IPv6 addresses are still accepted.)
114 Accept only numeric port numbers;
115 do not attempt to resolve service names.
123 Return only addresses suitable for use with the given
125 which may be a protocol number
126 or a name to be looked up in
133 Allow unassigned Unicode code points in IDNs.
135 .B AI_IDN_ALLOW_UNASSIGNED
143 Return only addresses for the given socket
147 (no restriction; the default),
157 Check that the result of IDN conversion is a valid STD3 host name.
159 .B AI_IDN_USE_STD3_ASCII_RULES
167 Default the host address suitably for use for receiving connections;
172 then return appropriate wildcard addresses rather than loopback
182 to indicate that a service-only lookup should be performed.
185 may be omitted to indicate that a hostname-only lookup should be
188 The output is as follows.
195 is written showing the canonical host name.
196 Following this (if it's present) are one or more lines of the form
198 .IR family " " type " " address " " port
202 shows the address family of the given address, as either
208 shows the socket type, as
217 are the numeric address and service,
221 Mark Wooding, <mdw@distorted.org.uk>