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:
- if socket is bound, print name of this socket
- if socket has connected to a peer with a name, print peers name
- if socket has connected to a peer without a name, print [pid fd]
- 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