freebsd-dev/usr.bin/sockstat
Gleb Smirnoff 2c436d4890 sockstat(1): print out full connection graph for unix(4) sockets
Kernel provides us with enough information to display all possible
connections between UNIX sockets.

o Store unp_conn, xu_firstref and xu_nextref in the faddr of a UNIX sock.
o Build tree of file descriptors, indexed by the socket pointer.
o In displaysock() print out all possible information:
  1) if socket is bound, print name of this socket
  2) if socket has connected to a peer with a name, print peers name
  3) if socket has connected to a peer without a name, print [pid fd]
  4) if a bound socket has received connections, print list of them
     as [pid fd]
  Previously, only 1) either 2) were printed.

Reviewed by:		tuexen
Differential revision:	https://reviews.freebsd.org/D35726
2022-07-06 22:19:08 -07:00
..
Makefile sockstat: use cap_pwd 2021-06-18 18:08:30 +02:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
sockstat.1 sockstat(1): print out full connection graph for unix(4) sockets 2022-07-06 22:19:08 -07:00
sockstat.c sockstat(1): print out full connection graph for unix(4) sockets 2022-07-06 22:19:08 -07:00