Given a file descriptor, I need to get its absolute path whether it is a regular file or a AF_UNIX
socket. The code at How can I get a filename from a file descriptor inside a kernel module? works for regular files but with AF_UNIX
sockets I get something like this "socket:[12345]"
instead of the absolute path "/tmp/.X11-unix/X0".
struct sockaddr_un {
unsigned short sun_family; // AF_UNIX
char sun_path[108]; // pathname
};