Discuss how we can control hardware with IOCTL system calls.
Useful Links:-
http://en.wikipedia.org/wiki/Ioctl
http://www.linuxjournal.com/article/6908
http://www.makelinux.net/ldd3/chp-6-sect-1
http://linux.die.net/lkmpg/x892.html
Useful Links:-
http://en.wikipedia.org/wiki/Ioctl
http://www.linuxjournal.com/article/6908
http://www.makelinux.net/ldd3/chp-6-sect-1
http://linux.die.net/lkmpg/x892.html
An ioctl interface is a single system call by which userspace may communicate with device-drivers. Requests on a device-driver are vectored with respect to this ioctl system call, typically by a handle to the device and a request number. The basic kernel can thus allow the userspace to access a device-driver without knowing anything about the facilities supported by the device, and without needing an unmanageably large collection of system calls
ReplyDeleteA Unix ioctl call takes as parameters:
1. an open file descriptor
2. a request code number
3. either an integer value, possibly unsigned (going to the driver) or a pointer to data (either going to the driver, coming back from the driver, or both).