I am trying to find which members (s) of struct fdtable or struct file will allow me to determine if the open file is a socket or a pipe.
The only way I can find is:
struct file f ....; f.path->mnt->mnt_devname
This returns the device name at the mount point, all sockets / pipes apparently belong to sockfs or pipefs respectively.
Is there a faster way to check if an open file is a socket or pipe using another member of the structure file or fdtable?
Note. I use kernel definitions from 2.6.24
Hunter mcmillen
source share