Expand description
Which process holds the other end of a loopback connection: the one that connected from peer to server. It is read
from the operating systemβs own connection table (Windows: the extended TCP table; Linux: /proc/net/tcp and the
descriptors under /proc; macOS: lsof). None when it cannot be said: the lookup is not supported, the table could
not be read, the peer is not an IPv4 loopback address, or no process was found (a proxy or a tunnel holds the connection).
The tables are read by the pure functions below, so their tests need no connection.
ModulesΒ§
- os π
StructsΒ§
- TcpRow π
- One row of the Windows extended TCP table, in the fields the lookup reads.
EnumsΒ§
- Descriptors π
- Whether this process can read
pidβs open descriptors.Hiddenis a process that hides them from others (Linux: a process that is not dumpable, as a packaged srv is). A system that does not hide them saysReadable. - Listeners π
- Who listens on an address.
FunctionsΒ§
- descriptors_
of π - inode_
in_ πproc_ net_ tcp - The socket inode of the connection from
peertoserverin the text of/proc/net/tcp. - listeners_
at π - Who listens on
addr, if the system says: the listener that answers a request sent to that address.Nonewhen it cannot be said (not supported, the table could not be read, the address is not an IPv4 loopback address, or nothing listens there). - listeners_
in_ πrows - The processes of the rows that listen on
addr: a local end on that port (on that address or on every address) and no remote end. - listening_
inodes_ πin_ proc_ net_ tcp - The socket inodes that listen on
addrin the text of/proc/net/tcp(state0A, on that address or on every address). - owner_
in_ πrows - The process of the row that is the clientβs end: its local end is
peerand its remote end isserver. - owner_
of π - The process that connected from
peertoserver, if the system says. - parse_
tcp_ πtable - The rows of a
MIB_TCPTABLE_OWNER_PIDbuffer (a count, then 24 bytes a row: state, local address, local port, remote address, remote port, owning process; ports in network order in the low 16 bits). - pids_
in_ πlsof - The process ids
lsof -Fpnamed, onep<pid>line each.