Pergunta # 1
Q1: From the ss man page I can't find out, what does it mean e.g. * 8567674 without file path.
De os documentos, explica a coluna Endereço: Porta assim:
trechoThe format and semantics of ADDRESS_PATTERN depends on address family.
- inet - ADDRESS_PATTERN consists of IP prefix, optionally followed by colon and port. If prefix or port part is absent or replaced with *, this means wildcard match.
- inet6 - The same as inet, only prefix refers to an IPv6 address. Unlike inet colon becomes ambiguous, so that ss allows to use scheme, like used in URLs, where address is suppounded with [ ... ].
- unix - ADDRESS_PATTERN is shell-style wildcard.
- packet - format looks like inet, only interface index stays instead of port and link layer protocol id instead of address.
- netlink - format looks like inet, only socket pid stays instead of port and netlink channel instead of address.
PORT is syntactically ADDRESS_PATTERN with wildcard address part. Certainly, it is undefined for UNIX sockets.
A última sentença é sua resposta.
Pergunta # 2
Q2: Why there is no file path to unix socket for some cases?
Veja isto SO Q & A intitulado: Como usar o soquete do domínio unix sem criar um arquivo de soquete .
trechoYou can create a unix domain socket with an "abstract socket address". Simply make the first character of the
sun_path
string in thesockaddr_un
you pass to bind be'
. After this initial'Q3: How can I sniff unix DGRAM socket through socat without having file path?
NUL
, write a string to the remainder ofsun_path
and pad it out toUNIX_PATH_MAX
withNULs
(or anything else).Sockets created this way will not have any filesystem entry, ....
Pergunta # 3
- ABSTRACT-LISTEN:
- ABSTRACT-SENDTO:
- ABSTRACT-RECVFROM:
- ABSTRACT-RECV:
- ABSTRACT-CLIENT: >
The ABSTRACT addresses are almost identical to the related UNIX addresses except that they do not address file system based sockets but an alternate UNIX domain address space. To archive this the socket address strings are prefixed with "%bl0ck_qu0te%" internally. This feature is available (only?) on Linux. Option groups are the same as with the related UNIX addresses, except that the ABSTRACT addresses are not member of the NAMED group.
Mais uma vez, googling, uma vez que você sabe o que as coisas são chamadas: documentos socat .
trecho %bl0ck_qu0te%