Debian Codegraph @

po/es/man3/getaddrinfo.3.po

raw
1 # Spanish translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Miguel Pérez Ibars <[email protected]>, 2004.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n\n"
8 "POT-Creation-Date: 2026-06-05 06:25+0200\n"
9 "PO-Revision-Date: 2004-06-26 19:53+0200\n"
10 "Last-Translator: Miguel Pérez Ibars <[email protected]>\n"
11 "Language-Team: Spanish <[email protected]>\n"
12 "Language: es\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17 "X-Generator: Lokalize 20.04.1\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, fuzzy, no-wrap
23 #| msgid "B<getaddrinfo>()"
24 msgid "getaddrinfo"
25 msgstr "B<getaddrinfo>()"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-08"
32 msgstr "8 Febrero 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, fuzzy, no-wrap
37 #| msgid "Linux man-pages 6.17"
38 msgid "Linux man-pages 6.18"
39 msgstr "Páginas de Manual de Linux 6.17"
40
41 #. type: SH
42 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
43 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
44 #, no-wrap
45 msgid "NAME"
46 msgstr "NOMBRE"
47
48 #. type: Plain text
49 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
50 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
51 msgid ""
52 "getaddrinfo, freeaddrinfo, gai_strerror - network address and service "
53 "translation"
54 msgstr ""
55 "getaddrinfo, freeaddrinfo, gai_strerror - traducción de servicios y "
56 "direcciones de red"
57
58 #. type: SH
59 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
60 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
61 #, no-wrap
62 msgid "LIBRARY"
63 msgstr "BIBLIOTECA"
64
65 #. type: Plain text
66 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
67 #: opensuse-leap-16-1 opensuse-tumbleweed
68 msgid "Standard C library (I<libc>,\\ I<-lc>)"
69 msgstr "Biblioteca Estándar C (I<libc>,\\ I<-lc>)"
70
71 #. type: SH
72 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
73 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
74 #, no-wrap
75 msgid "SYNOPSIS"
76 msgstr "SINOPSIS"
77
78 #. type: Plain text
79 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
80 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
81 #, no-wrap
82 msgid ""
83 "B<#include E<lt>sys/types.hE<gt>>\n"
84 "B<#include E<lt>sys/socket.hE<gt>>\n"
85 "B<#include E<lt>netdb.hE<gt>>\n"
86 msgstr ""
87 "B<#include E<lt>sys/types.hE<gt>>\n"
88 "B<#include E<lt>sys/socket.hE<gt>>\n"
89 "B<#include E<lt>netdb.hE<gt>>\n"
90
91 #. type: Plain text
92 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
93 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
94 #, fuzzy, no-wrap
95 #| msgid ""
96 #| "B<int getaddrinfo(const char *>I<node>B<, const char *>I<service>B<,>\n"
97 #| "B< const struct addrinfo *>I<hints>B<,>\n"
98 #| "B< struct addrinfo **>I<res>B<);>\n"
99 msgid ""
100 "B<int getaddrinfo(const char *restrict >I<node>B<,>\n"
101 "B< const char *restrict >I<service>B<,>\n"
102 "B< const struct addrinfo *restrict >I<hints>B<,>\n"
103 "B< struct addrinfo **restrict >I<res>B<);>\n"
104 msgstr ""
105 "B<int getaddrinfo(const char *>I<node>B<, const char *>I<service>B<,>\n"
106 "B< const struct addrinfo *>I<hints>B<,>\n"
107 "B< struct addrinfo **>I<res>B<);>\n"
108
109 #. type: Plain text
110 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
111 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
112 #, no-wrap
113 msgid "B<void freeaddrinfo(struct addrinfo *>I<res>B<);>\n"
114 msgstr "B<void freeaddrinfo(struct addrinfo *>I<res>B<);>\n"
115
116 #. type: Plain text
117 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
118 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
119 #, no-wrap
120 msgid "B<const char *gai_strerror(int >I<errcode>B<);>\n"
121 msgstr "B<const char *gai_strerror(int >I<errcode>B<);>\n"
122
123 #. type: Plain text
124 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
125 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
126 msgid ""
127 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
128 msgstr ""
129 "Requisitos de Macros de Prueba de Características para glibc (véase "
130 "B<feature_test_macros>(7)):"
131
132 #. type: Plain text
133 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
134 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
135 #, fuzzy
136 #| msgid ""
137 #| "B<freeaddrinfo>(),\n"
138 #| "B<gai_strerror>()"
139 msgid "B<getaddrinfo>(), B<freeaddrinfo>(), B<gai_strerror>():"
140 msgstr ""
141 "B<freeaddrinfo>(),\n"
142 "B<gai_strerror>()"
143
144 #. type: Plain text
145 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
146 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
147 #, no-wrap
148 msgid ""
149 " Since glibc 2.22:\n"
150 " _POSIX_C_SOURCE E<gt>= 200112L\n"
151 " glibc 2.21 and earlier:\n"
152 " _POSIX_C_SOURCE\n"
153 msgstr ""
154
155 #. type: SH
156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
158 #, no-wrap
159 msgid "DESCRIPTION"
160 msgstr "DESCRIPCIÓN"
161
162 #. .BR getipnodebyname (3),
163 #. .BR getipnodebyaddr (3),
164 #. type: Plain text
165 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
166 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
167 msgid ""
168 "Given I<node> and I<service>, which identify an Internet host and a service, "
169 "B<getaddrinfo>() returns one or more I<addrinfo> structures, each of which "
170 "contains an Internet address that can be specified in a call to B<bind>(2) "
171 "or B<connect>(2). The B<getaddrinfo>() function combines the functionality "
172 "provided by the B<gethostbyname>(3) and B<getservbyname>(3) functions into "
173 "a single interface, but unlike the latter functions, B<getaddrinfo>() is "
174 "reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies."
175 msgstr ""
176
177 #. type: Plain text
178 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
179 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
180 msgid ""
181 "The I<addrinfo> structure used by B<getaddrinfo>() contains the following "
182 "fields:"
183 msgstr ""
184 "La estructura I<addrinfo> usada por B<getaddrinfo>() contiene los siguientes "
185 "campos:"
186
187 #. type: Plain text
188 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
189 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
190 #, no-wrap
191 msgid ""
192 "struct addrinfo {\n"
193 " int ai_flags;\n"
194 " int ai_family;\n"
195 " int ai_socktype;\n"
196 " int ai_protocol;\n"
197 " socklen_t ai_addrlen;\n"
198 " struct sockaddr *ai_addr;\n"
199 " char *ai_canonname;\n"
200 " struct addrinfo *ai_next;\n"
201 "};\n"
202 msgstr ""
203 "struct addrinfo {\n"
204 " int ai_flags;\n"
205 " int ai_family;\n"
206 " int ai_socktype;\n"
207 " int ai_protocol;\n"
208 " socklen_t ai_addrlen;\n"
209 " struct sockaddr *ai_addr;\n"
210 " char *ai_canonname;\n"
211 " struct addrinfo *ai_next;\n"
212 "};\n"
213
214 #. type: Plain text
215 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
216 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
217 msgid ""
218 "The I<hints> argument points to an I<addrinfo> structure that specifies "
219 "criteria for selecting the socket address structures returned in the list "
220 "pointed to by I<res>. If I<hints> is not NULL it points to an I<addrinfo> "
221 "structure whose I<ai_family>, I<ai_socktype>, and I<ai_protocol> specify "
222 "criteria that limit the set of socket addresses returned by "
223 "B<getaddrinfo>(), as follows:"
224 msgstr ""
225
226 #. type: TP
227 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
228 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
229 #, no-wrap
230 msgid "I<ai_family>"
231 msgstr "I<ai_family>"
232
233 #. type: Plain text
234 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
235 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
236 msgid ""
237 "This field specifies the desired address family for the returned addresses. "
238 "Valid values for this field include B<AF_INET> and B<AF_INET6>. The value "
239 "B<AF_UNSPEC> indicates that B<getaddrinfo>() should return socket addresses "
240 "for any address family (either IPv4 or IPv6, for example) that can be used "
241 "with I<node> and I<service>."
242 msgstr ""
243
244 #. type: TP
245 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
246 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
247 #, no-wrap
248 msgid "I<ai_socktype>"
249 msgstr "I<ai_socktype>"
250
251 #. type: Plain text
252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
254 msgid ""
255 "This field specifies the preferred socket type, for example B<SOCK_STREAM> "
256 "or B<SOCK_DGRAM>. Specifying 0 in this field indicates that socket "
257 "addresses of any type can be returned by B<getaddrinfo>()."
258 msgstr ""
259
260 #. type: TP
261 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
262 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
263 #, no-wrap
264 msgid "I<ai_protocol>"
265 msgstr "I<ai_protocol>"
266
267 #. type: Plain text
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 msgid ""
271 "This field specifies the protocol for the returned socket addresses. "
272 "Specifying 0 in this field indicates that socket addresses with any protocol "
273 "can be returned by B<getaddrinfo>()."
274 msgstr ""
275
276 #. type: TP
277 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
278 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
279 #, no-wrap
280 msgid "I<ai_flags>"
281 msgstr "I<ai_flags>"
282
283 #. type: Plain text
284 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
285 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
286 msgid ""
287 "This field specifies additional options, described below. Multiple flags "
288 "are specified by bitwise OR-ing them together."
289 msgstr ""
290
291 #. type: Plain text
292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
294 msgid ""
295 "All the other fields in the structure pointed to by I<hints> must contain "
296 "either 0 or a null pointer, as appropriate."
297 msgstr ""
298
299 #. type: Plain text
300 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
301 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
302 #, fuzzy
303 #| msgid ""
304 #| "The I<node> or I<service> parameter, but not both, may be NULL. I<node> "
305 #| "specifies either a numerical network address (dotted-decimal format for "
306 #| "IPv4, hexadecimal format for IPv6) or a network hostname, whose network "
307 #| "addresses are looked up and resolved. If the I<ai_flags> member in the "
308 #| "I<hints> parameter contains the B<AI_NUMERICHOST> flag then the I<node> "
309 #| "parameter must be a numerical network address. The B<AI_NUMERICHOST> "
310 #| "flag suppresses any potentially lengthy network host address lookups."
311 msgid ""
312 "Specifying I<hints> as NULL is equivalent to setting I<ai_socktype> and "
313 "I<ai_protocol> to 0; I<ai_family> to B<AF_UNSPEC>; and I<ai_flags> to "
314 "B<(AI_V4MAPPED\\ |\\ AI_ADDRCONFIG)>. (POSIX specifies different defaults "
315 "for I<ai_flags>; see NOTES.) I<node> specifies either a numerical network "
316 "address (for IPv4, numbers-and-dots notation as supported by "
317 "B<inet_aton>(3); for IPv6, hexadecimal string format as supported by "
318 "B<inet_pton>(3)), or a network hostname, whose network addresses are looked "
319 "up and resolved. If I<hints.ai_flags> contains the B<AI_NUMERICHOST> flag, "
320 "then I<node> must be a numerical network address. The B<AI_NUMERICHOST> "
321 "flag suppresses any potentially lengthy network host address lookups."
322 msgstr ""
323 "El parámetro I<node> o I<service> , pero no ambos, pueden ser NULL. I<node> "
324 "especifica o bien una dirección de red numérica (en formato decimal con "
325 "puntos para IPv4, format hexadecimal para IPv6) o un nombre de host, cuyas "
326 "direcciones de red son buscadas y resueltas. Si el miembro I<ai_flags> en "
327 "el parámetro I<hints> contiene la opción B<AI_NUMERICHOST> el parámetro "
328 "I<node> debe ser una dirección de red numérica. La opción B<AI_NUMERICHOST> "
329 "suprime cualquier búsqueda larga potencial de direcciones de host."
330
331 #. type: Plain text
332 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
333 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
334 msgid ""
335 "If the B<AI_PASSIVE> flag is specified in I<hints.ai_flags>, and I<node> is "
336 "NULL, then the returned socket addresses will be suitable for B<bind>(2)ing "
337 "a socket that will B<accept>(2) connections. The returned socket address "
338 "will contain the \"wildcard address\" (B<INADDR_ANY> for IPv4 addresses, "
339 "B<IN6ADDR_ANY_INIT> for IPv6 address). The wildcard address is used by "
340 "applications (typically servers) that intend to accept connections on any "
341 "of the host's network addresses. If I<node> is not NULL, then the "
342 "B<AI_PASSIVE> flag is ignored."
343 msgstr ""
344
345 #. type: Plain text
346 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
347 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
348 msgid ""
349 "If the B<AI_PASSIVE> flag is not set in I<hints.ai_flags>, then the returned "
350 "socket addresses will be suitable for use with B<connect>(2), B<sendto>(2), "
351 "or B<sendmsg>(2). If I<node> is NULL, then the network address will be set "
352 "to the loopback interface address (B<INADDR_LOOPBACK> for IPv4 addresses, "
353 "B<IN6ADDR_LOOPBACK_INIT> for IPv6 address); this is used by applications "
354 "that intend to communicate with peers running on the same host."
355 msgstr ""
356
357 #. type: Plain text
358 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
359 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
360 msgid ""
361 "I<service> sets the port in each returned address structure. If this "
362 "argument is a service name (see B<services>(5)), it is translated to the "
363 "corresponding port number. This argument can also be specified as a decimal "
364 "number, which is simply converted to binary. If I<service> is NULL, then "
365 "the port number of the returned socket addresses will be left "
366 "uninitialized. If B<AI_NUMERICSERV> is specified in I<hints.ai_flags> and "
367 "I<service> is not NULL, then I<service> must point to a string containing a "
368 "numeric port number. This flag is used to inhibit the invocation of a name "
369 "resolution service in cases where it is known not to be required."
370 msgstr ""
371
372 #. type: Plain text
373 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
374 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
375 msgid "Either I<node> or I<service>, but not both, may be NULL."
376 msgstr ""
377
378 #. type: Plain text
379 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
380 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
381 msgid ""
382 "The B<getaddrinfo>() function allocates and initializes a linked list of "
383 "I<addrinfo> structures, one for each network address that matches I<node> "
384 "and I<service>, subject to any restrictions imposed by I<hints>, and returns "
385 "a pointer to the start of the list in I<res>. The items in the linked list "
386 "are linked by the I<ai_next> field."
387 msgstr ""
388
389 #. type: Plain text
390 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
391 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
392 msgid ""
393 "There are several reasons why the linked list may have more than one "
394 "I<addrinfo> structure, including: the network host is multihomed, accessible "
395 "over multiple protocols (e.g., both B<AF_INET> and B<AF_INET6>); or the same "
396 "service is available from multiple socket types (one B<SOCK_STREAM> address "
397 "and another B<SOCK_DGRAM> address, for example). Normally, the application "
398 "should try using the addresses in the order in which they are returned. The "
399 "sorting function used within B<getaddrinfo>() is defined in RFC\\ 3484; the "
400 "order can be tweaked for a particular system by editing I</etc/gai.conf> "
401 "(available since glibc 2.5)."
402 msgstr ""
403
404 #. Prior to glibc 2.3.4, the ai_canonname of each addrinfo
405 #. structure was set pointing to the canonical name; that was
406 #. more than POSIX.1-2001 specified, or other implementations provided.
407 #. MTK, Aug 05
408 #. type: Plain text
409 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
410 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
411 msgid ""
412 "If I<hints.ai_flags> includes the B<AI_CANONNAME> flag, then the "
413 "I<ai_canonname> field of the first of the I<addrinfo> structures in the "
414 "returned list is set to point to the official name of the host."
415 msgstr ""
416
417 #. type: Plain text
418 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
419 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
420 msgid ""
421 "The remaining fields of each returned I<addrinfo> structure are initialized "
422 "as follows:"
423 msgstr ""
424
425 #. type: IP
426 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
427 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
428 #, no-wrap
429 msgid "\\[bu]"
430 msgstr "\\[bu]"
431
432 #. type: Plain text
433 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
434 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
435 msgid ""
436 "The I<ai_family>, I<ai_socktype>, and I<ai_protocol> fields return the "
437 "socket creation parameters (i.e., these fields have the same meaning as the "
438 "corresponding arguments of B<socket>(2)). For example, I<ai_family> might "
439 "return B<AF_INET> or B<AF_INET6>; I<ai_socktype> might return B<SOCK_DGRAM> "
440 "or B<SOCK_STREAM>; and I<ai_protocol> returns the protocol for the socket."
441 msgstr ""
442
443 #. type: Plain text
444 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
445 #: opensuse-leap-16-1 opensuse-tumbleweed
446 msgid ""
447 "A pointer to the socket address is placed in the I<ai_addr> field, and the "
448 "size of the socket address, in bytes, is placed in the I<ai_addrlen> field."
449 msgstr ""
450
451 #. type: Plain text
452 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
453 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
454 msgid ""
455 "If I<hints.ai_flags> includes the B<AI_ADDRCONFIG> flag, then IPv4 addresses "
456 "are returned in the list pointed to by I<res> only if the local system has "
457 "at least one IPv4 address configured, and IPv6 addresses are returned only "
458 "if the local system has at least one IPv6 address configured. The loopback "
459 "address is not considered for this case as valid as a configured address. "
460 "This flag is useful on, for example, IPv4-only systems, to ensure that "
461 "B<getaddrinfo>() does not return IPv6 socket addresses that would always "
462 "fail in B<connect>(2) or B<bind>(2)."
463 msgstr ""
464
465 #. type: Plain text
466 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
467 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
468 msgid ""
469 "If I<hints.ai_flags> specifies the B<AI_V4MAPPED> flag, and "
470 "I<hints.ai_family> was specified as B<AF_INET6>, and no matching IPv6 "
471 "addresses could be found, then return IPv4-mapped IPv6 addresses in the list "
472 "pointed to by I<res>. If both B<AI_V4MAPPED> and B<AI_ALL> are specified in "
473 "I<hints.ai_flags>, then return both IPv6 and IPv4-mapped IPv6 addresses in "
474 "the list pointed to by I<res>. B<AI_ALL> is ignored if B<AI_V4MAPPED> is "
475 "not also specified."
476 msgstr ""
477
478 #. type: Plain text
479 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
480 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
481 msgid ""
482 "The B<freeaddrinfo>() function frees the memory that was allocated for the "
483 "dynamically allocated linked list I<res>."
484 msgstr ""
485 "La función B<freeaddrinfo>() libera la memoria que fue asignada a la lista "
486 "dinámica enlazada I<res>."
487
488 #. type: SS
489 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
490 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
491 #, no-wrap
492 msgid "Extensions to getaddrinfo() for Internationalized Domain Names"
493 msgstr ""
494
495 #. type: Plain text
496 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
497 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
498 msgid ""
499 "Starting with glibc 2.3.4, B<getaddrinfo>() has been extended to "
500 "selectively allow the incoming and outgoing hostnames to be transparently "
501 "converted to and from the Internationalized Domain Name (IDN) format (see "
502 "RFC 3490, I<Internationalizing Domain Names in Applications (IDNA)>). Four "
503 "new flags are defined:"
504 msgstr ""
505
506 #. type: TP
507 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
508 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
509 #, no-wrap
510 msgid "B<AI_IDN>"
511 msgstr "B<AI_IDN>"
512
513 #. type: Plain text
514 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
515 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
516 msgid ""
517 "If this flag is specified, then the node name given in I<node> is converted "
518 "to IDN format if necessary. The source encoding is that of the current "
519 "locale."
520 msgstr ""
521
522 #. Implementation Detail:
523 #. To minimize effects on system performance the implementation might
524 #. want to check whether the input string contains any non-ASCII
525 #. characters. If there are none the IDN step can be skipped completely.
526 #. On systems which allow not-ASCII safe encodings for a locale this
527 #. might be a problem.
528 #. type: Plain text
529 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
530 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
531 msgid ""
532 "If the input name contains non-ASCII characters, then the IDN encoding is "
533 "used. Those parts of the node name (delimited by dots) that contain non-"
534 "ASCII characters are encoded using ASCII Compatible Encoding (ACE) before "
535 "being passed to the name resolution functions."
536 msgstr ""
537
538 #. type: TP
539 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
540 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
541 #, no-wrap
542 msgid "B<AI_CANONIDN>"
543 msgstr "B<AI_CANONIDN>"
544
545 #. type: Plain text
546 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
547 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
548 msgid ""
549 "After a successful name lookup, and if the B<AI_CANONNAME> flag was "
550 "specified, B<getaddrinfo>() will return the canonical name of the node "
551 "corresponding to the I<addrinfo> structure value passed back. The return "
552 "value is an exact copy of the value returned by the name resolution function."
553 msgstr ""
554
555 #
556 #. Implementation Detail:
557 #. If no component of the returned name starts with xn\-\- the IDN
558 #. step can be skipped, therefore avoiding unnecessary slowdowns.
559 #. type: Plain text
560 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
561 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
562 msgid ""
563 "If the name is encoded using ACE, then it will contain the I<xn--> prefix "
564 "for one or more components of the name. To convert these components into a "
565 "readable form the B<AI_CANONIDN> flag can be passed in addition to "
566 "B<AI_CANONNAME>. The resulting string is encoded using the current locale's "
567 "encoding."
568 msgstr ""
569
570 #. type: TP
571 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
572 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
573 #, fuzzy, no-wrap
574 #| msgid "B<AI_IDN_ALLOW_UNASSIGNED>, B<AI_IDN_USE_STD3_ASCII_RULES>"
575 msgid "B<AI_IDN_ALLOW_UNASSIGNED>"
576 msgstr "B<AI_IDN_ALLOW_UNASSIGNED>, B<AI_IDN_USE_STD3_ASCII_RULES>"
577
578 #. type: TQ
579 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
580 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
581 #, fuzzy, no-wrap
582 #| msgid "B<AI_IDN_ALLOW_UNASSIGNED>, B<AI_IDN_USE_STD3_ASCII_RULES>"
583 msgid "B<AI_IDN_USE_STD3_ASCII_RULES>"
584 msgstr "B<AI_IDN_ALLOW_UNASSIGNED>, B<AI_IDN_USE_STD3_ASCII_RULES>"
585
586 #. type: Plain text
587 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
588 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
589 msgid ""
590 "Setting these flags will enable the IDNA_ALLOW_UNASSIGNED (allow unassigned "
591 "Unicode code points) and IDNA_USE_STD3_ASCII_RULES (check output to make "
592 "sure it is a STD3 conforming hostname) flags respectively to be used in the "
593 "IDNA handling."
594 msgstr ""
595
596 #. type: SH
597 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
598 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
599 #, no-wrap
600 msgid "RETURN VALUE"
601 msgstr "VALOR DEVUELTO"
602
603 #. FIXME glibc defines the following additional errors, some which
604 #. can probably be returned by getaddrinfo(); they need to
605 #. be documented.
606 #. #ifdef __USE_GNU
607 #. #define EAI_INPROGRESS -100 /* Processing request in progress. */
608 #. #define EAI_CANCELED -101 /* Request canceled. */
609 #. #define EAI_NOTCANCELED -102 /* Request not canceled. */
610 #. #define EAI_ALLDONE -103 /* All requests done. */
611 #. #define EAI_INTR -104 /* Interrupted by a signal. */
612 #. #define EAI_IDN_ENCODE -105 /* IDN encoding failed. */
613 #. #endif
614 #. type: Plain text
615 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
616 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
617 msgid ""
618 "B<getaddrinfo>() returns 0 if it succeeds, or one of the following nonzero "
619 "error codes:"
620 msgstr ""
621 "B<getaddrinfo>() devuelve 0 si tiene éxito, o uno de los siguientes códigos "
622 "de error:"
623
624 #. type: TP
625 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
626 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
627 #, no-wrap
628 msgid "B<EAI_ADDRFAMILY>"
629 msgstr "B<EAI_ADDRFAMILY>"
630
631 #. Not in SUSv3
632 #. type: Plain text
633 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
634 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
635 msgid ""
636 "The specified network host does not have any network addresses in the "
637 "requested address family."
638 msgstr ""
639 "El host especificado no tiene ninguna dirección de red en la familia de "
640 "direcciones especificada."
641
642 #. type: TP
643 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
644 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
645 #, no-wrap
646 msgid "B<EAI_AGAIN>"
647 msgstr "B<EAI_AGAIN>"
648
649 #. type: Plain text
650 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
651 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
652 msgid ""
653 "The name server returned a temporary failure indication. Try again later."
654 msgstr ""
655 "El servidor de nombres devolvió una indicación de fallo temporal. Pruebe "
656 "más tarde."
657
658 #. type: TP
659 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
660 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
661 #, no-wrap
662 msgid "B<EAI_BADFLAGS>"
663 msgstr "B<EAI_BADFLAGS>"
664
665 #. type: Plain text
666 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
667 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
668 msgid ""
669 "I<hints.ai_flags> contains invalid flags; or, I<hints.ai_flags> included "
670 "B<AI_CANONNAME> and I<node> was NULL."
671 msgstr ""
672
673 #. type: TP
674 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
675 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
676 #, no-wrap
677 msgid "B<EAI_FAIL>"
678 msgstr "B<EAI_FAIL>"
679
680 #. type: Plain text
681 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
682 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
683 msgid "The name server returned a permanent failure indication."
684 msgstr "El servidor de nombres devolvió una indicación de fallo permanente."
685
686 #. type: TP
687 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
688 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
689 #, no-wrap
690 msgid "B<EAI_FAMILY>"
691 msgstr "B<EAI_FAMILY>"
692
693 #. type: Plain text
694 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
695 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
696 msgid "The requested address family is not supported."
697 msgstr "La familia de direcciones solicitada no está soportada."
698
699 #. type: TP
700 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
701 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
702 #, no-wrap
703 msgid "B<EAI_MEMORY>"
704 msgstr "B<EAI_MEMORY>"
705
706 #. type: Plain text
707 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
708 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
709 msgid "Out of memory."
710 msgstr "Sin memoria."
711
712 #. type: TP
713 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
714 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
715 #, no-wrap
716 msgid "B<EAI_NODATA>"
717 msgstr "B<EAI_NODATA>"
718
719 #. Not in SUSv3
720 #. type: Plain text
721 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
722 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
723 msgid ""
724 "The specified network host exists, but does not have any network addresses "
725 "defined."
726 msgstr ""
727 "El host especificado existe, pero no tiene ninguna dirección de red definida."
728
729 #. type: TP
730 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
731 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
732 #, no-wrap
733 msgid "B<EAI_NONAME>"
734 msgstr "B<EAI_NONAME>"
735
736 #. type: Plain text
737 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
738 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
739 msgid ""
740 "The I<node> or I<service> is not known; or both I<node> and I<service> are "
741 "NULL; or B<AI_NUMERICSERV> was specified in I<hints.ai_flags> and I<service> "
742 "was not a numeric port-number string."
743 msgstr ""
744
745 #. type: TP
746 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
747 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
748 #, no-wrap
749 msgid "B<EAI_SERVICE>"
750 msgstr "B<EAI_SERVICE>"
751
752 #. type: Plain text
753 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
754 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
755 msgid ""
756 "The requested service is not available for the requested socket type. It "
757 "may be available through another socket type. For example, this error could "
758 "occur if I<service> was \"shell\" (a service available only on stream "
759 "sockets), and either I<hints.ai_protocol> was B<IPPROTO_UDP>, or "
760 "I<hints.ai_socktype> was B<SOCK_DGRAM>; or the error could occur if "
761 "I<service> was not NULL, and I<hints.ai_socktype> was B<SOCK_RAW> (a socket "
762 "type that does not support the concept of services)."
763 msgstr ""
764
765 #. type: TP
766 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
767 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
768 #, no-wrap
769 msgid "B<EAI_SOCKTYPE>"
770 msgstr "B<EAI_SOCKTYPE>"
771
772 #. type: Plain text
773 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
774 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
775 msgid ""
776 "The requested socket type is not supported. This could occur, for example, "
777 "if I<hints.ai_socktype> and I<hints.ai_protocol> are inconsistent (e.g., "
778 "B<SOCK_DGRAM> and B<IPPROTO_TCP>, respectively)."
779 msgstr ""
780
781 #. type: TP
782 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
783 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
784 #, no-wrap
785 msgid "B<EAI_SYSTEM>"
786 msgstr "B<EAI_SYSTEM>"
787
788 #. type: Plain text
789 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
790 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
791 #, fuzzy
792 #| msgid "Other system error, check I<errno> for details."
793 msgid "Other system error; I<errno> is set to indicate the error."
794 msgstr "Otro error de sistema, compruebe I<errno> para más detalles."
795
796 #. type: Plain text
797 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
798 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
799 msgid ""
800 "The B<gai_strerror>() function translates these error codes to a human "
801 "readable string, suitable for error reporting."
802 msgstr ""
803 "La función B<gai_strerror>() transforma estos códigos de erro en una cadena "
804 "comprensible, adecuada para el informe de errores."
805
806 #. type: SH
807 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
808 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
809 #, no-wrap
810 msgid "FILES"
811 msgstr "ARCHIVOS"
812
813 #. type: Plain text
814 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
815 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
816 msgid "I</etc/gai.conf>"
817 msgstr "I</etc/gai.conf>"
818
819 #. type: SH
820 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
821 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
822 #, no-wrap
823 msgid "ATTRIBUTES"
824 msgstr "ATRIBUTOS"
825
826 #. type: Plain text
827 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
828 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
829 msgid ""
830 "For an explanation of the terms used in this section, see B<attributes>(7)."
831 msgstr ""
832 "Para obtener una explicación de los términos usados en esta sección, véase "
833 "B<attributes>(7)."
834
835 #. type: tbl table
836 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
837 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
838 #, no-wrap
839 msgid "Interface"
840 msgstr "Interfaz"
841
842 #. type: tbl table
843 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
844 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
845 #, no-wrap
846 msgid "Attribute"
847 msgstr "Atributo"
848
849 #. type: tbl table
850 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
851 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
852 #, no-wrap
853 msgid "Value"
854 msgstr "Valor"
855
856 #. type: tbl table
857 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
858 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
859 #, no-wrap
860 msgid ".na\n"
861 msgstr ".na\n"
862
863 #. type: tbl table
864 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
865 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
866 #, no-wrap
867 msgid ".nh\n"
868 msgstr ".nh\n"
869
870 #. type: TP
871 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
872 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
873 #, no-wrap
874 msgid "B<getaddrinfo>()"
875 msgstr "B<getaddrinfo>()"
876
877 #. type: tbl table
878 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
879 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
880 #, no-wrap
881 msgid "Thread safety"
882 msgstr "Seguridad del hilo"
883
884 #. type: tbl table
885 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
886 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
887 #, fuzzy, no-wrap
888 #| msgid "MT-Safe locale"
889 msgid "MT-Safe env locale"
890 msgstr "Configuración regional de multi-hilo seguro"
891
892 #. type: tbl table
893 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
894 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
895 #, no-wrap
896 msgid ""
897 "B<freeaddrinfo>(),\n"
898 "B<gai_strerror>()"
899 msgstr ""
900 "B<freeaddrinfo>(),\n"
901 "B<gai_strerror>()"
902
903 #. type: tbl table
904 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
905 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
906 #, no-wrap
907 msgid "MT-Safe"
908 msgstr "Multi-hilo seguro"
909
910 #. type: SH
911 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
912 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
913 #, no-wrap
914 msgid "VERSIONS"
915 msgstr "VERSIONES"
916
917 #. POSIX.1-2001, POSIX.1-2008
918 #. type: Plain text
919 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
920 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
921 msgid ""
922 "According to POSIX.1, specifying I<hints> as NULL should cause I<ai_flags> "
923 "to be assumed as 0. The GNU C library instead assumes a value of "
924 "B<(AI_V4MAPPED\\ |\\ AI_ADDRCONFIG)> for this case, since this value is "
925 "considered an improvement on the specification."
926 msgstr ""
927
928 #. type: SH
929 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
930 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
931 #, no-wrap
932 msgid "STANDARDS"
933 msgstr "ESTÁNDARES"
934
935 #. type: Plain text
936 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
937 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
938 msgid "POSIX.1-2008."
939 msgstr "POSIX.1-2008."
940
941 #. type: Plain text
942 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
943 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
944 msgid "RFC\\ 2553."
945 msgstr ""
946
947 #. type: SH
948 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
949 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
950 #, no-wrap
951 msgid "HISTORY"
952 msgstr "HISTORIAL"
953
954 #. type: Plain text
955 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
956 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
957 msgid "POSIX.1-2001."
958 msgstr "POSIX.1-2001."
959
960 #. type: TP
961 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
962 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
963 #, fuzzy, no-wrap
964 #| msgid "B<EAI_ADDRFAMILY>"
965 msgid "B<AI_ADDRCONFIG>"
966 msgstr "B<EAI_ADDRFAMILY>"
967
968 #. type: TQ
969 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
970 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
971 #, fuzzy, no-wrap
972 #| msgid "B<LC_ALL>"
973 msgid "B<AI_ALL>"
974 msgstr "B<LC_ALL>"
975
976 #. type: TQ
977 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
978 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
979 #, fuzzy, no-wrap
980 #| msgid "B<AI_IDN>"
981 msgid "B<AI_V4MAPPED>"
982 msgstr "B<AI_IDN>"
983
984 #. type: Plain text
985 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
986 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
987 #, fuzzy
988 #| msgid "Since glibc 2.2.2:"
989 msgid "glibc 2.3.3."
990 msgstr "Desde glibc 2.2.2:"
991
992 #. type: TP
993 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
994 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
995 #, fuzzy, no-wrap
996 #| msgid "B<LC_NUMERIC>"
997 msgid "B<AI_NUMERICSERV>"
998 msgstr "B<LC_NUMERIC>"
999
1000 #. type: Plain text
1001 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1002 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1003 msgid "glibc 2.3.4."
1004 msgstr "glibc 2.3.4."
1005
1006 #. type: SH
1007 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1008 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1009 #, no-wrap
1010 msgid "NOTES"
1011 msgstr "NOTAS"
1012
1013 #. type: Plain text
1014 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1015 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1016 msgid ""
1017 "B<getaddrinfo>() supports the I<address>B<%>I<scope-id> notation for "
1018 "specifying the IPv6 scope-ID."
1019 msgstr ""
1020
1021 #. type: SH
1022 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1023 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1024 #, no-wrap
1025 msgid "EXAMPLES"
1026 msgstr "EJEMPLOS"
1027
1028 #. getnameinfo.3 refers to this example
1029 #. socket.2 refers to this example
1030 #. bind.2 refers to this example
1031 #. connect.2 refers to this example
1032 #. recvfrom.2 refers to this example
1033 #. sendto.2 refers to this example
1034 #. type: Plain text
1035 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1036 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1037 msgid ""
1038 "The following programs demonstrate the use of B<getaddrinfo>(), "
1039 "B<gai_strerror>(), B<freeaddrinfo>(), and B<getnameinfo>(3). The programs "
1040 "are an echo server and client for UDP datagrams."
1041 msgstr ""
1042
1043 #. type: SS
1044 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1045 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1046 #, no-wrap
1047 msgid "Server program"
1048 msgstr ""
1049
1050 #. type: Plain text
1051 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1052 #: opensuse-tumbleweed
1053 #, no-wrap
1054 msgid ""
1055 "#include E<lt>netdb.hE<gt>\n"
1056 "#include E<lt>stdio.hE<gt>\n"
1057 "#include E<lt>stdlib.hE<gt>\n"
1058 "#include E<lt>string.hE<gt>\n"
1059 "#include E<lt>sys/socket.hE<gt>\n"
1060 "#include E<lt>sys/types.hE<gt>\n"
1061 "#include E<lt>unistd.hE<gt>\n"
1062 "\\&\n"
1063 "#define BUF_SIZE 500\n"
1064 "\\&\n"
1065 "int\n"
1066 "main(int argc, char *argv[])\n"
1067 "{\n"
1068 " int sfd, s;\n"
1069 " char buf[BUF_SIZE];\n"
1070 " ssize_t nread;\n"
1071 " socklen_t peer_addrlen;\n"
1072 " struct addrinfo hints;\n"
1073 " struct addrinfo *result, *rp;\n"
1074 " struct sockaddr_storage peer_addr;\n"
1075 "\\&\n"
1076 " if (argc != 2) {\n"
1077 " fprintf(stderr, \"Usage: %s port\\[rs]n\", argv[0]);\n"
1078 " exit(EXIT_FAILURE);\n"
1079 " }\n"
1080 "\\&\n"
1081 " memset(&hints, 0, sizeof(hints));\n"
1082 " hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */\n"
1083 " hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n"
1084 " hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */\n"
1085 " hints.ai_protocol = 0; /* Any protocol */\n"
1086 " hints.ai_canonname = NULL;\n"
1087 " hints.ai_addr = NULL;\n"
1088 " hints.ai_next = NULL;\n"
1089 "\\&\n"
1090 " s = getaddrinfo(NULL, argv[1], &hints, &result);\n"
1091 " if (s != 0) {\n"
1092 " fprintf(stderr, \"getaddrinfo: %s\\[rs]n\", gai_strerror(s));\n"
1093 " exit(EXIT_FAILURE);\n"
1094 " }\n"
1095 "\\&\n"
1096 " /* getaddrinfo() returns a list of address structures.\n"
1097 " Try each address until we successfully bind(2).\n"
1098 " If socket(2) (or bind(2)) fails, we (close the socket\n"
1099 " and) try the next address. */\n"
1100 "\\&\n"
1101 " for (rp = result; rp != NULL; rp = rp-E<gt>ai_next) {\n"
1102 " sfd = socket(rp-E<gt>ai_family, rp-E<gt>ai_socktype,\n"
1103 " rp-E<gt>ai_protocol);\n"
1104 " if (sfd == -1)\n"
1105 " continue;\n"
1106 "\\&\n"
1107 " if (bind(sfd, rp-E<gt>ai_addr, rp-E<gt>ai_addrlen) == 0)\n"
1108 " break; /* Success */\n"
1109 "\\&\n"
1110 " close(sfd);\n"
1111 " }\n"
1112 "\\&\n"
1113 " freeaddrinfo(result); /* No longer needed */\n"
1114 "\\&\n"
1115 " if (rp == NULL) { /* No address succeeded */\n"
1116 " fprintf(stderr, \"Could not bind\\[rs]n\");\n"
1117 " exit(EXIT_FAILURE);\n"
1118 " }\n"
1119 "\\&\n"
1120 " /* Read datagrams and echo them back to sender. */\n"
1121 "\\&\n"
1122 " for (;;) {\n"
1123 " char host[NI_MAXHOST], service[NI_MAXSERV];\n"
1124 "\\&\n"
1125 " peer_addrlen = sizeof(peer_addr);\n"
1126 " nread = recvfrom(sfd, buf, BUF_SIZE, 0,\n"
1127 " (struct sockaddr *) &peer_addr, &peer_addrlen);\n"
1128 " if (nread == -1)\n"
1129 " continue; /* Ignore failed request */\n"
1130 "\\&\n"
1131 " s = getnameinfo((struct sockaddr *) &peer_addr,\n"
1132 " peer_addrlen, host, NI_MAXHOST,\n"
1133 " service, NI_MAXSERV, NI_NUMERICSERV);\n"
1134 " if (s == 0)\n"
1135 " printf(\"Received %zd bytes from %s:%s\\[rs]n\",\n"
1136 " nread, host, service);\n"
1137 " else\n"
1138 " fprintf(stderr, \"getnameinfo: %s\\[rs]n\", gai_strerror(s));\n"
1139 "\\&\n"
1140 " if (sendto(sfd, buf, nread, 0, (struct sockaddr *) &peer_addr,\n"
1141 " peer_addrlen) != nread)\n"
1142 " {\n"
1143 " fprintf(stderr, \"Error sending response\\[rs]n\");\n"
1144 " }\n"
1145 " }\n"
1146 "}\n"
1147 msgstr ""
1148
1149 #. SRC END
1150 #. type: SS
1151 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1152 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1153 #, no-wrap
1154 msgid "Client program"
1155 msgstr ""
1156
1157 #. type: Plain text
1158 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1159 #: opensuse-tumbleweed
1160 #, no-wrap
1161 msgid ""
1162 "#include E<lt>netdb.hE<gt>\n"
1163 "#include E<lt>stdio.hE<gt>\n"
1164 "#include E<lt>stdlib.hE<gt>\n"
1165 "#include E<lt>string.hE<gt>\n"
1166 "#include E<lt>sys/socket.hE<gt>\n"
1167 "#include E<lt>sys/types.hE<gt>\n"
1168 "#include E<lt>unistd.hE<gt>\n"
1169 "\\&\n"
1170 "#define BUF_SIZE 500\n"
1171 "\\&\n"
1172 "int\n"
1173 "main(int argc, char *argv[])\n"
1174 "{\n"
1175 " int sfd, s;\n"
1176 " char buf[BUF_SIZE];\n"
1177 " size_t size;\n"
1178 " ssize_t nread;\n"
1179 " struct addrinfo hints;\n"
1180 " struct addrinfo *result, *rp;\n"
1181 "\\&\n"
1182 " if (argc E<lt> 3) {\n"
1183 " fprintf(stderr, \"Usage: %s host port msg...\\[rs]n\", argv[0]);\n"
1184 " exit(EXIT_FAILURE);\n"
1185 " }\n"
1186 "\\&\n"
1187 " /* Obtain address(es) matching host/port. */\n"
1188 "\\&\n"
1189 " memset(&hints, 0, sizeof(hints));\n"
1190 " hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */\n"
1191 " hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n"
1192 " hints.ai_flags = 0;\n"
1193 " hints.ai_protocol = 0; /* Any protocol */\n"
1194 "\\&\n"
1195 " s = getaddrinfo(argv[1], argv[2], &hints, &result);\n"
1196 " if (s != 0) {\n"
1197 " fprintf(stderr, \"getaddrinfo: %s\\[rs]n\", gai_strerror(s));\n"
1198 " exit(EXIT_FAILURE);\n"
1199 " }\n"
1200 "\\&\n"
1201 " /* getaddrinfo() returns a list of address structures.\n"
1202 " Try each address until we successfully connect(2).\n"
1203 " If socket(2) (or connect(2)) fails, we (close the socket\n"
1204 " and) try the next address. */\n"
1205 "\\&\n"
1206 " for (rp = result; rp != NULL; rp = rp-E<gt>ai_next) {\n"
1207 " sfd = socket(rp-E<gt>ai_family, rp-E<gt>ai_socktype,\n"
1208 " rp-E<gt>ai_protocol);\n"
1209 " if (sfd == -1)\n"
1210 " continue;\n"
1211 "\\&\n"
1212 " if (connect(sfd, rp-E<gt>ai_addr, rp-E<gt>ai_addrlen) != -1)\n"
1213 " break; /* Success */\n"
1214 "\\&\n"
1215 " close(sfd);\n"
1216 " }\n"
1217 "\\&\n"
1218 " freeaddrinfo(result); /* No longer needed */\n"
1219 "\\&\n"
1220 " if (rp == NULL) { /* No address succeeded */\n"
1221 " fprintf(stderr, \"Could not connect\\[rs]n\");\n"
1222 " exit(EXIT_FAILURE);\n"
1223 " }\n"
1224 "\\&\n"
1225 " /* Send remaining command-line arguments as separate\n"
1226 " datagrams, and read responses from server. */\n"
1227 "\\&\n"
1228 " for (size_t j = 3; j E<lt> argc; j++) {\n"
1229 " size = strlen(argv[j]) + 1;\n"
1230 " /* +1 for terminating null byte */\n"
1231 "\\&\n"
1232 " if (size E<gt> BUF_SIZE) {\n"
1233 " fprintf(stderr,\n"
1234 " \"Ignoring long message in argument %zu\\[rs]n\", j);\n"
1235 " continue;\n"
1236 " }\n"
1237 "\\&\n"
1238 " if (write(sfd, argv[j], size) != size) {\n"
1239 " fprintf(stderr, \"partial/failed write\\[rs]n\");\n"
1240 " exit(EXIT_FAILURE);\n"
1241 " }\n"
1242 "\\&\n"
1243 " nread = read(sfd, buf, BUF_SIZE);\n"
1244 " if (nread == -1) {\n"
1245 " perror(\"read\");\n"
1246 " exit(EXIT_FAILURE);\n"
1247 " }\n"
1248 "\\&\n"
1249 " printf(\"Received %zd bytes: %s\\[rs]n\", nread, buf);\n"
1250 " }\n"
1251 "\\&\n"
1252 " exit(EXIT_SUCCESS);\n"
1253 "}\n"
1254 msgstr ""
1255
1256 #. SRC END
1257 #. type: SH
1258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1260 #, no-wrap
1261 msgid "SEE ALSO"
1262 msgstr "VÉASE TAMBIÉN"
1263
1264 #. .BR getipnodebyaddr (3),
1265 #. .BR getipnodebyname (3),
1266 #. type: Plain text
1267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1268 #: mageia-cauldron
1269 msgid ""
1270 "B<getaddrinfo_a>(3), B<gethostbyname>(3), B<getnameinfo>(3), B<inet>(3), "
1271 "B<gai.conf>(5), B<hostname>(7), B<ip>(7)"
1272 msgstr ""
1273 "B<getaddrinfo_a>(3), B<gethostbyname>(3), B<getnameinfo>(3), B<inet>(3), "
1274 "B<gai.conf>(5), B<hostname>(7), B<ip>(7)"
1275
1276 #. type: TH
1277 #: debian-trixie
1278 #, no-wrap
1279 msgid "2024-06-15"
1280 msgstr "15 Junio 2024"
1281
1282 #. type: TH
1283 #: debian-trixie
1284 #, no-wrap
1285 msgid "Linux man-pages 6.9.1"
1286 msgstr "Páginas de Manual de Linux 6.9.1"
1287
1288 #. type: Plain text
1289 #: debian-trixie
1290 msgid "Standard C library (I<libc>, I<-lc>)"
1291 msgstr "Biblioteca Estándar C (I<libc>, I<-lc>)"
1292
1293 #. type: Plain text
1294 #: debian-trixie
1295 msgid ""
1296 "A pointer to the socket address is placed in the I<ai_addr> field, and the "
1297 "length of the socket address, in bytes, is placed in the I<ai_addrlen> field."
1298 msgstr ""
1299
1300 #. type: Plain text
1301 #: debian-trixie fedora-44 fedora-rawhide
1302 #, no-wrap
1303 msgid ""
1304 "#include E<lt>netdb.hE<gt>\n"
1305 "#include E<lt>stdio.hE<gt>\n"
1306 "#include E<lt>stdlib.hE<gt>\n"
1307 "#include E<lt>string.hE<gt>\n"
1308 "#include E<lt>sys/socket.hE<gt>\n"
1309 "#include E<lt>sys/types.hE<gt>\n"
1310 "#include E<lt>unistd.hE<gt>\n"
1311 "\\&\n"
1312 "#define BUF_SIZE 500\n"
1313 "\\&\n"
1314 "int\n"
1315 "main(int argc, char *argv[])\n"
1316 "{\n"
1317 " int sfd, s;\n"
1318 " char buf[BUF_SIZE];\n"
1319 " ssize_t nread;\n"
1320 " socklen_t peer_addrlen;\n"
1321 " struct addrinfo hints;\n"
1322 " struct addrinfo *result, *rp;\n"
1323 " struct sockaddr_storage peer_addr;\n"
1324 "\\&\n"
1325 " if (argc != 2) {\n"
1326 " fprintf(stderr, \"Usage: %s port\\[rs]n\", argv[0]);\n"
1327 " exit(EXIT_FAILURE);\n"
1328 " }\n"
1329 "\\&\n"
1330 " memset(&hints, 0, sizeof(hints));\n"
1331 " hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */\n"
1332 " hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n"
1333 " hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */\n"
1334 " hints.ai_protocol = 0; /* Any protocol */\n"
1335 " hints.ai_canonname = NULL;\n"
1336 " hints.ai_addr = NULL;\n"
1337 " hints.ai_next = NULL;\n"
1338 "\\&\n"
1339 " s = getaddrinfo(NULL, argv[1], &hints, &result);\n"
1340 " if (s != 0) {\n"
1341 " fprintf(stderr, \"getaddrinfo: %s\\[rs]n\", gai_strerror(s));\n"
1342 " exit(EXIT_FAILURE);\n"
1343 " }\n"
1344 "\\&\n"
1345 " /* getaddrinfo() returns a list of address structures.\n"
1346 " Try each address until we successfully bind(2).\n"
1347 " If socket(2) (or bind(2)) fails, we (close the socket\n"
1348 " and) try the next address. */\n"
1349 "\\&\n"
1350 " for (rp = result; rp != NULL; rp = rp-E<gt>ai_next) {\n"
1351 " sfd = socket(rp-E<gt>ai_family, rp-E<gt>ai_socktype,\n"
1352 " rp-E<gt>ai_protocol);\n"
1353 " if (sfd == -1)\n"
1354 " continue;\n"
1355 "\\&\n"
1356 " if (bind(sfd, rp-E<gt>ai_addr, rp-E<gt>ai_addrlen) == 0)\n"
1357 " break; /* Success */\n"
1358 "\\&\n"
1359 " close(sfd);\n"
1360 " }\n"
1361 "\\&\n"
1362 " freeaddrinfo(result); /* No longer needed */\n"
1363 "\\&\n"
1364 " if (rp == NULL) { /* No address succeeded */\n"
1365 " fprintf(stderr, \"Could not bind\\[rs]n\");\n"
1366 " exit(EXIT_FAILURE);\n"
1367 " }\n"
1368 "\\&\n"
1369 " /* Read datagrams and echo them back to sender. */\n"
1370 "\\&\n"
1371 " for (;;) {\n"
1372 " char host[NI_MAXHOST], service[NI_MAXSERV];\n"
1373 "\\&\n"
1374 " peer_addrlen = sizeof(peer_addr);\n"
1375 " nread = recvfrom(sfd, buf, BUF_SIZE, 0,\n"
1376 " (struct sockaddr *) &peer_addr, &peer_addrlen);\n"
1377 " if (nread == -1)\n"
1378 " continue; /* Ignore failed request */\n"
1379 "\\&\n"
1380 " s = getnameinfo((struct sockaddr *) &peer_addr,\n"
1381 " peer_addrlen, host, NI_MAXHOST,\n"
1382 " service, NI_MAXSERV, NI_NUMERICSERV);\n"
1383 " if (s == 0)\n"
1384 " printf(\"Received %zd bytes from %s:%s\\[rs]n\",\n"
1385 " nread, host, service);\n"
1386 " else\n"
1387 " fprintf(stderr, \"getnameinfo: %s\\[rs]n\", gai_strerror(s));\n"
1388 "\\&\n"
1389 " if (sendto(sfd, buf, nread, 0, (struct sockaddr *) &peer_addr,\n"
1390 " peer_addrlen) != nread)\n"
1391 " {\n"
1392 " fprintf(stderr, \"Error sending response\\[rs]n\");\n"
1393 " }\n"
1394 " }\n"
1395 "}\n"
1396 msgstr ""
1397
1398 #. type: Plain text
1399 #: debian-trixie
1400 #, no-wrap
1401 msgid ""
1402 "#include E<lt>netdb.hE<gt>\n"
1403 "#include E<lt>stdio.hE<gt>\n"
1404 "#include E<lt>stdlib.hE<gt>\n"
1405 "#include E<lt>string.hE<gt>\n"
1406 "#include E<lt>sys/socket.hE<gt>\n"
1407 "#include E<lt>sys/types.hE<gt>\n"
1408 "#include E<lt>unistd.hE<gt>\n"
1409 "\\&\n"
1410 "#define BUF_SIZE 500\n"
1411 "\\&\n"
1412 "int\n"
1413 "main(int argc, char *argv[])\n"
1414 "{\n"
1415 " int sfd, s;\n"
1416 " char buf[BUF_SIZE];\n"
1417 " size_t len;\n"
1418 " ssize_t nread;\n"
1419 " struct addrinfo hints;\n"
1420 " struct addrinfo *result, *rp;\n"
1421 "\\&\n"
1422 " if (argc E<lt> 3) {\n"
1423 " fprintf(stderr, \"Usage: %s host port msg...\\[rs]n\", argv[0]);\n"
1424 " exit(EXIT_FAILURE);\n"
1425 " }\n"
1426 "\\&\n"
1427 " /* Obtain address(es) matching host/port. */\n"
1428 "\\&\n"
1429 " memset(&hints, 0, sizeof(hints));\n"
1430 " hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */\n"
1431 " hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n"
1432 " hints.ai_flags = 0;\n"
1433 " hints.ai_protocol = 0; /* Any protocol */\n"
1434 "\\&\n"
1435 " s = getaddrinfo(argv[1], argv[2], &hints, &result);\n"
1436 " if (s != 0) {\n"
1437 " fprintf(stderr, \"getaddrinfo: %s\\[rs]n\", gai_strerror(s));\n"
1438 " exit(EXIT_FAILURE);\n"
1439 " }\n"
1440 "\\&\n"
1441 " /* getaddrinfo() returns a list of address structures.\n"
1442 " Try each address until we successfully connect(2).\n"
1443 " If socket(2) (or connect(2)) fails, we (close the socket\n"
1444 " and) try the next address. */\n"
1445 "\\&\n"
1446 " for (rp = result; rp != NULL; rp = rp-E<gt>ai_next) {\n"
1447 " sfd = socket(rp-E<gt>ai_family, rp-E<gt>ai_socktype,\n"
1448 " rp-E<gt>ai_protocol);\n"
1449 " if (sfd == -1)\n"
1450 " continue;\n"
1451 "\\&\n"
1452 " if (connect(sfd, rp-E<gt>ai_addr, rp-E<gt>ai_addrlen) != -1)\n"
1453 " break; /* Success */\n"
1454 "\\&\n"
1455 " close(sfd);\n"
1456 " }\n"
1457 "\\&\n"
1458 " freeaddrinfo(result); /* No longer needed */\n"
1459 "\\&\n"
1460 " if (rp == NULL) { /* No address succeeded */\n"
1461 " fprintf(stderr, \"Could not connect\\[rs]n\");\n"
1462 " exit(EXIT_FAILURE);\n"
1463 " }\n"
1464 "\\&\n"
1465 " /* Send remaining command-line arguments as separate\n"
1466 " datagrams, and read responses from server. */\n"
1467 "\\&\n"
1468 " for (size_t j = 3; j E<lt> argc; j++) {\n"
1469 " len = strlen(argv[j]) + 1;\n"
1470 " /* +1 for terminating null byte */\n"
1471 "\\&\n"
1472 " if (len E<gt> BUF_SIZE) {\n"
1473 " fprintf(stderr,\n"
1474 " \"Ignoring long message in argument %zu\\[rs]n\", j);\n"
1475 " continue;\n"
1476 " }\n"
1477 "\\&\n"
1478 " if (write(sfd, argv[j], len) != len) {\n"
1479 " fprintf(stderr, \"partial/failed write\\[rs]n\");\n"
1480 " exit(EXIT_FAILURE);\n"
1481 " }\n"
1482 "\\&\n"
1483 " nread = read(sfd, buf, BUF_SIZE);\n"
1484 " if (nread == -1) {\n"
1485 " perror(\"read\");\n"
1486 " exit(EXIT_FAILURE);\n"
1487 " }\n"
1488 "\\&\n"
1489 " printf(\"Received %zd bytes: %s\\[rs]n\", nread, buf);\n"
1490 " }\n"
1491 "\\&\n"
1492 " exit(EXIT_SUCCESS);\n"
1493 "}\n"
1494 msgstr ""
1495
1496 #. type: TH
1497 #: fedora-44 fedora-rawhide
1498 #, no-wrap
1499 msgid "2024-11-17"
1500 msgstr "17 Noviembre 2024"
1501
1502 #. type: TH
1503 #: fedora-44 fedora-rawhide
1504 #, no-wrap
1505 msgid "Linux man-pages 6.13"
1506 msgstr "Páginas de Manual de Linux 6.13"
1507
1508 #. type: Plain text
1509 #: fedora-44 fedora-rawhide
1510 #, no-wrap
1511 msgid ""
1512 "#include E<lt>netdb.hE<gt>\n"
1513 "#include E<lt>stdio.hE<gt>\n"
1514 "#include E<lt>stdlib.hE<gt>\n"
1515 "#include E<lt>string.hE<gt>\n"
1516 "#include E<lt>sys/socket.hE<gt>\n"
1517 "#include E<lt>sys/types.hE<gt>\n"
1518 "#include E<lt>unistd.hE<gt>\n"
1519 "\\&\n"
1520 "#define BUF_SIZE 500\n"
1521 "\\&\n"
1522 "int\n"
1523 "main(int argc, char *argv[])\n"
1524 "{\n"
1525 " int sfd, s;\n"
1526 " char buf[BUF_SIZE];\n"
1527 " size_t size;\n"
1528 " ssize_t nread;\n"
1529 " struct addrinfo hints;\n"
1530 " struct addrinfo *result, *rp;\n"
1531 "\\&\n"
1532 " if (argc E<lt> 3) {\n"
1533 " fprintf(stderr, \"Usage: %s host port msg...\\[rs]n\", argv[0]);\n"
1534 " exit(EXIT_FAILURE);\n"
1535 " }\n"
1536 "\\&\n"
1537 " /* Obtain address(es) matching host/port. */\n"
1538 "\\&\n"
1539 " memset(&hints, 0, sizeof(hints));\n"
1540 " hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */\n"
1541 " hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n"
1542 " hints.ai_flags = 0;\n"
1543 " hints.ai_protocol = 0; /* Any protocol */\n"
1544 "\\&\n"
1545 " s = getaddrinfo(argv[1], argv[2], &hints, &result);\n"
1546 " if (s != 0) {\n"
1547 " fprintf(stderr, \"getaddrinfo: %s\\[rs]n\", gai_strerror(s));\n"
1548 " exit(EXIT_FAILURE);\n"
1549 " }\n"
1550 "\\&\n"
1551 " /* getaddrinfo() returns a list of address structures.\n"
1552 " Try each address until we successfully connect(2).\n"
1553 " If socket(2) (or connect(2)) fails, we (close the socket\n"
1554 " and) try the next address. */\n"
1555 "\\&\n"
1556 " for (rp = result; rp != NULL; rp = rp-E<gt>ai_next) {\n"
1557 " sfd = socket(rp-E<gt>ai_family, rp-E<gt>ai_socktype,\n"
1558 " rp-E<gt>ai_protocol);\n"
1559 " if (sfd == -1)\n"
1560 " continue;\n"
1561 "\\&\n"
1562 " if (connect(sfd, rp-E<gt>ai_addr, rp-E<gt>ai_addrlen) != -1)\n"
1563 " break; /* Success */\n"
1564 "\\&\n"
1565 " close(sfd);\n"
1566 " }\n"
1567 "\\&\n"
1568 " freeaddrinfo(result); /* No longer needed */\n"
1569 "\\&\n"
1570 " if (rp == NULL) { /* No address succeeded */\n"
1571 " fprintf(stderr, \"Could not connect\\[rs]n\");\n"
1572 " exit(EXIT_FAILURE);\n"
1573 " }\n"
1574 "\\&\n"
1575 " /* Send remaining command-line arguments as separate\n"
1576 " datagrams, and read responses from server. */\n"
1577 "\\&\n"
1578 " for (size_t j = 3; j E<lt> argc; j++) {\n"
1579 " size = strlen(argv[j]) + 1;\n"
1580 " /* +1 for terminating null byte */\n"
1581 "\\&\n"
1582 " if (size E<gt> BUF_SIZE) {\n"
1583 " fprintf(stderr,\n"
1584 " \"Ignoring long message in argument %zu\\[rs]n\", j);\n"
1585 " continue;\n"
1586 " }\n"
1587 "\\&\n"
1588 " if (write(sfd, argv[j], size) != size) {\n"
1589 " fprintf(stderr, \"partial/failed write\\[rs]n\");\n"
1590 " exit(EXIT_FAILURE);\n"
1591 " }\n"
1592 "\\&\n"
1593 " nread = read(sfd, buf, BUF_SIZE);\n"
1594 " if (nread == -1) {\n"
1595 " perror(\"read\");\n"
1596 " exit(EXIT_FAILURE);\n"
1597 " }\n"
1598 "\\&\n"
1599 " printf(\"Received %zd bytes: %s\\[rs]n\", nread, buf);\n"
1600 " }\n"
1601 "\\&\n"
1602 " exit(EXIT_SUCCESS);\n"
1603 "}\n"
1604 msgstr ""
1605
1606 #. type: TH
1607 #: mageia-cauldron
1608 #, no-wrap
1609 msgid "Linux man-pages 6.17"
1610 msgstr "Páginas de Manual de Linux 6.17"
1611
1612 #. type: TH
1613 #: opensuse-leap-16-1 opensuse-tumbleweed
1614 #, no-wrap
1615 msgid "Linux man-pages (unreleased)"
1616 msgstr "Páginas de Manual de Linux (no publicadas)"
1617
1618 #. .BR getipnodebyaddr (3),
1619 #. .BR getipnodebyname (3),
1620 #. type: Plain text
1621 #: opensuse-leap-16-1 opensuse-tumbleweed
1622 msgid ""
1623 "B<getaddrinfo_a>(3), B<gethostbyname>(3), B<getnameinfo>(3), B<gai.conf>(5), "
1624 "B<inet>(3), B<gai.conf>(5), B<hostname>(7), B<ip>(7)"
1625 msgstr ""
1626 "B<getaddrinfo_a>(3), B<gethostbyname>(3), B<getnameinfo>(3), B<gai.conf>(5), "
1627 "B<inet>(3), B<gai.conf>(5), B<hostname>(7), B<ip>(7)"