Debian Codegraph @

po/es/man7/sock_diag.7.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 msgid ""
5 msgstr ""
6 "Project-Id-Version: manpages-l10n 4.11.0\n"
7 "POT-Creation-Date: 2026-06-05 06:44+0200\n"
8 "PO-Revision-Date: 2021-09-03 21:25+0200\n"
9 "Last-Translator: Automatically generated\n"
10 "Language-Team: Spanish <[email protected]>\n"
11 "Language: es\n"
12 "MIME-Version: 1.0\n"
13 "Content-Type: text/plain; charset=UTF-8\n"
14 "Content-Transfer-Encoding: 8bit\n"
15 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
17 #. type: TH
18 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
19 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
20 #, no-wrap
21 msgid "sock_diag"
22 msgstr ""
23
24 #. type: TH
25 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
26 #: opensuse-tumbleweed
27 #, no-wrap
28 msgid "2026-02-08"
29 msgstr "8 Febrero 2026"
30
31 #. type: TH
32 #: archlinux debian-unstable
33 #, fuzzy, no-wrap
34 #| msgid "Linux man-pages 6.17"
35 msgid "Linux man-pages 6.18"
36 msgstr "Páginas de Manual de Linux 6.17"
37
38 #. type: SH
39 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
40 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
41 #, no-wrap
42 msgid "NAME"
43 msgstr "NOMBRE"
44
45 #. type: Plain text
46 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
47 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
48 msgid "sock_diag - obtaining information about sockets"
49 msgstr ""
50
51 #. type: SH
52 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
53 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
54 #, no-wrap
55 msgid "SYNOPSIS"
56 msgstr "SINOPSIS"
57
58 #. type: Plain text
59 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
60 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
61 #, no-wrap
62 msgid ""
63 "B<#include E<lt>sys/socket.hE<gt>>\n"
64 "B<#include E<lt>linux/sock_diag.hE<gt>>\n"
65 "B<#include E<lt>linux/unix_diag.hE<gt>> /* for UNIX domain sockets */\n"
66 "B<#include E<lt>linux/inet_diag.hE<gt>> /* for IPv4 and IPv6 sockets */\n"
67 msgstr ""
68
69 #. type: Plain text
70 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
71 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
72 #, no-wrap
73 msgid "B<diag_socket = socket(AF_NETLINK, >I<socket_type>B<, NETLINK_SOCK_DIAG);>\n"
74 msgstr ""
75
76 #. type: SH
77 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
78 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
79 #, no-wrap
80 msgid "DESCRIPTION"
81 msgstr "DESCRIPCIÓN"
82
83 #. type: Plain text
84 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
85 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
86 msgid ""
87 "The sock_diag netlink subsystem provides a mechanism for obtaining "
88 "information about sockets of various address families from the kernel. This "
89 "subsystem can be used to obtain information about individual sockets or "
90 "request a list of sockets."
91 msgstr ""
92
93 #. type: Plain text
94 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
95 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
96 msgid ""
97 "In the request, the caller can specify additional information it would like "
98 "to obtain about the socket, for example, memory information or information "
99 "specific to the address family."
100 msgstr ""
101
102 #. type: Plain text
103 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
104 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
105 msgid ""
106 "When requesting a list of sockets, the caller can specify filters that would "
107 "be applied by the kernel to select a subset of sockets to report. For now, "
108 "there is only the ability to filter sockets by state (connected, listening, "
109 "and so on.)"
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 "Note that sock_diag reports only those sockets that have a name; that is, "
117 "either sockets bound explicitly with B<bind>(2) or sockets that were "
118 "automatically bound to an address (e.g., by B<connect>(2)). This is the "
119 "same set of sockets that is available via I</proc/net/unix>, I</proc/net/"
120 "tcp>, I</proc/net/udp>, and so on."
121 msgstr ""
122
123 #. type: SS
124 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
125 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
126 #, no-wrap
127 msgid "Request"
128 msgstr ""
129
130 #. type: Plain text
131 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
132 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
133 msgid ""
134 "The request starts with a I<struct nlmsghdr> header described in "
135 "B<netlink>(7) with I<nlmsg_type> field set to B<SOCK_DIAG_BY_FAMILY>. It "
136 "is followed by a header specific to the address family that starts with a "
137 "common part shared by all address families:"
138 msgstr ""
139
140 #. type: Plain text
141 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
142 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
143 #, no-wrap
144 msgid ""
145 "struct sock_diag_req {\n"
146 " __u8 sdiag_family;\n"
147 " __u8 sdiag_protocol;\n"
148 "};\n"
149 msgstr ""
150
151 #. type: Plain text
152 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
153 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
154 msgid "The fields of this structure are as follows:"
155 msgstr ""
156
157 #. type: TP
158 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
159 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
160 #, no-wrap
161 msgid "I<sdiag_family>"
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 "An address family. It should be set to the appropriate B<AF_*> constant."
169 msgstr ""
170
171 #. type: TP
172 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
173 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
174 #, no-wrap
175 msgid "I<sdiag_protocol>"
176 msgstr ""
177
178 #. type: Plain text
179 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
180 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
181 msgid ""
182 "Depends on I<sdiag_family>. It should be set to the appropriate "
183 "B<IPPROTO_*> constant for B<AF_INET> and B<AF_INET6>, and to 0 otherwise."
184 msgstr ""
185
186 #. type: Plain text
187 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
188 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
189 msgid ""
190 "If the I<nlmsg_flags> field of the I<struct nlmsghdr> header has the "
191 "B<NLM_F_DUMP> flag set, it means that a list of sockets is being requested; "
192 "otherwise it is a query about an individual socket."
193 msgstr ""
194
195 #. type: SS
196 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
197 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
198 #, no-wrap
199 msgid "Response"
200 msgstr ""
201
202 #. type: Plain text
203 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
204 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
205 msgid ""
206 "The response starts with a I<struct nlmsghdr> header and is followed by an "
207 "array of objects specific to the address family. The array is to be "
208 "accessed with the standard B<NLMSG_*> macros from the B<netlink>(3) API."
209 msgstr ""
210
211 #. type: Plain text
212 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
213 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
214 msgid ""
215 "Each object is the NLA (netlink attributes) list that is to be accessed with "
216 "the B<RTA_*> macros from B<rtnetlink>(3) API."
217 msgstr ""
218
219 #. type: SS
220 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
221 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
222 #, no-wrap
223 msgid "UNIX domain sockets"
224 msgstr ""
225
226 #. type: Plain text
227 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
228 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
229 msgid ""
230 "For UNIX domain sockets the request is represented in the following "
231 "structure:"
232 msgstr ""
233
234 #. type: Plain text
235 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
236 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
237 #, no-wrap
238 msgid ""
239 "struct unix_diag_req {\n"
240 " __u8 sdiag_family;\n"
241 " __u8 sdiag_protocol;\n"
242 " __u16 pad;\n"
243 " __u32 udiag_states;\n"
244 " __u32 udiag_ino;\n"
245 " __u32 udiag_show;\n"
246 " __u32 udiag_cookie[2];\n"
247 "};\n"
248 msgstr ""
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 "The address family; it should be set to B<AF_UNIX>."
254 msgstr ""
255
256 #. type: TP
257 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
258 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
259 #, no-wrap
260 msgid "I<pad>"
261 msgstr ""
262
263 #. type: Plain text
264 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
265 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
266 msgid "These fields should be set to 0."
267 msgstr ""
268
269 #. type: TP
270 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
271 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
272 #, no-wrap
273 msgid "I<udiag_states>"
274 msgstr ""
275
276 #. type: Plain text
277 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
278 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
279 msgid ""
280 "This is a bit mask that defines a filter of sockets states. Only those "
281 "sockets whose states are in this mask will be reported. Ignored when "
282 "querying for an individual socket. Supported values are:"
283 msgstr ""
284
285 #. type: Plain text
286 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
287 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
288 msgid "1 E<lt>E<lt> B<TCP_ESTABLISHED>"
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 "1 E<lt>E<lt> B<TCP_LISTEN>"
295 msgstr ""
296
297 #. type: TP
298 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
299 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
300 #, no-wrap
301 msgid "I<udiag_ino>"
302 msgstr ""
303
304 #. type: Plain text
305 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
306 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
307 msgid ""
308 "This is an inode number when querying for an individual socket. Ignored "
309 "when querying for a list of sockets."
310 msgstr ""
311
312 #. type: TP
313 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
314 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
315 #, no-wrap
316 msgid "I<udiag_show>"
317 msgstr ""
318
319 #. type: Plain text
320 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
321 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
322 msgid ""
323 "This is a set of flags defining what kind of information to report. Each "
324 "requested kind of information is reported back as a netlink attribute as "
325 "described below:"
326 msgstr ""
327
328 #. type: TP
329 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
330 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
331 #, no-wrap
332 msgid "B<UDIAG_SHOW_NAME>"
333 msgstr ""
334
335 #. type: Plain text
336 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
337 #: opensuse-leap-16-1 opensuse-tumbleweed
338 msgid ""
339 "The attribute reported in answer to this request is B<UNIX_DIAG_NAME>. The "
340 "payload associated with this attribute is the pathname to which the socket "
341 "was bound (a sequence of bytes up to B<UNIX_PATH_MAX> size)."
342 msgstr ""
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<UDIAG_SHOW_VFS>"
349 msgstr ""
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 ""
355 "The attribute reported in answer to this request is B<UNIX_DIAG_VFS>. The "
356 "payload associated with this attribute is represented in the following "
357 "structure:"
358 msgstr ""
359
360 #. type: Plain text
361 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
362 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
363 #, no-wrap
364 msgid ""
365 "struct unix_diag_vfs {\n"
366 " __u32 udiag_vfs_dev;\n"
367 " __u32 udiag_vfs_ino;\n"
368 "};\n"
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 "I<udiag_vfs_dev>"
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 "The device number of the corresponding on-disk socket inode."
382 msgstr ""
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 "I<udiag_vfs_ino>"
389 msgstr ""
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 "The inode number of the corresponding on-disk socket inode."
395 msgstr ""
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<UDIAG_SHOW_PEER>"
402 msgstr ""
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 ""
408 "The attribute reported in answer to this request is B<UNIX_DIAG_PEER>. The "
409 "payload associated with this attribute is a __u32 value which is the peer's "
410 "inode number. This attribute is reported for connected sockets only."
411 msgstr ""
412
413 #. type: TP
414 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
415 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
416 #, no-wrap
417 msgid "B<UDIAG_SHOW_ICONS>"
418 msgstr ""
419
420 #. type: Plain text
421 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
422 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
423 msgid ""
424 "The attribute reported in answer to this request is B<UNIX_DIAG_ICONS>. The "
425 "payload associated with this attribute is an array of __u32 values which are "
426 "inode numbers of sockets that has passed the B<connect>(2) call, but hasn't "
427 "been processed with B<accept>(2) yet. This attribute is reported for "
428 "listening sockets only."
429 msgstr ""
430
431 #. type: TP
432 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
433 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
434 #, no-wrap
435 msgid "B<UDIAG_SHOW_RQLEN>"
436 msgstr ""
437
438 #. type: Plain text
439 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
440 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
441 msgid ""
442 "The attribute reported in answer to this request is B<UNIX_DIAG_RQLEN>. The "
443 "payload associated with this attribute is represented in the following "
444 "structure:"
445 msgstr ""
446
447 #. type: Plain text
448 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
449 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
450 #, no-wrap
451 msgid ""
452 "struct unix_diag_rqlen {\n"
453 " __u32 udiag_rqueue;\n"
454 " __u32 udiag_wqueue;\n"
455 "};\n"
456 msgstr ""
457
458 #. type: TP
459 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
460 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
461 #, no-wrap
462 msgid "I<udiag_rqueue>"
463 msgstr ""
464
465 #. type: Plain text
466 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
467 #: opensuse-leap-16-1 opensuse-tumbleweed
468 msgid ""
469 "For listening sockets: the number of pending connections. The size of the "
470 "array associated with the B<UNIX_DIAG_ICONS> response attribute is equal to "
471 "this value."
472 msgstr ""
473
474 #. type: Plain text
475 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
476 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
477 msgid "For established sockets: the amount of data in incoming queue."
478 msgstr ""
479
480 #. type: TP
481 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
482 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
483 #, no-wrap
484 msgid "I<udiag_wqueue>"
485 msgstr ""
486
487 #. type: Plain text
488 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
489 #: opensuse-leap-16-1 opensuse-tumbleweed
490 msgid ""
491 "For listening sockets: the backlog size which equals to the value passed as "
492 "the second argument to B<listen>(2)."
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 "For established sockets: the amount of memory available for sending."
499 msgstr ""
500
501 #. type: TP
502 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
503 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
504 #, no-wrap
505 msgid "B<UDIAG_SHOW_MEMINFO>"
506 msgstr ""
507
508 #. type: Plain text
509 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
510 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
511 msgid ""
512 "The attribute reported in answer to this request is B<UNIX_DIAG_MEMINFO>. "
513 "The payload associated with this attribute is an array of __u32 values "
514 "described below in the subsection \"Socket memory information\"."
515 msgstr ""
516
517 #. type: Plain text
518 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
519 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
520 msgid ""
521 "The following attributes are reported back without any specific request:"
522 msgstr ""
523
524 #. type: TP
525 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
526 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
527 #, no-wrap
528 msgid "B<UNIX_DIAG_SHUTDOWN>"
529 msgstr ""
530
531 #. type: Plain text
532 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
533 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
534 msgid ""
535 "The payload associated with this attribute is __u8 value which represents "
536 "bits of B<shutdown>(2) state."
537 msgstr ""
538
539 #. type: TP
540 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
541 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
542 #, no-wrap
543 msgid "I<udiag_cookie>"
544 msgstr ""
545
546 #. type: Plain text
547 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
548 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
549 msgid ""
550 "This is an array of opaque identifiers that could be used along with "
551 "I<udiag_ino> to specify an individual socket. It is ignored when querying "
552 "for a list of sockets, as well as when all its elements are set to -1."
553 msgstr ""
554
555 #. type: Plain text
556 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
557 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
558 msgid ""
559 "The response to a query for UNIX domain sockets is represented as an array of"
560 msgstr ""
561
562 #. type: Plain text
563 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
564 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
565 #, no-wrap
566 msgid ""
567 "struct unix_diag_msg {\n"
568 " __u8 udiag_family;\n"
569 " __u8 udiag_type;\n"
570 " __u8 udiag_state;\n"
571 " __u8 pad;\n"
572 " __u32 udiag_ino;\n"
573 " __u32 udiag_cookie[2];\n"
574 "};\n"
575 msgstr ""
576
577 #. type: Plain text
578 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
579 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
580 msgid "followed by netlink attributes."
581 msgstr ""
582
583 #. type: TP
584 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
585 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
586 #, no-wrap
587 msgid "I<udiag_family>"
588 msgstr ""
589
590 #. type: Plain text
591 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
592 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
593 msgid "This field has the same meaning as in I<struct unix_diag_req>."
594 msgstr ""
595
596 #. type: TP
597 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
598 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
599 #, no-wrap
600 msgid "I<udiag_type>"
601 msgstr ""
602
603 #. type: Plain text
604 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
605 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
606 msgid ""
607 "This is set to one of B<SOCK_PACKET>, B<SOCK_STREAM>, or B<SOCK_SEQPACKET>."
608 msgstr ""
609
610 #. type: TP
611 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
612 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
613 #, no-wrap
614 msgid "I<udiag_state>"
615 msgstr ""
616
617 #. type: Plain text
618 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
619 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
620 msgid "This is set to one of B<TCP_LISTEN> or B<TCP_ESTABLISHED>."
621 msgstr ""
622
623 #. type: Plain text
624 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
625 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
626 msgid "This field is set to 0."
627 msgstr ""
628
629 #. type: Plain text
630 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
631 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
632 msgid "This is the socket inode number."
633 msgstr ""
634
635 #. type: Plain text
636 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
637 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
638 msgid ""
639 "This is an array of opaque identifiers that could be used in subsequent "
640 "queries."
641 msgstr ""
642
643 #. type: SS
644 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
645 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
646 #, no-wrap
647 msgid "IPv4 and IPv6 sockets"
648 msgstr ""
649
650 #. type: Plain text
651 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
652 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
653 msgid ""
654 "For IPv4 and IPv6 sockets, the request is represented in the following "
655 "structure:"
656 msgstr ""
657
658 #. type: Plain text
659 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
660 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
661 #, no-wrap
662 msgid ""
663 "struct inet_diag_req_v2 {\n"
664 " __u8 sdiag_family;\n"
665 " __u8 sdiag_protocol;\n"
666 " __u8 idiag_ext;\n"
667 " __u8 pad;\n"
668 " __u32 idiag_states;\n"
669 " struct inet_diag_sockid id;\n"
670 "};\n"
671 msgstr ""
672
673 #. type: Plain text
674 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
675 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
676 msgid "where I<struct inet_diag_sockid> is defined as follows:"
677 msgstr ""
678
679 #. type: Plain text
680 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
681 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
682 #, no-wrap
683 msgid ""
684 "struct inet_diag_sockid {\n"
685 " __be16 idiag_sport;\n"
686 " __be16 idiag_dport;\n"
687 " __be32 idiag_src[4];\n"
688 " __be32 idiag_dst[4];\n"
689 " __u32 idiag_if;\n"
690 " __u32 idiag_cookie[2];\n"
691 "};\n"
692 msgstr ""
693
694 #. type: Plain text
695 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
696 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
697 msgid "The fields of I<struct inet_diag_req_v2> are as follows:"
698 msgstr ""
699
700 #. type: Plain text
701 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
702 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
703 msgid ""
704 "This should be set to either B<AF_INET> or B<AF_INET6> for IPv4 or IPv6 "
705 "sockets respectively."
706 msgstr ""
707
708 #. type: Plain text
709 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
710 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
711 msgid ""
712 "This should be set to one of B<IPPROTO_TCP>, B<IPPROTO_UDP>, or "
713 "B<IPPROTO_UDPLITE>."
714 msgstr ""
715
716 #. type: TP
717 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
718 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
719 #, no-wrap
720 msgid "I<idiag_ext>"
721 msgstr ""
722
723 #. type: Plain text
724 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
725 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
726 msgid ""
727 "This is a set of flags defining what kind of extended information to "
728 "report. Each requested kind of information is reported back as a netlink "
729 "attribute as described below:"
730 msgstr ""
731
732 #. type: TP
733 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
734 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
735 #, no-wrap
736 msgid "B<INET_DIAG_TOS>"
737 msgstr ""
738
739 #. type: Plain text
740 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
741 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
742 msgid ""
743 "The payload associated with this attribute is a __u8 value which is the TOS "
744 "of the socket."
745 msgstr ""
746
747 #. type: TP
748 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
749 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
750 #, no-wrap
751 msgid "B<INET_DIAG_TCLASS>"
752 msgstr ""
753
754 #. type: Plain text
755 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
756 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
757 msgid ""
758 "The payload associated with this attribute is a __u8 value which is the "
759 "TClass of the socket. IPv6 sockets only. For LISTEN and CLOSE sockets, "
760 "this is followed by B<INET_DIAG_SKV6ONLY> attribute with associated __u8 "
761 "payload value meaning whether the socket is IPv6-only or not."
762 msgstr ""
763
764 #. type: TP
765 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
766 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
767 #, no-wrap
768 msgid "B<INET_DIAG_MEMINFO>"
769 msgstr ""
770
771 #. type: Plain text
772 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
773 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
774 msgid ""
775 "The payload associated with this attribute is represented in the following "
776 "structure:"
777 msgstr ""
778
779 #. type: Plain text
780 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
781 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
782 #, no-wrap
783 msgid ""
784 "struct inet_diag_meminfo {\n"
785 " __u32 idiag_rmem;\n"
786 " __u32 idiag_wmem;\n"
787 " __u32 idiag_fmem;\n"
788 " __u32 idiag_tmem;\n"
789 "};\n"
790 msgstr ""
791
792 #. type: TP
793 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
794 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
795 #, no-wrap
796 msgid "I<idiag_rmem>"
797 msgstr ""
798
799 #. type: Plain text
800 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
801 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
802 msgid "The amount of data in the receive queue."
803 msgstr ""
804
805 #. type: TP
806 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
807 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
808 #, no-wrap
809 msgid "I<idiag_wmem>"
810 msgstr ""
811
812 #. type: Plain text
813 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
814 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
815 msgid "The amount of data that is queued by TCP but not yet sent."
816 msgstr ""
817
818 #. type: TP
819 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
820 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
821 #, no-wrap
822 msgid "I<idiag_fmem>"
823 msgstr ""
824
825 #. type: Plain text
826 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
827 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
828 msgid "The amount of memory scheduled for future use (TCP only)."
829 msgstr ""
830
831 #. type: TP
832 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
833 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
834 #, no-wrap
835 msgid "I<idiag_tmem>"
836 msgstr ""
837
838 #. type: Plain text
839 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
840 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
841 msgid "The amount of data in send queue."
842 msgstr ""
843
844 #. type: TP
845 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
846 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
847 #, no-wrap
848 msgid "B<INET_DIAG_SKMEMINFO>"
849 msgstr ""
850
851 #. type: Plain text
852 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
853 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
854 msgid ""
855 "The payload associated with this attribute is an array of __u32 values "
856 "described below in the subsection \"Socket memory information\"."
857 msgstr ""
858
859 #. type: TP
860 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
861 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
862 #, no-wrap
863 msgid "B<INET_DIAG_INFO>"
864 msgstr ""
865
866 #. type: Plain text
867 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
868 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
869 msgid ""
870 "The payload associated with this attribute is specific to the address "
871 "family. For TCP sockets, it is an object of type I<struct tcp_info>."
872 msgstr ""
873
874 #. type: TP
875 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
876 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
877 #, no-wrap
878 msgid "B<INET_DIAG_CONG>"
879 msgstr ""
880
881 #. type: Plain text
882 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
883 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
884 msgid ""
885 "The payload associated with this attribute is a string that describes the "
886 "congestion control algorithm used. For TCP sockets only."
887 msgstr ""
888
889 #. type: Plain text
890 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
891 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
892 msgid "This should be set to 0."
893 msgstr ""
894
895 #. type: TP
896 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
897 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
898 #, no-wrap
899 msgid "I<idiag_states>"
900 msgstr ""
901
902 #. type: Plain text
903 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
904 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
905 msgid ""
906 "This is a bit mask that defines a filter of socket states. Only those "
907 "sockets whose states are in this mask will be reported. Ignored when "
908 "querying for an individual socket."
909 msgstr ""
910
911 #. type: TP
912 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
913 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
914 #, no-wrap
915 msgid "I<id>"
916 msgstr ""
917
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 "This is a socket ID object that is used in dump requests, in queries about "
923 "individual sockets, and is reported back in each response. Unlike UNIX "
924 "domain sockets, IPv4 and IPv6 sockets are identified using addresses and "
925 "ports. All values are in network byte order."
926 msgstr ""
927
928 #. type: Plain text
929 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
930 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
931 msgid "The fields of I<struct inet_diag_sockid> are as follows:"
932 msgstr ""
933
934 #. type: TP
935 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
936 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
937 #, no-wrap
938 msgid "I<idiag_sport>"
939 msgstr ""
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 "The source port."
945 msgstr ""
946
947 #. type: TP
948 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
949 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
950 #, no-wrap
951 msgid "I<idiag_dport>"
952 msgstr ""
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 "The destination port."
958 msgstr ""
959
960 #. type: TP
961 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
962 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
963 #, no-wrap
964 msgid "I<idiag_src>"
965 msgstr ""
966
967 #. type: Plain text
968 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
969 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
970 msgid "The source address."
971 msgstr ""
972
973 #. type: TP
974 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
975 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
976 #, no-wrap
977 msgid "I<idiag_dst>"
978 msgstr ""
979
980 #. type: Plain text
981 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
982 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
983 msgid "The destination address."
984 msgstr ""
985
986 #. type: TP
987 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
988 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
989 #, no-wrap
990 msgid "I<idiag_if>"
991 msgstr ""
992
993 #. type: Plain text
994 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
995 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
996 msgid "The interface number the socket is bound to."
997 msgstr ""
998
999 #. type: TP
1000 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1001 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1002 #, no-wrap
1003 msgid "I<idiag_cookie>"
1004 msgstr ""
1005
1006 #. type: Plain text
1007 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1008 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1009 msgid ""
1010 "This is an array of opaque identifiers that could be used along with other "
1011 "fields of this structure to specify an individual socket. It is ignored "
1012 "when querying for a list of sockets, as well as when all its elements are "
1013 "set to -1."
1014 msgstr ""
1015
1016 #. type: Plain text
1017 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1018 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1019 msgid ""
1020 "The response to a query for IPv4 or IPv6 sockets is represented as an array "
1021 "of"
1022 msgstr ""
1023
1024 #. type: Plain text
1025 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1026 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1027 #, no-wrap
1028 msgid ""
1029 "struct inet_diag_msg {\n"
1030 " __u8 idiag_family;\n"
1031 " __u8 idiag_state;\n"
1032 " __u8 idiag_timer;\n"
1033 " __u8 idiag_retrans;\n"
1034 "\\&\n"
1035 " struct inet_diag_sockid id;\n"
1036 "\\&\n"
1037 " __u32 idiag_expires;\n"
1038 " __u32 idiag_rqueue;\n"
1039 " __u32 idiag_wqueue;\n"
1040 " __u32 idiag_uid;\n"
1041 " __u32 idiag_inode;\n"
1042 "};\n"
1043 msgstr ""
1044
1045 #. type: TP
1046 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1047 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1048 #, no-wrap
1049 msgid "I<idiag_family>"
1050 msgstr ""
1051
1052 #. type: Plain text
1053 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1054 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1055 msgid "This is the same field as in I<struct inet_diag_req_v2>."
1056 msgstr ""
1057
1058 #. type: TP
1059 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1060 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1061 #, no-wrap
1062 msgid "I<idiag_state>"
1063 msgstr ""
1064
1065 #. type: Plain text
1066 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1067 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1068 msgid "This denotes socket state as in I<struct inet_diag_req_v2>."
1069 msgstr ""
1070
1071 #. type: TP
1072 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1073 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1074 #, no-wrap
1075 msgid "I<idiag_timer>"
1076 msgstr ""
1077
1078 #. type: Plain text
1079 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1080 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1081 msgid ""
1082 "For TCP sockets, this field describes the type of timer that is currently "
1083 "active for the socket. It is set to one of the following constants:"
1084 msgstr ""
1085
1086 #. type: TP
1087 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1088 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1089 #, no-wrap
1090 msgid "B<0>"
1091 msgstr "B<0>"
1092
1093 #. type: Plain text
1094 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1095 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1096 msgid "no timer is active"
1097 msgstr ""
1098
1099 #. type: TP
1100 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1101 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1102 #, no-wrap
1103 msgid "B<1>"
1104 msgstr "B<1>"
1105
1106 #. type: Plain text
1107 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1108 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1109 msgid "a retransmit timer"
1110 msgstr ""
1111
1112 #. type: TP
1113 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1114 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1115 #, no-wrap
1116 msgid "B<2>"
1117 msgstr "B<2>"
1118
1119 #. type: Plain text
1120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1122 msgid "a keep-alive timer"
1123 msgstr ""
1124
1125 #. type: TP
1126 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1127 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1128 #, no-wrap
1129 msgid "B<3>"
1130 msgstr "B<3>"
1131
1132 #. type: Plain text
1133 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1134 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1135 msgid "a TIME_WAIT timer"
1136 msgstr ""
1137
1138 #. type: TP
1139 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1140 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1141 #, no-wrap
1142 msgid "B<4>"
1143 msgstr "B<4>"
1144
1145 #. type: Plain text
1146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1148 msgid "a zero window probe timer"
1149 msgstr ""
1150
1151 #. type: Plain text
1152 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1153 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1154 msgid "For non-TCP sockets, this field is set to 0."
1155 msgstr ""
1156
1157 #. type: TP
1158 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1159 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1160 #, no-wrap
1161 msgid "I<idiag_retrans>"
1162 msgstr ""
1163
1164 #. type: Plain text
1165 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1166 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1167 msgid ""
1168 "For I<idiag_timer> values 1, 2, and 4, this field contains the number of "
1169 "retransmits. For other I<idiag_timer> values, this field is set to 0."
1170 msgstr ""
1171
1172 #. type: TP
1173 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1174 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1175 #, no-wrap
1176 msgid "I<idiag_expires>"
1177 msgstr ""
1178
1179 #. type: Plain text
1180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1182 msgid ""
1183 "For TCP sockets that have an active timer, this field describes its "
1184 "expiration time in milliseconds. For other sockets, this field is set to 0."
1185 msgstr ""
1186
1187 #. type: TP
1188 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1189 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1190 #, no-wrap
1191 msgid "I<idiag_rqueue>"
1192 msgstr ""
1193
1194 #. type: Plain text
1195 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1196 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1197 msgid "For listening sockets: the number of pending connections."
1198 msgstr ""
1199
1200 #. type: Plain text
1201 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1202 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1203 msgid "For other sockets: the amount of data in the incoming queue."
1204 msgstr ""
1205
1206 #. type: TP
1207 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1208 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1209 #, no-wrap
1210 msgid "I<idiag_wqueue>"
1211 msgstr ""
1212
1213 #. type: Plain text
1214 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1215 #: opensuse-leap-16-1 opensuse-tumbleweed
1216 msgid "For listening sockets: the backlog size."
1217 msgstr ""
1218
1219 #. type: Plain text
1220 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1221 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1222 msgid "For other sockets: the amount of memory available for sending."
1223 msgstr ""
1224
1225 #. type: TP
1226 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1227 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1228 #, no-wrap
1229 msgid "I<idiag_uid>"
1230 msgstr ""
1231
1232 #. type: Plain text
1233 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1234 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1235 msgid "This is the socket owner UID."
1236 msgstr ""
1237
1238 #. type: TP
1239 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1240 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1241 #, no-wrap
1242 msgid "I<idiag_inode>"
1243 msgstr ""
1244
1245 #. type: SS
1246 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1247 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1248 #, no-wrap
1249 msgid "Socket memory information"
1250 msgstr ""
1251
1252 #. type: Plain text
1253 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1254 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1255 msgid ""
1256 "The payload associated with B<UNIX_DIAG_MEMINFO> and B<INET_DIAG_SKMEMINFO> "
1257 "netlink attributes is an array of the following __u32 values:"
1258 msgstr ""
1259
1260 #. type: TP
1261 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1262 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1263 #, no-wrap
1264 msgid "B<SK_MEMINFO_RMEM_ALLOC>"
1265 msgstr ""
1266
1267 #. type: Plain text
1268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1270 msgid "The amount of data in receive queue."
1271 msgstr ""
1272
1273 #. type: TP
1274 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1275 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1276 #, no-wrap
1277 msgid "B<SK_MEMINFO_RCVBUF>"
1278 msgstr ""
1279
1280 #. type: Plain text
1281 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1282 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1283 msgid "The receive socket buffer as set by B<SO_RCVBUF>."
1284 msgstr ""
1285
1286 #. type: TP
1287 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1288 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1289 #, no-wrap
1290 msgid "B<SK_MEMINFO_WMEM_ALLOC>"
1291 msgstr ""
1292
1293 #. type: TP
1294 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1295 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1296 #, no-wrap
1297 msgid "B<SK_MEMINFO_SNDBUF>"
1298 msgstr ""
1299
1300 #. type: Plain text
1301 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1302 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1303 msgid "The send socket buffer as set by B<SO_SNDBUF>."
1304 msgstr ""
1305
1306 #. type: TP
1307 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1308 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1309 #, no-wrap
1310 msgid "B<SK_MEMINFO_FWD_ALLOC>"
1311 msgstr ""
1312
1313 #. type: TP
1314 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1315 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1316 #, no-wrap
1317 msgid "B<SK_MEMINFO_WMEM_QUEUED>"
1318 msgstr ""
1319
1320 #. type: Plain text
1321 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1322 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1323 msgid "The amount of data queued by TCP, but not yet sent."
1324 msgstr ""
1325
1326 #. type: TP
1327 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1328 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1329 #, no-wrap
1330 msgid "B<SK_MEMINFO_OPTMEM>"
1331 msgstr ""
1332
1333 #. type: Plain text
1334 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1335 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1336 msgid ""
1337 "The amount of memory allocated for the socket's service needs (e.g., socket "
1338 "filter)."
1339 msgstr ""
1340
1341 #. type: TP
1342 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1343 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1344 #, no-wrap
1345 msgid "B<SK_MEMINFO_BACKLOG>"
1346 msgstr ""
1347
1348 #. type: Plain text
1349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1351 msgid "The amount of packets in the backlog (not yet processed)."
1352 msgstr ""
1353
1354 #. type: SH
1355 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1356 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1357 #, no-wrap
1358 msgid "VERSIONS"
1359 msgstr "VERSIONES"
1360
1361 #. type: Plain text
1362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1364 msgid ""
1365 "B<NETLINK_INET_DIAG> was introduced in Linux 2.6.14 and supported B<AF_INET> "
1366 "and B<AF_INET6> sockets only. In Linux 3.3, it was renamed to "
1367 "B<NETLINK_SOCK_DIAG> and extended to support B<AF_UNIX> sockets."
1368 msgstr ""
1369
1370 #. type: Plain text
1371 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1372 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1373 msgid ""
1374 "B<UNIX_DIAG_MEMINFO> and B<INET_DIAG_SKMEMINFO> were introduced in Linux 3.6."
1375 msgstr ""
1376
1377 #. type: SH
1378 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1379 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1380 #, no-wrap
1381 msgid "STANDARDS"
1382 msgstr "ESTÁNDARES"
1383
1384 #. type: Plain text
1385 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1386 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1387 msgid "Linux."
1388 msgstr "Linux."
1389
1390 #. type: SH
1391 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1392 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1393 #, no-wrap
1394 msgid "EXAMPLES"
1395 msgstr "EJEMPLOS"
1396
1397 #. type: Plain text
1398 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1399 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1400 msgid ""
1401 "The following example program prints inode number, peer's inode number, and "
1402 "name of all UNIX domain sockets in the current namespace."
1403 msgstr ""
1404
1405 #. type: Plain text
1406 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1407 #: opensuse-leap-16-1 opensuse-tumbleweed
1408 #, no-wrap
1409 msgid ""
1410 "#include E<lt>errno.hE<gt>\n"
1411 "#include E<lt>stdio.hE<gt>\n"
1412 "#include E<lt>string.hE<gt>\n"
1413 "#include E<lt>unistd.hE<gt>\n"
1414 "#include E<lt>sys/socket.hE<gt>\n"
1415 "#include E<lt>sys/un.hE<gt>\n"
1416 "#include E<lt>linux/netlink.hE<gt>\n"
1417 "#include E<lt>linux/rtnetlink.hE<gt>\n"
1418 "#include E<lt>linux/sock_diag.hE<gt>\n"
1419 "#include E<lt>linux/unix_diag.hE<gt>\n"
1420 "\\&\n"
1421 "static int\n"
1422 "send_query(int fd)\n"
1423 "{\n"
1424 " struct sockaddr_nl nladdr = {\n"
1425 " .nl_family = AF_NETLINK\n"
1426 " };\n"
1427 " struct\n"
1428 " {\n"
1429 " struct nlmsghdr nlh;\n"
1430 " struct unix_diag_req udr;\n"
1431 " } req = {\n"
1432 " .nlh = {\n"
1433 " .nlmsg_len = sizeof(req),\n"
1434 " .nlmsg_type = SOCK_DIAG_BY_FAMILY,\n"
1435 " .nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP\n"
1436 " },\n"
1437 " .udr = {\n"
1438 " .sdiag_family = AF_UNIX,\n"
1439 " .udiag_states = -1,\n"
1440 " .udiag_show = UDIAG_SHOW_NAME | UDIAG_SHOW_PEER\n"
1441 " }\n"
1442 " };\n"
1443 " struct iovec iov = {\n"
1444 " .iov_base = &req,\n"
1445 " .iov_len = sizeof(req)\n"
1446 " };\n"
1447 " struct msghdr msg = {\n"
1448 " .msg_name = &nladdr,\n"
1449 " .msg_namelen = sizeof(nladdr),\n"
1450 " .msg_iov = &iov,\n"
1451 " .msg_iovlen = 1\n"
1452 " };\n"
1453 "\\&\n"
1454 " for (;;) {\n"
1455 " if (sendmsg(fd, &msg, 0) E<lt> 0) {\n"
1456 " if (errno == EINTR)\n"
1457 " continue;\n"
1458 "\\&\n"
1459 " perror(\"sendmsg\");\n"
1460 " return -1;\n"
1461 " }\n"
1462 "\\&\n"
1463 " return 0;\n"
1464 " }\n"
1465 "}\n"
1466 "\\&\n"
1467 "static int\n"
1468 "print_diag(const struct unix_diag_msg *diag, unsigned int size)\n"
1469 "{\n"
1470 " if (size E<lt> NLMSG_LENGTH(sizeof(*diag))) {\n"
1471 " fputs(\"short response\\[rs]n\", stderr);\n"
1472 " return -1;\n"
1473 " }\n"
1474 " if (diag-E<gt>udiag_family != AF_UNIX) {\n"
1475 " fprintf(stderr, \"unexpected family %u\\[rs]n\", diag-E<gt>udiag_family);\n"
1476 " return -1;\n"
1477 " }\n"
1478 "\\&\n"
1479 " unsigned int rta_len = size - NLMSG_LENGTH(sizeof(*diag));\n"
1480 " unsigned int peer = 0;\n"
1481 " size_t path_len = 0;\n"
1482 " char path[sizeof(((struct sockaddr_un *) 0)-E<gt>sun_path) + 1];\n"
1483 "\\&\n"
1484 " for (struct rtattr *attr = (struct rtattr *) (diag + 1);\n"
1485 " RTA_OK(attr, rta_len); attr = RTA_NEXT(attr, rta_len)) {\n"
1486 " switch (attr-E<gt>rta_type) {\n"
1487 " case UNIX_DIAG_NAME:\n"
1488 " if (!path_len) {\n"
1489 " path_len = RTA_PAYLOAD(attr);\n"
1490 " if (path_len E<gt> sizeof(path) - 1)\n"
1491 " path_len = sizeof(path) - 1;\n"
1492 " memcpy(path, RTA_DATA(attr), path_len);\n"
1493 " path[path_len] = \\[aq]\\[rs]0\\[aq];\n"
1494 " }\n"
1495 " break;\n"
1496 "\\&\n"
1497 " case UNIX_DIAG_PEER:\n"
1498 " if (RTA_PAYLOAD(attr) E<gt>= sizeof(peer))\n"
1499 " peer = *(unsigned int *) RTA_DATA(attr);\n"
1500 " break;\n"
1501 " }\n"
1502 " }\n"
1503 "\\&\n"
1504 " printf(\"inode=%u\", diag-E<gt>udiag_ino);\n"
1505 "\\&\n"
1506 " if (peer)\n"
1507 " printf(\", peer=%u\", peer);\n"
1508 "\\&\n"
1509 " if (path_len)\n"
1510 " printf(\", name=%s%s\", *path ? \"\" : \"@\",\n"
1511 " *path ? path : path + 1);\n"
1512 "\\&\n"
1513 " putchar(\\[aq]\\[rs]n\\[aq]);\n"
1514 " return 0;\n"
1515 "}\n"
1516 "\\&\n"
1517 "static int\n"
1518 "receive_responses(int fd)\n"
1519 "{\n"
1520 " long buf[8192 / sizeof(long)];\n"
1521 " struct sockaddr_nl nladdr;\n"
1522 " struct iovec iov = {\n"
1523 " .iov_base = buf,\n"
1524 " .iov_len = sizeof(buf)\n"
1525 " };\n"
1526 " int flags = 0;\n"
1527 "\\&\n"
1528 " for (;;) {\n"
1529 " struct msghdr msg = {\n"
1530 " .msg_name = &nladdr,\n"
1531 " .msg_namelen = sizeof(nladdr),\n"
1532 " .msg_iov = &iov,\n"
1533 " .msg_iovlen = 1\n"
1534 " };\n"
1535 "\\&\n"
1536 " ssize_t ret = recvmsg(fd, &msg, flags);\n"
1537 "\\&\n"
1538 " if (ret E<lt> 0) {\n"
1539 " if (errno == EINTR)\n"
1540 " continue;\n"
1541 "\\&\n"
1542 " perror(\"recvmsg\");\n"
1543 " return -1;\n"
1544 " }\n"
1545 " if (ret == 0)\n"
1546 " return 0;\n"
1547 "\\&\n"
1548 " if (nladdr.nl_family != AF_NETLINK) {\n"
1549 " fputs(\"!AF_NETLINK\\[rs]n\", stderr);\n"
1550 " return -1;\n"
1551 " }\n"
1552 "\\&\n"
1553 " const struct nlmsghdr *h = (struct nlmsghdr *) buf;\n"
1554 "\\&\n"
1555 " if (!NLMSG_OK(h, ret)) {\n"
1556 " fputs(\"!NLMSG_OK\\[rs]n\", stderr);\n"
1557 " return -1;\n"
1558 " }\n"
1559 "\\&\n"
1560 " for (; NLMSG_OK(h, ret); h = NLMSG_NEXT(h, ret)) {\n"
1561 " if (h-E<gt>nlmsg_type == NLMSG_DONE)\n"
1562 " return 0;\n"
1563 "\\&\n"
1564 " if (h-E<gt>nlmsg_type == NLMSG_ERROR) {\n"
1565 " const struct nlmsgerr *err = NLMSG_DATA(h);\n"
1566 "\\&\n"
1567 " if (h-E<gt>nlmsg_len E<lt> NLMSG_LENGTH(sizeof(*err))) {\n"
1568 " fputs(\"NLMSG_ERROR\\[rs]n\", stderr);\n"
1569 " } else {\n"
1570 " errno = -err-E<gt>error;\n"
1571 " perror(\"NLMSG_ERROR\");\n"
1572 " }\n"
1573 "\\&\n"
1574 " return -1;\n"
1575 " }\n"
1576 "\\&\n"
1577 " if (h-E<gt>nlmsg_type != SOCK_DIAG_BY_FAMILY) {\n"
1578 " fprintf(stderr, \"unexpected nlmsg_type %u\\[rs]n\",\n"
1579 " (unsigned) h-E<gt>nlmsg_type);\n"
1580 " return -1;\n"
1581 " }\n"
1582 "\\&\n"
1583 " if (print_diag(NLMSG_DATA(h), h-E<gt>nlmsg_len))\n"
1584 " return -1;\n"
1585 " }\n"
1586 " }\n"
1587 "}\n"
1588 "\\&\n"
1589 "int\n"
1590 "main(void)\n"
1591 "{\n"
1592 " int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG);\n"
1593 "\\&\n"
1594 " if (fd E<lt> 0) {\n"
1595 " perror(\"socket\");\n"
1596 " return 1;\n"
1597 " }\n"
1598 "\\&\n"
1599 " int ret = send_query(fd) || receive_responses(fd);\n"
1600 "\\&\n"
1601 " close(fd);\n"
1602 " return ret;\n"
1603 "}\n"
1604 msgstr ""
1605
1606 #. type: SH
1607 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1608 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1609 #, no-wrap
1610 msgid "SEE ALSO"
1611 msgstr "VÉASE TAMBIÉN"
1612
1613 #. type: Plain text
1614 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1615 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1616 msgid "B<netlink>(3), B<rtnetlink>(3), B<netlink>(7), B<tcp>(7)"
1617 msgstr ""
1618
1619 #. type: TH
1620 #: debian-trixie
1621 #, no-wrap
1622 msgid "2024-06-15"
1623 msgstr "15 Junio 2024"
1624
1625 #. type: TH
1626 #: debian-trixie
1627 #, no-wrap
1628 msgid "Linux man-pages 6.9.1"
1629 msgstr "Páginas de Manual de Linux 6.9.1"
1630
1631 #. type: Plain text
1632 #: debian-trixie
1633 msgid ""
1634 "The attribute reported in answer to this request is B<UNIX_DIAG_NAME>. The "
1635 "payload associated with this attribute is the pathname to which the socket "
1636 "was bound (a sequence of bytes up to B<UNIX_PATH_MAX> length)."
1637 msgstr ""
1638
1639 #. type: Plain text
1640 #: debian-trixie
1641 msgid ""
1642 "For listening sockets: the number of pending connections. The length of the "
1643 "array associated with the B<UNIX_DIAG_ICONS> response attribute is equal to "
1644 "this value."
1645 msgstr ""
1646
1647 #. type: Plain text
1648 #: debian-trixie
1649 msgid ""
1650 "For listening sockets: the backlog length which equals to the value passed "
1651 "as the second argument to B<listen>(2)."
1652 msgstr ""
1653
1654 #. type: Plain text
1655 #: debian-trixie
1656 msgid "For listening sockets: the backlog length."
1657 msgstr ""
1658
1659 #. type: Plain text
1660 #: debian-trixie
1661 #, no-wrap
1662 msgid ""
1663 "#include E<lt>errno.hE<gt>\n"
1664 "#include E<lt>stdio.hE<gt>\n"
1665 "#include E<lt>string.hE<gt>\n"
1666 "#include E<lt>unistd.hE<gt>\n"
1667 "#include E<lt>sys/socket.hE<gt>\n"
1668 "#include E<lt>sys/un.hE<gt>\n"
1669 "#include E<lt>linux/netlink.hE<gt>\n"
1670 "#include E<lt>linux/rtnetlink.hE<gt>\n"
1671 "#include E<lt>linux/sock_diag.hE<gt>\n"
1672 "#include E<lt>linux/unix_diag.hE<gt>\n"
1673 "\\&\n"
1674 "static int\n"
1675 "send_query(int fd)\n"
1676 "{\n"
1677 " struct sockaddr_nl nladdr = {\n"
1678 " .nl_family = AF_NETLINK\n"
1679 " };\n"
1680 " struct\n"
1681 " {\n"
1682 " struct nlmsghdr nlh;\n"
1683 " struct unix_diag_req udr;\n"
1684 " } req = {\n"
1685 " .nlh = {\n"
1686 " .nlmsg_len = sizeof(req),\n"
1687 " .nlmsg_type = SOCK_DIAG_BY_FAMILY,\n"
1688 " .nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP\n"
1689 " },\n"
1690 " .udr = {\n"
1691 " .sdiag_family = AF_UNIX,\n"
1692 " .udiag_states = -1,\n"
1693 " .udiag_show = UDIAG_SHOW_NAME | UDIAG_SHOW_PEER\n"
1694 " }\n"
1695 " };\n"
1696 " struct iovec iov = {\n"
1697 " .iov_base = &req,\n"
1698 " .iov_len = sizeof(req)\n"
1699 " };\n"
1700 " struct msghdr msg = {\n"
1701 " .msg_name = &nladdr,\n"
1702 " .msg_namelen = sizeof(nladdr),\n"
1703 " .msg_iov = &iov,\n"
1704 " .msg_iovlen = 1\n"
1705 " };\n"
1706 "\\&\n"
1707 " for (;;) {\n"
1708 " if (sendmsg(fd, &msg, 0) E<lt> 0) {\n"
1709 " if (errno == EINTR)\n"
1710 " continue;\n"
1711 "\\&\n"
1712 " perror(\"sendmsg\");\n"
1713 " return -1;\n"
1714 " }\n"
1715 "\\&\n"
1716 " return 0;\n"
1717 " }\n"
1718 "}\n"
1719 "\\&\n"
1720 "static int\n"
1721 "print_diag(const struct unix_diag_msg *diag, unsigned int len)\n"
1722 "{\n"
1723 " if (len E<lt> NLMSG_LENGTH(sizeof(*diag))) {\n"
1724 " fputs(\"short response\\[rs]n\", stderr);\n"
1725 " return -1;\n"
1726 " }\n"
1727 " if (diag-E<gt>udiag_family != AF_UNIX) {\n"
1728 " fprintf(stderr, \"unexpected family %u\\[rs]n\", diag-E<gt>udiag_family);\n"
1729 " return -1;\n"
1730 " }\n"
1731 "\\&\n"
1732 " unsigned int rta_len = len - NLMSG_LENGTH(sizeof(*diag));\n"
1733 " unsigned int peer = 0;\n"
1734 " size_t path_len = 0;\n"
1735 " char path[sizeof(((struct sockaddr_un *) 0)-E<gt>sun_path) + 1];\n"
1736 "\\&\n"
1737 " for (struct rtattr *attr = (struct rtattr *) (diag + 1);\n"
1738 " RTA_OK(attr, rta_len); attr = RTA_NEXT(attr, rta_len)) {\n"
1739 " switch (attr-E<gt>rta_type) {\n"
1740 " case UNIX_DIAG_NAME:\n"
1741 " if (!path_len) {\n"
1742 " path_len = RTA_PAYLOAD(attr);\n"
1743 " if (path_len E<gt> sizeof(path) - 1)\n"
1744 " path_len = sizeof(path) - 1;\n"
1745 " memcpy(path, RTA_DATA(attr), path_len);\n"
1746 " path[path_len] = \\[aq]\\[rs]0\\[aq];\n"
1747 " }\n"
1748 " break;\n"
1749 "\\&\n"
1750 " case UNIX_DIAG_PEER:\n"
1751 " if (RTA_PAYLOAD(attr) E<gt>= sizeof(peer))\n"
1752 " peer = *(unsigned int *) RTA_DATA(attr);\n"
1753 " break;\n"
1754 " }\n"
1755 " }\n"
1756 "\\&\n"
1757 " printf(\"inode=%u\", diag-E<gt>udiag_ino);\n"
1758 "\\&\n"
1759 " if (peer)\n"
1760 " printf(\", peer=%u\", peer);\n"
1761 "\\&\n"
1762 " if (path_len)\n"
1763 " printf(\", name=%s%s\", *path ? \"\" : \"@\",\n"
1764 " *path ? path : path + 1);\n"
1765 "\\&\n"
1766 " putchar(\\[aq]\\[rs]n\\[aq]);\n"
1767 " return 0;\n"
1768 "}\n"
1769 "\\&\n"
1770 "static int\n"
1771 "receive_responses(int fd)\n"
1772 "{\n"
1773 " long buf[8192 / sizeof(long)];\n"
1774 " struct sockaddr_nl nladdr;\n"
1775 " struct iovec iov = {\n"
1776 " .iov_base = buf,\n"
1777 " .iov_len = sizeof(buf)\n"
1778 " };\n"
1779 " int flags = 0;\n"
1780 "\\&\n"
1781 " for (;;) {\n"
1782 " struct msghdr msg = {\n"
1783 " .msg_name = &nladdr,\n"
1784 " .msg_namelen = sizeof(nladdr),\n"
1785 " .msg_iov = &iov,\n"
1786 " .msg_iovlen = 1\n"
1787 " };\n"
1788 "\\&\n"
1789 " ssize_t ret = recvmsg(fd, &msg, flags);\n"
1790 "\\&\n"
1791 " if (ret E<lt> 0) {\n"
1792 " if (errno == EINTR)\n"
1793 " continue;\n"
1794 "\\&\n"
1795 " perror(\"recvmsg\");\n"
1796 " return -1;\n"
1797 " }\n"
1798 " if (ret == 0)\n"
1799 " return 0;\n"
1800 "\\&\n"
1801 " if (nladdr.nl_family != AF_NETLINK) {\n"
1802 " fputs(\"!AF_NETLINK\\[rs]n\", stderr);\n"
1803 " return -1;\n"
1804 " }\n"
1805 "\\&\n"
1806 " const struct nlmsghdr *h = (struct nlmsghdr *) buf;\n"
1807 "\\&\n"
1808 " if (!NLMSG_OK(h, ret)) {\n"
1809 " fputs(\"!NLMSG_OK\\[rs]n\", stderr);\n"
1810 " return -1;\n"
1811 " }\n"
1812 "\\&\n"
1813 " for (; NLMSG_OK(h, ret); h = NLMSG_NEXT(h, ret)) {\n"
1814 " if (h-E<gt>nlmsg_type == NLMSG_DONE)\n"
1815 " return 0;\n"
1816 "\\&\n"
1817 " if (h-E<gt>nlmsg_type == NLMSG_ERROR) {\n"
1818 " const struct nlmsgerr *err = NLMSG_DATA(h);\n"
1819 "\\&\n"
1820 " if (h-E<gt>nlmsg_len E<lt> NLMSG_LENGTH(sizeof(*err))) {\n"
1821 " fputs(\"NLMSG_ERROR\\[rs]n\", stderr);\n"
1822 " } else {\n"
1823 " errno = -err-E<gt>error;\n"
1824 " perror(\"NLMSG_ERROR\");\n"
1825 " }\n"
1826 "\\&\n"
1827 " return -1;\n"
1828 " }\n"
1829 "\\&\n"
1830 " if (h-E<gt>nlmsg_type != SOCK_DIAG_BY_FAMILY) {\n"
1831 " fprintf(stderr, \"unexpected nlmsg_type %u\\[rs]n\",\n"
1832 " (unsigned) h-E<gt>nlmsg_type);\n"
1833 " return -1;\n"
1834 " }\n"
1835 "\\&\n"
1836 " if (print_diag(NLMSG_DATA(h), h-E<gt>nlmsg_len))\n"
1837 " return -1;\n"
1838 " }\n"
1839 " }\n"
1840 "}\n"
1841 "\\&\n"
1842 "int\n"
1843 "main(void)\n"
1844 "{\n"
1845 " int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG);\n"
1846 "\\&\n"
1847 " if (fd E<lt> 0) {\n"
1848 " perror(\"socket\");\n"
1849 " return 1;\n"
1850 " }\n"
1851 "\\&\n"
1852 " int ret = send_query(fd) || receive_responses(fd);\n"
1853 "\\&\n"
1854 " close(fd);\n"
1855 " return ret;\n"
1856 "}\n"
1857 msgstr ""
1858
1859 #. type: TH
1860 #: fedora-44 fedora-rawhide
1861 #, no-wrap
1862 msgid "2024-11-17"
1863 msgstr "17 Noviembre 2024"
1864
1865 #. type: TH
1866 #: fedora-44 fedora-rawhide
1867 #, no-wrap
1868 msgid "Linux man-pages 6.13"
1869 msgstr "Páginas de Manual de Linux 6.13"
1870
1871 #. type: TH
1872 #: mageia-cauldron
1873 #, no-wrap
1874 msgid "Linux man-pages 6.17"
1875 msgstr "Páginas de Manual de Linux 6.17"
1876
1877 #. type: TH
1878 #: opensuse-leap-16-1 opensuse-tumbleweed
1879 #, no-wrap
1880 msgid "Linux man-pages (unreleased)"
1881 msgstr "Páginas de Manual de Linux (no publicadas)"