How to implement a new linuxulator ioctl

Martin Laabs martin.laabs at
Sat Oct 25 10:58:51 UTC 2008


as I wrote recently on -hackers I hacked libusb in a 
way that it is a linux binary but uses the bsd interface
for low-level usb communication. I need this for a linux binary
program which uses libusb. I'd like to run this with the 
However - I realized, that the ioctls of the linuxulator are
wrapped. So I have to add some ioctls to the linuxulator module
in that way that they are just executed as normal (nativ)
system ioctls.
Libusb uses only a small number of different ioctl so that
it should not be very hard. However I have not found any
documentation how the ioctl mapping works. (data structures,
initilisation calls and so on.)
So can you give me a short guideline what I have to do/add to
the linuxulator?
And maybe also how I can call a nativ system ioctl out of
the kernel context.

Thank you,
 Martin L.

More information about the freebsd-emulation mailing list