I'm currently playing around a bit with kvm_getfiles and found that I couldn't use KERN_FILE_BYFILE with DTYPE_SOCKET. According to kvm_getfiles(3): For KERN_FILE_BYFILE the recognized file types are defined in <sys/file.h>:
DTYPE_VNODE files and devices DTYPE_SOCKET sockets, regardless of domain DTYPE_PIPE pipes and FIFOs DTYPE_KQUEUE kqueues But these defines are under ifdef _KERNEL. So is the manpage lying here, or should the defines be hoisted out of the ifdef? martijn@