Debian Codegraph @

po/pt_BR/man3/cmsg.3.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 # Paulo César Mendes <[email protected]>, 2000.
5 # André Luiz Fassone <[email protected]>, 2000.
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: manpages-l10n\n"
9 "POT-Creation-Date: 2026-06-05 06:21+0200\n"
10 "PO-Revision-Date: 2000-06-02 19:20-0300\n"
11 "Last-Translator: André Luiz Fassone <[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: Virtaal 1.0.0-beta1\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 "CMSG"
26 msgstr "CMSG"
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 ""
53 "CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR - access ancillary data"
54 msgstr ""
55 "CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR - accesso a dados "
56 "ancilares"
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 C Padrão (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 "SINOPSE"
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 "B<#include E<lt>sys/socket.hE<gt>>\n"
83 msgstr "B<#include E<lt>sys/socket.hE<gt>>\n"
84
85 #. type: Plain text
86 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
87 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
88 #, fuzzy, no-wrap
89 #| msgid ""
90 #| "B<#include E<lt>sys/socket.hE<gt>>\n"
91 #| "B<struct cmsghdr *CMSG_FIRSTHDR(struct msghdr *>I<msgh>B<);>\n"
92 #| "B<struct cmsghdr *CMSG_NXTHDR(struct msghdr *>I<msgh>B< ,>\n"
93 #| "B< struct cmsghdr *>cmsgB<);>\n"
94 #| "B<size_t CMSG_ALIGN(size_t >I<length>B<);>\n"
95 #| "B<size_t CMSG_SPACE(size_t >I<length>B<);>\n"
96 #| "B<size_t CMSG_LEN(size_t >I<length>B<);>\n"
97 #| "B<unsigned char *CMSG_DATA(struct cmsghdr *>I<cmsg>B<);>\n"
98 msgid ""
99 "B<struct cmsghdr *CMSG_FIRSTHDR(struct msghdr *>I<msgh>B<);>\n"
100 "B<struct cmsghdr *CMSG_NXTHDR(struct msghdr *>I<msgh>B<,>\n"
101 "B< struct cmsghdr *>cmsgB<);>\n"
102 "B<size_t CMSG_ALIGN(size_t >I<length>B<);>\n"
103 "B<size_t CMSG_SPACE(size_t >I<length>B<);>\n"
104 "B<size_t CMSG_LEN(size_t >I<length>B<);>\n"
105 "B<unsigned char *CMSG_DATA(struct cmsghdr *>I<cmsg>B<);>\n"
106 msgstr ""
107 "B<#include E<lt>sys/socket.hE<gt>>\n"
108 "B<struct cmsghdr *CMSG_FIRSTHDR(struct msghdr *>I<msgh>B<);>\n"
109 "B<struct cmsghdr *CMSG_NXTHDR(struct msghdr *>I<msgh>B< ,>\n"
110 "B< struct cmsghdr *>cmsgB<);>\n"
111 "B<size_t CMSG_ALIGN(size_t >I<length>B<);>\n"
112 "B<size_t CMSG_SPACE(size_t >I<length>B<);>\n"
113 "B<size_t CMSG_LEN(size_t >I<length>B<);>\n"
114 "B<unsigned char *CMSG_DATA(struct cmsghdr *>I<cmsg>B<);>\n"
115
116 #. type: SH
117 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
118 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
119 #, no-wrap
120 msgid "DESCRIPTION"
121 msgstr "DESCRIÇÃO"
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 "These macros are used to create and access control messages (also called "
128 "ancillary data) that are not a part of the socket payload. This control "
129 "information may include the interface the packet was received on, various "
130 "rarely used header fields, an extended error description, a set of file "
131 "descriptors, or UNIX credentials. For instance, control messages can be "
132 "used to send additional header fields such as IP options. Ancillary data is "
133 "sent by calling B<sendmsg>(2) and received by calling B<recvmsg>(2). See "
134 "their manual pages for more information."
135 msgstr ""
136 "Estas macros servem para criar e acessar mensagens de controle (também "
137 "chamadas dados ancilares) que não são parte do conteúdo do 'socket'. Esta "
138 "informação pode incluir a interface onde o pacote foi recebido, uma "
139 "miscelânea de cabeçalhos raramente usados, uma descrição de erro mais "
140 "detalhada, um conjunto de descritores de arquivo ou credenciais UNIX. Por "
141 "exemplo, pode se usar mensagens de controle para enviar campos de cabeçalho "
142 "adicionais tais como opções IP. Os dados são enviados com B<sendmsg>(2) e "
143 "recebidos com B<recvmsg>(2). Veja as manpages para mais informações."
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 #, fuzzy
149 #| msgid ""
150 #| "Ancillary data is a sequence of B<struct cmsghdr> structures with "
151 #| "appended data. This sequence should only be accessed using the macros "
152 #| "described in this manual page and never directly. See the specific "
153 #| "protocol man pages for the available control message types. The maximum "
154 #| "ancillary buffer size allowed per socket can be set using the "
155 #| "B<net.core.optmem_max> sysctl; see B<socket>(7)."
156 msgid ""
157 "Ancillary data is a sequence of I<cmsghdr> structures with appended data. "
158 "See the specific protocol man pages for the available control message "
159 "types. The maximum ancillary buffer size allowed per socket can be set "
160 "using I</proc/sys/net/core/optmem_max>; see B<socket>(7)."
161 msgstr ""
162 "Os dados ancilares consistem numa sequência de B<struct cmsghdr> seguidas de "
163 "dados adicionais, que devem ser acessadas apenas com as macros descritas "
164 "nesta manpage e não diretamente. Veja os tipos de mensagens de controle nas "
165 "páginas de manuais dos protocolos. O tamanho máximo do 'buffer' auxiliar do "
166 "'socket' pode ser definido com B<net.core.optmem_max> do sysctl. Ver "
167 "B<socket>(7)."
168
169 #. type: Plain text
170 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
171 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
172 msgid "The I<cmsghdr> structure is defined as follows:"
173 msgstr ""
174
175 #. type: Plain text
176 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
177 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
178 #, fuzzy, no-wrap
179 #| msgid ""
180 #| "struct cmsghdr {\n"
181 #| "\tsocklen_t\tcmsg_len;\t/* data byte count, including header */\n"
182 #| "\tint\tcmsg_level;\t/* originating protocol */\n"
183 #| "\tint\tcmsg_type;\t/* protocol-specific type */\n"
184 #| "/* followed by unsigned char\tcmsg_data[]; */\n"
185 #| "};\n"
186 msgid ""
187 "struct cmsghdr {\n"
188 " size_t cmsg_len; /* Data byte count, including header\n"
189 " (type is socklen_t in POSIX) */\n"
190 " int cmsg_level; /* Originating protocol */\n"
191 " int cmsg_type; /* Protocol-specific type */\n"
192 "/* followed by\n"
193 " unsigned char cmsg_data[]; */\n"
194 "};\n"
195 msgstr ""
196 "struct cmsghdr {\n"
197 "\tsocklen_t\tcmsg_len;\t/* total de bytes de dados, incluindo o cabeçalho */\n"
198 "\tint\tcmsg_level;\t/* protocolo original */\n"
199 "\tint\tcmsg_type;\t/* tipo protocolo-específico */\n"
200 "/* followed by unsigned char\tcmsg_data[]; */\n"
201 "};\n"
202
203 #. type: Plain text
204 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
205 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
206 msgid ""
207 "The sequence of I<cmsghdr> structures should never be accessed directly. "
208 "Instead, use only the following macros:"
209 msgstr ""
210
211 #. type: TP
212 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
213 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
214 #, no-wrap
215 msgid "B<CMSG_FIRSTHDR>()"
216 msgstr "B<CMSG_FIRSTHDR>()"
217
218 #. type: Plain text
219 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
220 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
221 #, fuzzy
222 #| msgid ""
223 #| "B<CMSG_FIRSTHDR> returns a pointer to the first B<cmsghdr> in the "
224 #| "ancillary data buffer associated with the passed B<msghdr>."
225 msgid ""
226 "returns a pointer to the first I<cmsghdr> in the ancillary data buffer "
227 "associated with the passed I<msghdr>. It returns NULL if there isn't enough "
228 "space for a I<cmsghdr> in the buffer."
229 msgstr ""
230 "B<CMSG_FIRSTHDR> retorna um ponteiro para o primeiro B<cmsghdr> do 'buffer' "
231 "ancilar associado ao B<msghdr>."
232
233 #. type: TQ
234 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
235 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
236 #, no-wrap
237 msgid "B<CMSG_NXTHDR>()"
238 msgstr "B<CMSG_NXTHDR>()"
239
240 #. type: Plain text
241 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
242 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
243 msgid ""
244 "returns the next valid I<cmsghdr> after the passed I<cmsghdr>. It returns "
245 "NULL when there isn't enough space left in the buffer."
246 msgstr ""
247 "retorna o próximo I<cmsghdr> válido depois do I<cmsghdr>. indicado, e "
248 "retorna NULO se não houver mais espaço suficiente no 'buffer'."
249
250 #. type: Plain text
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 msgid ""
254 "When initializing a buffer that will contain a series of I<cmsghdr> "
255 "structures (e.g., to be sent with B<sendmsg>(2)), that buffer should first "
256 "be zero-initialized to ensure the correct operation of B<CMSG_NXTHDR>()."
257 msgstr ""
258
259 #. type: TP
260 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
261 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
262 #, no-wrap
263 msgid "B<CMSG_ALIGN>(),"
264 msgstr "B<CMSG_ALIGN>(),"
265
266 #. type: Plain text
267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
268 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
269 msgid ""
270 "given a length, returns it including the required alignment. This is a "
271 "constant expression."
272 msgstr ""
273 "dado um tamanho, retorna-o incluindo o alinhamento requerido. Isto é uma "
274 "expressão constante."
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 "B<CMSG_SPACE>()"
281 msgstr "B<CMSG_SPACE>()"
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 "returns the number of bytes an ancillary element with payload of the passed "
288 "data length occupies. This is a constant expression."
289 msgstr ""
290 "retorna o número de bytes de um elemento acessório com um conteúdo do "
291 "comprimento indicado. Esta expressão é constante."
292
293 #. type: TQ
294 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
295 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
296 #, no-wrap
297 msgid "B<CMSG_DATA>()"
298 msgstr "B<CMSG_DATA>()"
299
300 #. type: Plain text
301 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
302 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
303 msgid ""
304 "returns a pointer to the data portion of a I<cmsghdr>. The pointer returned "
305 "cannot be assumed to be suitably aligned for accessing arbitrary payload "
306 "data types. Applications should not cast it to a pointer type matching the "
307 "payload, but should instead use B<memcpy>(3) to copy data to or from a "
308 "suitably declared object."
309 msgstr ""
310
311 #. type: TQ
312 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
313 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
314 #, no-wrap
315 msgid "B<CMSG_LEN>()"
316 msgstr "B<CMSG_LEN>()"
317
318 #. type: Plain text
319 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
320 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
321 msgid ""
322 "returns the value to store in the I<cmsg_len> member of the I<cmsghdr> "
323 "structure, taking into account any necessary alignment. It takes the data "
324 "length as an argument. This is a constant expression."
325 msgstr ""
326 "retorna o valor do membro I<cmsg_len> do struct I<cmsghdr> considerando "
327 "qualquer alinhamento necessário. Ela pega o tamanho como argumento. Esta "
328 "expressão é constante."
329
330 #. type: Plain text
331 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
332 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
333 msgid ""
334 "To create ancillary data, first initialize the I<msg_controllen> member of "
335 "the I<msghdr> with the length of the control message buffer. Use "
336 "B<CMSG_FIRSTHDR>() on the I<msghdr> to get the first control message and "
337 "B<CMSG_NXTHDR>() to get all subsequent ones. In each control message, "
338 "initialize I<cmsg_len> (with B<CMSG_LEN>()), the other I<cmsghdr> header "
339 "fields, and the data portion using B<CMSG_DATA>(). Finally, the "
340 "I<msg_controllen> field of the I<msghdr> should be set to the sum of the "
341 "B<CMSG_SPACE>() of the length of all control messages in the buffer. For "
342 "more information on the I<msghdr>, see B<recvmsg>(2)."
343 msgstr ""
344 "Para criar dados ancilares, inicialize o membro I<msg_controllen> do "
345 "I<msghdr> com o comprimento do 'buffer' de mensagem de controle. Use "
346 "B<CMSG_FIRSTHDR>() no I<msghdr> para recuperar a primeira mensagem de "
347 "controle e B<CMSG_NEXTHDR>() para as seguintes. Para cada mensagem de "
348 "controle, inicialize I<cmsg_len> (com B<CMSG_LEN>()), e os outros I<cmsghdr> "
349 "campos e a porção de dados com B<CMSG_DATA>(). No final, o campo "
350 "I<msg_controllen> de B<msghdr> deve ter a soma dos comprimentos de todas as "
351 "mensagens de controle B<CMSG_SPACE>() do 'buffer'. Para mais informações "
352 "sobre o I<msghdr>, veja B<recvmsg>(2)."
353
354 #. type: SH
355 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
356 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
357 #, no-wrap
358 msgid "VERSIONS"
359 msgstr "VERSÕES"
360
361 #. type: Plain text
362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
364 #, fuzzy
365 #| msgid ""
366 #| "For portability, ancillary data should be accessed using only the macros "
367 #| "described here. B<CMSG_ALIGN>() is a Linux extension and should not be "
368 #| "used in portable programs."
369 msgid ""
370 "For portability, ancillary data should be accessed using only the macros "
371 "described here."
372 msgstr ""
373 "Os dados ancilares devem ser acessados apenas com as macros definidas aqui "
374 "para manter a portabilidade. B<CMSG_ALIGN>() é uma extensão linux, e deve "
375 "ser evitada em programas portáveis."
376
377 #. type: Plain text
378 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
379 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
380 #, fuzzy
381 #| msgid ""
382 #| "In Linux, B<CMSG_LEN>, B<CMSG_DATA>, and B<CMSG_ALIGN> are constant "
383 #| "expressions (assuming their argument is constant) - this could be used to "
384 #| "declare the size of global variables. This may be not portable, however."
385 msgid ""
386 "In Linux, B<CMSG_LEN>(), B<CMSG_DATA>(), and B<CMSG_ALIGN>() are constant "
387 "expressions (assuming their argument is constant), meaning that these values "
388 "can be used to declare the size of global variables. This may not be "
389 "portable, however."
390 msgstr ""
391 "No Linux, B<CMSG_LEN>, B<CMSG_DATA> e B<CMSG_ALIGN> são constantes (se "
392 "receberem um argumento constante), e podem ser usados para declarar o "
393 "tamanho de variáveis globais. Isto pode, no entanto, não ser portável."
394
395 #. type: SH
396 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
397 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
398 #, no-wrap
399 msgid "STANDARDS"
400 msgstr "PADRÕES"
401
402 #. type: Plain text
403 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
404 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
405 msgid "POSIX.1-2008."
406 msgstr "POSIX.1-2008."
407
408 #. type: TQ
409 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
410 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
411 #, fuzzy, no-wrap
412 #| msgid "B<CMSG_ALIGN>(),"
413 msgid "B<CMSG_ALIGN>()"
414 msgstr "B<CMSG_ALIGN>(),"
415
416 #. type: Plain text
417 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
418 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
419 msgid "Linux."
420 msgstr "Linux."
421
422 #. type: SH
423 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
424 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
425 #, no-wrap
426 msgid "HISTORY"
427 msgstr "HISTÓRICO"
428
429 #. type: Plain text
430 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
431 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
432 #, fuzzy
433 #| msgid ""
434 #| "This ancillary data model conforms to the POSIX.1003.1g draft, 4.4BSD-"
435 #| "Lite, the IPv6 advanced API described in RFC2292 and the Single Unix "
436 #| "specification v2. B<CMSG_ALIGN > is a Linux extension."
437 msgid ""
438 "This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite, the "
439 "IPv6 advanced API described in RFC\\ 2292 and SUSv2."
440 msgstr ""
441 "O modelo de dados ancilares segue o rascunho POSIX.1003.1g, BSD Lite 4.4, a "
442 "API IPv6 avançada descrita no RFC2292 e a SUSv2. B<CMSG_ALIGN> é uma "
443 "extensão linux."
444
445 #. https://www.austingroupbugs.net/view.php?id=978#c3242
446 #. type: Plain text
447 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
448 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
449 msgid ""
450 "B<CMSG_SPACE>() and B<CMSG_LEN>() will be included in the next POSIX "
451 "release (Issue 8)."
452 msgstr ""
453
454 #. type: SH
455 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
456 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
457 #, no-wrap
458 msgid "EXAMPLES"
459 msgstr "EXEMPLOS"
460
461 #. type: Plain text
462 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
463 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
464 msgid ""
465 "This code looks for the B<IP_TTL> option in a received ancillary buffer:"
466 msgstr "Este código procura a opção B<IP_TTL> num 'buffer' ancilar recebido:"
467
468 #. type: Plain text
469 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
470 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
471 #, fuzzy, no-wrap
472 #| msgid ""
473 #| "/* Receive auxiliary data in msgh */ \n"
474 #| "for (cmsg = CMSG_FIRSTHDR(&msgh); \n"
475 #| " cmsg != NULL; \n"
476 #| " cmsg = CMSG_NXTHDR(&msgh,cmsg) {\n"
477 #| "\tif (cmsg-E<gt>cmsg_level == SOL_IP \n"
478 #| "\t && cmsg-E<gt>cmsg_type == IP_TTL) { \n"
479 #| "\t\tttlptr = (int *) CMSG_DATA(cmsg);\n"
480 #| "\t\treceived_ttl = *ttlptr; \n"
481 #| "\t\tbreak;\n"
482 #| "\t}\n"
483 #| "}\n"
484 #| "if (cmsg == NULL) {\n"
485 #| "\t/*\n"
486 #| "\t * Error: IP_TTL not enabled or small buffer\n"
487 #| "\t * or I/O error.\n"
488 #| "\t */ \n"
489 #| "} \n"
490 msgid ""
491 "struct msghdr msgh;\n"
492 "struct cmsghdr *cmsg;\n"
493 "int received_ttl;\n"
494 "\\&\n"
495 "/* Receive auxiliary data in msgh */\n"
496 "\\&\n"
497 "for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;\n"
498 " cmsg = CMSG_NXTHDR(&msgh, cmsg)) {\n"
499 " if (cmsg-E<gt>cmsg_level == IPPROTO_IP\n"
500 " && cmsg-E<gt>cmsg_type == IP_TTL) {\n"
501 " memcpy(&receive_ttl, CMSG_DATA(cmsg), sizeof(received_ttl));\n"
502 " break;\n"
503 " }\n"
504 "}\n"
505 "\\&\n"
506 "if (cmsg == NULL) {\n"
507 " /* Error: IP_TTL not enabled or small buffer or I/O error */\n"
508 "}\n"
509 msgstr ""
510 "/* Receber dados ancilares em msgh */ \n"
511 "for (cmsg = CMSG_FIRSTHDR(&msgh); \n"
512 " cmsg != NULL; \n"
513 " cmsg = CMSG_NXTHDR(&msgh,cmsg) {\n"
514 "\tif (cmsg-E<gt>cmsg_level == SOL_IP \n"
515 "\t && cmsg-E<gt>cmsg_type == IP_TTL) { \n"
516 "\t\tttlptr = (int *) CMSG_DATA(cmsg);\n"
517 "\t\treceived_ttl = *ttlptr; \n"
518 "\t\tbreak;\n"
519 "\t}\n"
520 "}\n"
521 "if (cmsg == NULL) {\n"
522 "\t/*\n"
523 "\t * Erro: IP_TTL desabilitado ou 'buffer' muito curto\n"
524 "\t * ou erro de E/S.\n"
525 "\t */ \n"
526 "} \n"
527
528 #. type: Plain text
529 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
530 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
531 #, fuzzy
532 #| msgid ""
533 #| "The code below passes an array of file descriptors over a Unix socket "
534 #| "using B<SCM_RIGHTS>:"
535 msgid ""
536 "The code below passes an array of file descriptors over a UNIX domain socket "
537 "using B<SCM_RIGHTS>:"
538 msgstr ""
539 "O código abaixo transmite um 'array' de descritores de arquivo através de um "
540 "'socket' Unix usando B<SCM_RIGHTS>:"
541
542 #. type: Plain text
543 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
544 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
545 #, no-wrap
546 msgid ""
547 "struct msghdr msg = { 0 };\n"
548 "struct cmsghdr *cmsg;\n"
549 "int myfds[NUM_FD]; /* Contains the file descriptors to pass */\n"
550 "char iobuf[1];\n"
551 "struct iovec io = {\n"
552 " .iov_base = iobuf,\n"
553 " .iov_len = sizeof(iobuf)\n"
554 "};\n"
555 "union { /* Ancillary data buffer, wrapped in a union\n"
556 " in order to ensure it is suitably aligned */\n"
557 " char buf[CMSG_SPACE(sizeof(myfds))];\n"
558 " struct cmsghdr align;\n"
559 "} u;\n"
560 "\\&\n"
561 "msg.msg_iov = &io;\n"
562 "msg.msg_iovlen = 1;\n"
563 "msg.msg_control = u.buf;\n"
564 "msg.msg_controllen = sizeof(u.buf);\n"
565 "cmsg = CMSG_FIRSTHDR(&msg);\n"
566 "cmsg-E<gt>cmsg_level = SOL_SOCKET;\n"
567 "cmsg-E<gt>cmsg_type = SCM_RIGHTS;\n"
568 "cmsg-E<gt>cmsg_len = CMSG_LEN(sizeof(myfds));\n"
569 "memcpy(CMSG_DATA(cmsg), myfds, sizeof(myfds));\n"
570 msgstr ""
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 #, fuzzy
576 #| msgid ""
577 #| "The code below passes an array of file descriptors over a Unix socket "
578 #| "using B<SCM_RIGHTS>:"
579 msgid ""
580 "For a complete code example that shows passing of file descriptors over a "
581 "UNIX domain socket, see B<seccomp_unotify>(2)."
582 msgstr ""
583 "O código abaixo transmite um 'array' de descritores de arquivo através de um "
584 "'socket' Unix usando B<SCM_RIGHTS>:"
585
586 #. type: SH
587 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
588 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
589 #, no-wrap
590 msgid "SEE ALSO"
591 msgstr "VEJA TAMBÉM"
592
593 #. type: Plain text
594 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
595 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
596 msgid "B<recvmsg>(2), B<sendmsg>(2)"
597 msgstr "B<recvmsg>(2), B<sendmsg>(2)"
598
599 #. type: Plain text
600 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
601 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
602 msgid "RFC\\ 2292"
603 msgstr "RFC\\ 2292"
604
605 #. type: TH
606 #: debian-trixie
607 #, no-wrap
608 msgid "2024-05-02"
609 msgstr "2 maio 2024"
610
611 #. type: TH
612 #: debian-trixie
613 #, no-wrap
614 msgid "Linux man-pages 6.9.1"
615 msgstr "Linux man-pages 6.9.1"
616
617 #. type: Plain text
618 #: debian-trixie
619 msgid "Standard C library (I<libc>, I<-lc>)"
620 msgstr "Biblioteca C Padrão (I<libc>, I<-lc>)"
621
622 #. type: TH
623 #: fedora-44 fedora-rawhide
624 #, no-wrap
625 msgid "2024-07-23"
626 msgstr "23 julho 2024"
627
628 #. type: TH
629 #: fedora-44 fedora-rawhide
630 #, no-wrap
631 msgid "Linux man-pages 6.13"
632 msgstr "Linux man-pages 6.13"
633
634 #. type: TH
635 #: mageia-cauldron
636 #, no-wrap
637 msgid "Linux man-pages 6.17"
638 msgstr "Linux man-pages 6.17"
639
640 #. type: TH
641 #: opensuse-leap-16-1 opensuse-tumbleweed
642 #, no-wrap
643 msgid "Linux man-pages (unreleased)"
644 msgstr "Linux man-pages (não lançado)"