probe for open files

Hi,i need to write file system driver that will query the vnode inside the kernel and will print all open files (descriptors) in real time.since im newbie i wanted to know where to start.which facility i need to
[297 byte] By [udia] at [2007-11-27 1:57:38]
# 1
Grab the source for lsof ... http://www.sunfreeware.com/
dickdunbara at 2007-7-12 1:33:28 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2
i need to know where the notification of the files are happening inside the kernel.for example how can i know when fd is open or close.lsog wont help, its in user space and its slow.i need to catch event when its happened.
udia at 2007-7-12 1:33:28 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 3
is there any way to grab all OPEN events inside the VNODE?
udia at 2007-7-12 1:33:28 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...