From mboxrd@z Thu Jan 1 00:00:00 1970 From: loris@draios.com (Loris Degioanni) Date: Tue, 19 Aug 2014 08:38:24 -0700 Subject: fd type from number Message-ID: <53F36F70.3020001@draios.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org (resending making sure this is not part of another thread) I'm looking for an efficient way to determine the type of an fd (file, socket...) given its number, from a kernel module. The closest thing I found by looking at the kernel sources is sockfd_lookup(), which works but is limited to telling me if the fd is a socket or not. Is there something else I can look at? Thank you in advance, Loris