> >> By looking up the NV code, I don't think there is a function which can 
 > >> convert door_handle_t to a fd. But I don't see any problem if dls 
 > >> keeps the fd information if needed.
 > > 
 > > But the specific fd passed in only valid for the process which called 
 > > the initial ioctl.  There would need to be some way to map that to a 
 > > descriptor in a different process making the "I want access to this 
 > > door" request...
 > > 
 > Ah. That is correct. Sorry that I don't know how to solve this problem.

You can use fassign() to bind a vnode to a newly-allocated file descriptor
in curproc's file descriptor "table".  If that doesn't do quite what you
need, you can probably build it with falloc() and setf().  Of course, all
of the above requires that curproc be the right process :-)  To ensure that
with STREAMS, this sort of work needs to be deferred to the stream head.

--
meem

Reply via email to