next up previous
Next: Using macros to generate Up: FUSD: A Linux Framework Previous: The difference between device_info

Writing ioctl Callbacks

The POSIX API provides for a function called ioctl, which allows ``out-of-band'' configuration information to be passed to a device driver through a file descriptor. Using FUSD, you can write a device driver with a callback to handle ioctl requests from clients. For the most part, it's just like writing a callback for read or write, as we've seen in previous sections. From the client's point of view, ioctl traditionally takes three arguments: a file descriptor, a command number, and a pointer to any additional data that might be required for the command.


Jeremy Elson 2003-08-20