View | Details | Raw Unified | Return to bug 78357
Collapse All | Expand All

(-)getaddrinfo.3 (-5 / +66 lines)
Lines 119-129 Link Here
119
.Fa ai_protocol
119
.Fa ai_protocol
120
is zero the caller will accept any protocol.
120
is zero the caller will accept any protocol.
121
.It Fa ai_flags
121
.It Fa ai_flags
122
The
122
.Fa ai_flags
123
.Fa ai_flags
123
is formed by
124
field to which the
124
.Tn OR Ns 'ing
125
.Fa hints
125
the following values:
126
parameter points shall be set to zero
127
or be the bitwise-inclusive OR of one or more of the values
128
.Dv AI_ADDRCONFIG ,
129
.Dv AI_ALL ,
130
.Dv AI_CANONNAME ,
131
.Dv AI_NUMERICHOST ,
132
.Dv AI_NUMERICSERV ,
133
.Dv AI_PASSIVE ,
134
and
135
.Dv AI_V4MAPPED .
126
.Bl -tag -width "AI_CANONNAMEXX"
136
.Bl -tag -width "AI_CANONNAMEXX"
137
.It Dv AI_ADDRCONFIG
138
If the
139
.Dv AI_ADDRCONFIG
140
bit is set, IPv4 addresses shall be returned only if
141
an IPv4 address is configured on the local system,
142
and IPv6 addresses shall be returned only if
143
an IPv6 address is configured on the local system.
144
.It Dv AI_ALL
145
If the
146
.Dv AI_ALL
147
bit is set with the
148
.Dv AI_V4MAPPED
149
bit, then
150
.Fn getaddrinfo
151
shall return all matching IPv6 and IPv4 addresses.
152
The
153
.Dv AI_ALL
154
bit without the
155
.Dv AI_V4MAPPED
156
bit is ignored.
127
.It Dv AI_CANONNAME
157
.It Dv AI_CANONNAME
128
If the
158
If the
129
.Dv AI_CANONNAME
159
.Dv AI_CANONNAME
Lines 142-147 Link Here
142
.Fa hostname
172
.Fa hostname
143
should be treated as a numeric string defining an IPv4 or IPv6 address
173
should be treated as a numeric string defining an IPv4 or IPv6 address
144
and no name resolution should be attempted.
174
and no name resolution should be attempted.
175
.It Dv AI_NUMERICSERV
176
If the
177
.Dv AI_NUMERICSERV
178
bit is set,
179
then a non-null
180
.Fa servname
181
string supplied shall be a numeric port string.
182
Otherwise, an
183
.Dv EAI_NONAME
184
error shall be returned.
185
This bit shall prevent any type of name resolution service
186
(for example, NIS+) from being invoked.
145
.It Dv AI_PASSIVE
187
.It Dv AI_PASSIVE
146
If the
188
If the
147
.Dv AI_PASSIVE
189
.Dv AI_PASSIVE
Lines 176-181 Link Here
176
is the null pointer and
218
is the null pointer and
177
.Dv AI_PASSIVE
219
.Dv AI_PASSIVE
178
is not set.
220
is not set.
221
.It Dv AI_V4MAPPED
222
If the
223
.Dv AI_V4MAPPED
224
flag is specified along with an
225
.Fa ai_family
226
of
227
.Dv AF_INET6 ,
228
then
229
.Fn getaddrinfo
230
shall return IPv4-mapped IPv6 addresses
231
on finding no matching IPv6 addresses (
232
.Fa ai_addrlen
233
shall be 16).
234
The
235
.Dv AI_V4MAPPED
236
flag shall be ignored unless
237
.Fa ai_family
238
equals
239
.Dv AF_INET6 .
179
.El
240
.El
180
.El
241
.El
181
.Pp
242
.Pp
Lines 428-434 Link Here
428
The
489
The
429
.Fn getaddrinfo
490
.Fn getaddrinfo
430
function is defined by the
491
function is defined by the
431
.St -p1003.1g-2000
492
.St -p1003.1-2004
432
draft specification and documented in
493
specification and documented in
433
.Dv "RFC 3493" ,
494
.Dv "RFC 3493" ,
434
.Dq Basic Socket Interface Extensions for IPv6 .
495
.Dq Basic Socket Interface Extensions for IPv6 .

Return to bug 78357