Print protocol name of socket descriptors with -yy option

For those socket descriptors that have no associated ip:port pairs
(or when this information is not available), -yy option prints
the same <socket:[INODE]> information as -y option, e.g.

$ strace -e sendto -yy ip l > /dev/null
sendto(3<socket:[23456789]>, ...

This change makes -yy output more informative: instead of just
printing "socket", the name of protocol behind the socket descriptor
will be printed, e.g.

sendto(3<NETLINK:[23456789]>, ...

* configure.ac (AC_CHECK_HEADERS): Add sys/xattr.h.
* tests/net-yy-accept.awk: Update to support protocol names.
* tests/net-yy-connect.awk: Likewise.
* util.c [HAVE_SYS_XATTR_H]: Include <sys/xattr.h>.
(getfdproto): New function.
(printfd): Use it.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
diff --git a/configure.ac b/configure.ac
index f9b056d..4732778 100644
--- a/configure.ac
+++ b/configure.ac
@@ -251,6 +251,7 @@
 	sys/ptrace.h
 	sys/reg.h
 	sys/vfs.h
+	sys/xattr.h
 ]))
 AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
                  [], [], [#include <stddef.h>