Where is vnode_t defined?

573 Views Asked by At

I'm trying to use a vnode_t which is defined as struct vnode *. I can find plenty of references to struct vnode but I cannot find the header in which is defined. Can anyone help?

1

There are 1 best solutions below

6
On

It's in the bsd/sys/vnode_internal.h file. Line 134 in my source.

From a test I did it looks like vnode is left undefined from system headers and linked in when run as the definition of vnode is not required as pointers are being passed around with no direct modification to the internal structure except for the kernel functions themselves. It's forward declared in a header file (forgot which now).

The real definition can be found in http://elephant.cs.fiu.edu/source/xref/xnu-1699.24.23/bsd/sys/vnode_internal.h#134