Debian Codegraph @

po/pt_BR/man2/bind.2.po

raw
1 # Brazilian Portuguese translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Marcelo D. Beckmann <[email protected]>, 2000.
5 # Fábio Henrique F. Silva <[email protected]>, 2000.
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: manpages-l10n\n"
9 "POT-Creation-Date: 2026-06-05 06:19+0200\n"
10 "PO-Revision-Date: 2000-08-21 21:29+0200\n"
11 "Last-Translator: Fábio Henrique F. Silva <[email protected]>\n"
12 "Language-Team: Brazilian Portuguese <debian-l10n-"
13 "[email protected]>\n"
14 "Language: pt_BR\n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
19 "X-Generator: Lokalize 20.04.1\n"
20
21 #. type: TH
22 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
23 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
24 #, no-wrap
25 msgid "bind"
26 msgstr "bind"
27
28 #. type: TH
29 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
30 #: opensuse-tumbleweed
31 #, no-wrap
32 msgid "2026-02-08"
33 msgstr "8 fevereiro 2026"
34
35 #. type: TH
36 #: archlinux debian-unstable
37 #, fuzzy, no-wrap
38 #| msgid "Linux man-pages 6.17"
39 msgid "Linux man-pages 6.18"
40 msgstr "Linux man-pages 6.17"
41
42 #. type: SH
43 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
44 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
45 #, no-wrap
46 msgid "NAME"
47 msgstr "NOME"
48
49 #. type: Plain text
50 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
51 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
52 msgid "bind - bind a name to a socket"
53 msgstr "bind - associa um nome a um soquete"
54
55 #. type: SH
56 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
57 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
58 #, no-wrap
59 msgid "LIBRARY"
60 msgstr "BIBLIOTECA"
61
62 #. type: Plain text
63 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
64 #: opensuse-leap-16-1 opensuse-tumbleweed
65 msgid "Standard C library (I<libc>,\\ I<-lc>)"
66 msgstr "Biblioteca C Padrão (I<libc>,\\ I<-lc>)"
67
68 #. type: SH
69 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
70 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
71 #, no-wrap
72 msgid "SYNOPSIS"
73 msgstr "SINOPSE"
74
75 #. type: Plain text
76 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
77 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
78 #, no-wrap
79 msgid "B<#include E<lt>sys/socket.hE<gt>>\n"
80 msgstr "B<#include E<lt>sys/socket.hE<gt>>\n"
81
82 #. type: Plain text
83 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
84 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
85 #, no-wrap
86 msgid ""
87 "B<int bind(int >I<sockfd>B<, const struct sockaddr *>I<addr>B<,>\n"
88 "B< socklen_t >I<addrlen>B<);>\n"
89 msgstr ""
90 "B<int bind(int >I<sockfd>B<, const struct sockaddr *>I<addr>B<,>\n"
91 "B< socklen_t >I<addrlen>B<);>\n"
92
93 #. type: SH
94 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
95 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
96 #, no-wrap
97 msgid "DESCRIPTION"
98 msgstr "DESCRIÇÃO"
99
100 #. type: Plain text
101 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
102 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
103 msgid ""
104 "When a socket is created with B<socket>(2), it exists in a name space "
105 "(address family) but has no address assigned to it. B<bind>() assigns the "
106 "address specified by I<addr> to the socket referred to by the file "
107 "descriptor I<sockfd>. I<addrlen> specifies the size, in bytes, of the "
108 "address structure pointed to by I<addr>. Traditionally, this operation is "
109 "called \\[lq]assigning a name to a socket\\[rq]."
110 msgstr ""
111
112 #. type: Plain text
113 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
114 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
115 msgid ""
116 "It is normally necessary to assign a local address using B<bind>() before a "
117 "B<SOCK_STREAM> socket may receive connections (see B<accept>(2))."
118 msgstr ""
119 "É normalmente necessário atribuir um endereço local usando B<bind>() para "
120 "que um soquete B<SOCK_STREAM> possa receber conexões (veja B<accept>(2))."
121
122 #. type: Plain text
123 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
124 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
125 #, fuzzy
126 #| msgid ""
127 #| "The rules used in name binding vary between address families. Consult "
128 #| "the manual entries in Section 7 for detailed information. For B<AF_INET> "
129 #| "see B<ip>(7), for B<AF_UNIX> see B<unix>(7), for B<AF_APPLETALK> see "
130 #| "B<ddp>(7), for B<AF_PACKET> see B<packet>(7), for B<AF_X25> see "
131 #| "B<x25>(7) and for B<AF_NETLINK> see B<netlink>(7)."
132 msgid ""
133 "The rules used in name binding vary between address families. Consult the "
134 "manual entries in Section 7 for detailed information. For B<AF_INET>, see "
135 "B<ip>(7); for B<AF_INET6>, see B<ipv6>(7); for B<AF_UNIX>, see B<unix>(7); "
136 "for B<AF_APPLETALK>, see B<ddp>(7); for B<AF_PACKET>, see B<packet>(7); for "
137 "B<AF_X25>, see B<x25>(7); and for B<AF_NETLINK>, see B<netlink>(7)."
138 msgstr ""
139 "As regras usadas na associação de nomes variam entre as familias de "
140 "endereços. Consulte a entrada do manual na Seção 7 para informações "
141 "detalhadas. Para B<AF_INET> veja B<ip>(7), para B<AF_UNIX> veja B<unix>(7), "
142 "para B<AF_APPLETALK> veja B<ddp>(7), para B<AF_PACKET> veja B<packet>(7), "
143 "para B<AF_X25> veja B<x25>(7) e para B<AF_NETLINK> veja B<netlink>(7)."
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 msgid ""
149 "The actual structure passed for the I<addr> argument will depend on the "
150 "address family. The I<sockaddr> structure is defined as something like:"
151 msgstr ""
152
153 #. type: Plain text
154 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
155 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
156 #, no-wrap
157 msgid ""
158 "struct sockaddr {\n"
159 " sa_family_t sa_family;\n"
160 " char sa_data[14];\n"
161 "}\n"
162 msgstr ""
163
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 "The only purpose of this structure is to cast the structure pointer passed "
169 "in I<addr> in order to avoid compiler warnings. See EXAMPLES below."
170 msgstr ""
171
172 #. type: SH
173 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
174 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
175 #, no-wrap
176 msgid "RETURN VALUE"
177 msgstr "VALOR DE RETORNO"
178
179 #. type: Plain text
180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
182 msgid ""
183 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
184 "to indicate the error."
185 msgstr ""
186 "Em caso de sucesso, zero é retornado. Em caso de erro, -1 é retornado, e "
187 "I<errno> é definido para indicar o erro."
188
189 #. type: SH
190 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
191 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
192 #, no-wrap
193 msgid "ERRORS"
194 msgstr "ERROS"
195
196 #. type: TP
197 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
198 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
199 #, no-wrap
200 msgid "B<EACCES>"
201 msgstr "B<EACCES>"
202
203 #. e.g., privileged port in AF_INET domain
204 #. type: Plain text
205 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
206 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
207 #, fuzzy
208 #| msgid "The address is protected, and the user is not the super-user."
209 msgid "The address is protected, and the user is not the superuser."
210 msgstr "O endereço está protegido, e o usuário não é o super-usuário."
211
212 #. type: TP
213 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
214 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
215 #, no-wrap
216 msgid "B<EADDRINUSE>"
217 msgstr "B<EADDRINUSE>"
218
219 #. type: Plain text
220 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
221 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
222 msgid "The given address is already in use."
223 msgstr ""
224
225 #. type: Plain text
226 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
227 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
228 msgid ""
229 "(Internet domain sockets) The port number was specified as zero in the "
230 "socket address structure, but, upon attempting to bind to an ephemeral port, "
231 "it was determined that all port numbers in the ephemeral port range are "
232 "currently in use. See the discussion of I</proc/sys/net/ipv4/"
233 "ip_local_port_range> B<ip>(7)."
234 msgstr ""
235
236 #. type: TP
237 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
238 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
239 #, no-wrap
240 msgid "B<EBADF>"
241 msgstr "B<EBADF>"
242
243 #. type: Plain text
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 msgid "I<sockfd> is not a valid file descriptor."
247 msgstr "I<sockfd> não é válido como descritor de arquivo."
248
249 #. type: TP
250 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
251 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
252 #, no-wrap
253 msgid "B<EINVAL>"
254 msgstr "B<EINVAL>"
255
256 #. This may change in the future: see
257 #. .I linux/unix/sock.c for details.
258 #. type: Plain text
259 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
260 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
261 msgid "The socket is already bound to an address."
262 msgstr ""
263
264 #. type: Plain text
265 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
266 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
267 msgid ""
268 "I<addrlen> is wrong, or I<addr> is not a valid address for this socket's "
269 "domain."
270 msgstr ""
271
272 #. type: TP
273 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
274 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
275 #, no-wrap
276 msgid "B<ENOTSOCK>"
277 msgstr "B<ENOTSOCK>"
278
279 #. type: Plain text
280 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
281 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
282 msgid "The file descriptor I<sockfd> does not refer to a socket."
283 msgstr "O descritor de arquivo I<sockfd> não faz referência a um socket."
284
285 #. type: TP
286 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
287 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
288 #, no-wrap
289 msgid "B<EADDRNOTAVAIL>"
290 msgstr "B<EADDRNOTAVAIL>"
291
292 #. type: Plain text
293 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
294 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
295 msgid ""
296 "A nonexistent interface was requested or the requested address was not local."
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 msgid "The following errors are specific to UNIX domain (B<AF_UNIX>) sockets:"
303 msgstr ""
304 "Os erros a seguir são específicos para soquetes de domínio UNIX (B<AF_UNIX>):"
305
306 #. type: Plain text
307 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
308 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
309 msgid ""
310 "Search permission is denied on a component of the path prefix. (See also "
311 "B<path_resolution>(7).)"
312 msgstr ""
313 "Permissão de procura negada em um componente do prefixo do caminho. (Veja "
314 "também B<path_resolution>(7).)"
315
316 #. type: TP
317 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
318 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
319 #, no-wrap
320 msgid "B<EFAULT>"
321 msgstr "B<EFAULT>"
322
323 #. type: Plain text
324 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
325 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
326 msgid "I<addr> points outside the user's accessible address space."
327 msgstr ""
328 "I<addr> aponta para fora de um espaço de endereçamento acessível pelo "
329 "usuário."
330
331 #. type: TP
332 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
333 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
334 #, no-wrap
335 msgid "B<ELOOP>"
336 msgstr "B<ELOOP>"
337
338 #. type: Plain text
339 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
340 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
341 msgid "Too many symbolic links were encountered in resolving I<addr>."
342 msgstr "Muitas ligações simbólicas foram encontradas resolvendo I<addr>."
343
344 #. type: TP
345 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
346 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
347 #, no-wrap
348 msgid "B<ENAMETOOLONG>"
349 msgstr "B<ENAMETOOLONG>"
350
351 #. type: Plain text
352 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
353 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
354 msgid "I<addr> is too long."
355 msgstr "I<addr> é muito longo."
356
357 #. type: TP
358 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
359 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
360 #, no-wrap
361 msgid "B<ENOENT>"
362 msgstr "B<ENOENT>"
363
364 #. type: Plain text
365 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
366 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
367 msgid ""
368 "A component in the directory prefix of the socket pathname does not exist."
369 msgstr ""
370
371 #. type: TP
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 #, no-wrap
375 msgid "B<ENOMEM>"
376 msgstr "B<ENOMEM>"
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 "Insufficient kernel memory was available."
382 msgstr "A memória do kernel disponível foi insuficiente."
383
384 #. type: TP
385 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
386 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
387 #, no-wrap
388 msgid "B<ENOTDIR>"
389 msgstr "B<ENOTDIR>"
390
391 #. type: Plain text
392 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
393 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
394 msgid "A component of the path prefix is not a directory."
395 msgstr "Um componente do prefixo do caminho não é um diretório."
396
397 #. type: TP
398 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
399 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
400 #, no-wrap
401 msgid "B<EROFS>"
402 msgstr "B<EROFS>"
403
404 #. type: Plain text
405 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
406 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
407 msgid "The socket inode would reside on a read-only filesystem."
408 msgstr ""
409 "O inode do soquete pode estar residente em um sistema de arquivos somente "
410 "leitura."
411
412 #. type: Plain text
413 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
414 #: opensuse-leap-16-1 opensuse-tumbleweed
415 msgid "Other errors may be generated by the underlying protocol modules."
416 msgstr ""
417
418 #. type: SH
419 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
420 #: opensuse-tumbleweed
421 #, no-wrap
422 msgid "VERSIONS"
423 msgstr "VERSÕES"
424
425 #. type: Plain text
426 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
427 #: opensuse-tumbleweed
428 msgid ""
429 "Portable programs must ensure that I<addr.sun_path> is a null-terminated "
430 "string for B<AF_UNIX> sockets."
431 msgstr ""
432
433 #. type: SH
434 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
435 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
436 #, no-wrap
437 msgid "STANDARDS"
438 msgstr "PADRÕES"
439
440 #. type: Plain text
441 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
442 #: opensuse-tumbleweed
443 msgid "POSIX.1-2024."
444 msgstr "POSIX.1-2024."
445
446 #. type: SH
447 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
448 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
449 #, no-wrap
450 msgid "HISTORY"
451 msgstr "HISTÓRICO"
452
453 #. SVr4 documents an additional
454 #. .B ENOSR
455 #. general error condition, and
456 #. additional
457 #. .B EIO
458 #. and
459 #. .B EISDIR
460 #. UNIX-domain error conditions.
461 #. type: Plain text
462 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
463 #: opensuse-tumbleweed
464 msgid "POSIX.1-2001, SVr4, 4.2BSD."
465 msgstr "POSIX.1-2001, SVr4, 4.2BSD."
466
467 #. type: SH
468 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
469 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
470 #, no-wrap
471 msgid "BUGS"
472 msgstr "BUGS"
473
474 #. FIXME Document transparent proxy options
475 #. type: Plain text
476 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
477 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
478 msgid "The transparent proxy options are not described."
479 msgstr "As opções de proxy transparente não são descritas."
480
481 #. type: SH
482 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
483 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
484 #, no-wrap
485 msgid "EXAMPLES"
486 msgstr "EXEMPLOS"
487
488 #. type: Plain text
489 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
490 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
491 msgid ""
492 "An example of the use of B<bind>() with Internet domain sockets can be "
493 "found in B<getaddrinfo>(3)."
494 msgstr ""
495
496 #. listen.7 refers to this example.
497 #. accept.7 refers to this example.
498 #. unix.7 refers to this example.
499 #. type: Plain text
500 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
501 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
502 msgid ""
503 "The following example shows how to bind a stream socket in the UNIX "
504 "(B<AF_UNIX>) domain, and accept connections:"
505 msgstr ""
506
507 #. type: Plain text
508 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
509 #: opensuse-tumbleweed
510 #, no-wrap
511 msgid ""
512 "#include E<lt>err.hE<gt>\n"
513 "#include E<lt>stdlib.hE<gt>\n"
514 "#include E<lt>string.hE<gt>\n"
515 "#include E<lt>sys/socket.hE<gt>\n"
516 "#include E<lt>sys/un.hE<gt>\n"
517 "#include E<lt>unistd.hE<gt>\n"
518 "\\&\n"
519 "#define MY_SOCK_PATH \"/somepath\"\n"
520 "#define LISTEN_BACKLOG 50\n"
521 "\\&\n"
522 "int\n"
523 "main(void)\n"
524 "{\n"
525 " int sfd, cfd;\n"
526 " socklen_t peer_addr_size;\n"
527 " struct sockaddr_un my_addr, peer_addr;\n"
528 "\\&\n"
529 " sfd = socket(AF_UNIX, SOCK_STREAM, 0);\n"
530 " if (sfd == -1)\n"
531 " err(EXIT_FAILURE, \"socket\");\n"
532 "\\&\n"
533 " memset(&my_addr, 0, sizeof(my_addr));\n"
534 " my_addr.sun_family = AF_UNIX;\n"
535 " strncpy(my_addr.sun_path, MY_SOCK_PATH,\n"
536 " sizeof(my_addr.sun_path) - 1);\n"
537 "\\&\n"
538 " if (bind(sfd, (struct sockaddr *) &my_addr,\n"
539 " sizeof(my_addr)) == -1)\n"
540 " err(EXIT_FAILURE, \"bind\");\n"
541 "\\&\n"
542 " if (listen(sfd, LISTEN_BACKLOG) == -1)\n"
543 " err(EXIT_FAILURE, \"listen\");\n"
544 "\\&\n"
545 " /* Now we can accept incoming connections one\n"
546 " at a time using accept(2). */\n"
547 "\\&\n"
548 " peer_addr_size = sizeof(peer_addr);\n"
549 " cfd = accept(sfd, (struct sockaddr *) &peer_addr,\n"
550 " &peer_addr_size);\n"
551 " if (cfd == -1)\n"
552 " err(EXIT_FAILURE, \"accept\");\n"
553 "\\&\n"
554 " /* Code to deal with incoming connection(s)... */\n"
555 "\\&\n"
556 " if (close(sfd) == -1)\n"
557 " err(EXIT_FAILURE, \"close\");\n"
558 "\\&\n"
559 " if (unlink(MY_SOCK_PATH) == -1)\n"
560 " err(EXIT_FAILURE, \"unlink\");\n"
561 "}\n"
562 msgstr ""
563
564 #. SRC END
565 #. type: SH
566 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
567 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
568 #, no-wrap
569 msgid "SEE ALSO"
570 msgstr "VEJA TAMBÉM"
571
572 #. type: Plain text
573 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
574 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
575 msgid ""
576 "B<accept>(2), B<connect>(2), B<getsockname>(2), B<listen>(2), B<socket>(2), "
577 "B<getaddrinfo>(3), B<getifaddrs>(3), B<ip>(7), B<ipv6>(7), "
578 "B<path_resolution>(7), B<socket>(7), B<unix>(7)"
579 msgstr ""
580 "B<accept>(2), B<connect>(2), B<getsockname>(2), B<listen>(2), B<socket>(2), "
581 "B<getaddrinfo>(3), B<getifaddrs>(3), B<ip>(7), B<ipv6>(7), "
582 "B<path_resolution>(7), B<socket>(7), B<unix>(7)"
583
584 #. type: TH
585 #: debian-trixie
586 #, no-wrap
587 msgid "2024-06-15"
588 msgstr "15 junho 2024"
589
590 #. type: TH
591 #: debian-trixie
592 #, no-wrap
593 msgid "Linux man-pages 6.9.1"
594 msgstr "Linux man-pages 6.9.1"
595
596 #. type: Plain text
597 #: debian-trixie
598 msgid "Standard C library (I<libc>, I<-lc>)"
599 msgstr "Biblioteca C Padrão (I<libc>, I<-lc>)"
600
601 #. type: Plain text
602 #: debian-trixie fedora-44 fedora-rawhide
603 msgid "POSIX.1-2008."
604 msgstr "POSIX.1-2008."
605
606 #. SVr4 documents an additional
607 #. .B ENOSR
608 #. general error condition, and
609 #. additional
610 #. .B EIO
611 #. and
612 #. .B EISDIR
613 #. UNIX-domain error conditions.
614 #. type: Plain text
615 #: debian-trixie fedora-44 fedora-rawhide
616 msgid "POSIX.1-2001, SVr4, 4.4BSD (B<bind>() first appeared in 4.2BSD)."
617 msgstr ""
618
619 #. type: Plain text
620 #: debian-trixie fedora-44 fedora-rawhide
621 #, no-wrap
622 msgid ""
623 "#include E<lt>stdio.hE<gt>\n"
624 "#include E<lt>stdlib.hE<gt>\n"
625 "#include E<lt>string.hE<gt>\n"
626 "#include E<lt>sys/socket.hE<gt>\n"
627 "#include E<lt>sys/un.hE<gt>\n"
628 "#include E<lt>unistd.hE<gt>\n"
629 "\\&\n"
630 "#define MY_SOCK_PATH \"/somepath\"\n"
631 "#define LISTEN_BACKLOG 50\n"
632 "\\&\n"
633 "#define handle_error(msg) \\[rs]\n"
634 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
635 "\\&\n"
636 "int\n"
637 "main(void)\n"
638 "{\n"
639 " int sfd, cfd;\n"
640 " socklen_t peer_addr_size;\n"
641 " struct sockaddr_un my_addr, peer_addr;\n"
642 "\\&\n"
643 " sfd = socket(AF_UNIX, SOCK_STREAM, 0);\n"
644 " if (sfd == -1)\n"
645 " handle_error(\"socket\");\n"
646 "\\&\n"
647 " memset(&my_addr, 0, sizeof(my_addr));\n"
648 " my_addr.sun_family = AF_UNIX;\n"
649 " strncpy(my_addr.sun_path, MY_SOCK_PATH,\n"
650 " sizeof(my_addr.sun_path) - 1);\n"
651 "\\&\n"
652 " if (bind(sfd, (struct sockaddr *) &my_addr,\n"
653 " sizeof(my_addr)) == -1)\n"
654 " handle_error(\"bind\");\n"
655 "\\&\n"
656 " if (listen(sfd, LISTEN_BACKLOG) == -1)\n"
657 " handle_error(\"listen\");\n"
658 "\\&\n"
659 " /* Now we can accept incoming connections one\n"
660 " at a time using accept(2). */\n"
661 "\\&\n"
662 " peer_addr_size = sizeof(peer_addr);\n"
663 " cfd = accept(sfd, (struct sockaddr *) &peer_addr,\n"
664 " &peer_addr_size);\n"
665 " if (cfd == -1)\n"
666 " handle_error(\"accept\");\n"
667 "\\&\n"
668 " /* Code to deal with incoming connection(s)... */\n"
669 "\\&\n"
670 " if (close(sfd) == -1)\n"
671 " handle_error(\"close\");\n"
672 "\\&\n"
673 " if (unlink(MY_SOCK_PATH) == -1)\n"
674 " handle_error(\"unlink\");\n"
675 "}\n"
676 msgstr ""
677
678 #. type: TH
679 #: fedora-44 fedora-rawhide
680 #, no-wrap
681 msgid "2024-11-06"
682 msgstr "6 novembro 2024"
683
684 #. type: TH
685 #: fedora-44 fedora-rawhide
686 #, no-wrap
687 msgid "Linux man-pages 6.13"
688 msgstr "Linux man-pages 6.13"
689
690 #. type: TH
691 #: mageia-cauldron
692 #, no-wrap
693 msgid "Linux man-pages 6.17"
694 msgstr "Linux man-pages 6.17"
695
696 #. type: TH
697 #: opensuse-leap-16-1 opensuse-tumbleweed
698 #, no-wrap
699 msgid "Linux man-pages (unreleased)"
700 msgstr "Linux man-pages (não lançado)"