April 2012
Intermediate to advanced
352 pages
8h
English
To define an ioctl command, you’d call one of the following macros: _IO, _IOR, _IOW, or _IOWR. An explanation of each macro is provided in Table 3-1.
Table 3-1. ioctl Command Macros
Macro | Description |
|---|---|
| Creates an ioctl command for an I/O operation that transfers no data—in other words, the |
| Creates an ioctl command for a read operation; read operations transfer data from the device to user space; for example, retrieving error information |
| Creates an ioctl command for a write operation; write operations transfer data to the device from user space; for example, setting a device parameter |
| Creates an ioctl command for an I/O operation with bidirectional ... |