ss: Show inet and unix sockets' shutdown state

When extended info is requested (-e option) one will be able to observe
arrows in the output, like this:

ESTAB 0 0  ino:143321 sk:ffff88003a8cea00 -->
ESTAB 0 0  ino:143322 sk:ffff88003a8ce4c0 <--
ESTAB 0 0  ino:143323 sk:ffff88003a8cdf80 ---
ESTAB 0 0  ino:143324 sk:ffff88003b7f05c0 <->

for SHUT_RD, SHUT_WR, SHUT_RDWR and non-shutdown sockets respectively.

The respective nlattrs in *_diag messages has appeared in Linux v3.7 and
are already present in ss's headers.

Signed-off-by: Pavel Emelyanov <>
1 file changed