Re: fd type from number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 19, 2014 at 6:38 PM, Loris Degioanni <loris@xxxxxxxxxx> wrote:
> (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?

https://www.kernel.org/doc/Documentation/filesystems/files.txt

See point 4.

Daniel.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux