 |
Index for Section 9 |
|
 |
Alphabetical listing for Special Characters |
|
 |
Bottom of page |
|
_IOW(9r)
NAME
_IOW - General: Defines ioctl types for device control operations
SYNOPSIS
#include <sys/ioctl.h>
_IOW(
g,
n,
t );
ARGUMENTS
g Specifies the group that this ioctl type belongs to. This argument must
be a nonnegative 8-bit number (that is, in the range 0-255 inclusive).
You can pass the value 0 (zero) to this argument if a new ioctl group
is not being defined.
n Specifies the specific ioctl type within the group. These types should
be sequentially assigned numbers for each different ioctl operation the
driver supports. This argument must be a nonnegative 8-bit number (that
is, in the range 0-255 inclusive).
t Specifies the size of the data passed from the user application back to
the kernel. The kernel determines the number of bytes to transfer by
passing the value in this argument to the sizeof operator.
DESCRIPTION
The _IOW macro defines ioctl types for situations where data is transferred
from the user's buffer into the kernel. Typically, this data consists of
device control or status information passed to the driver from the
application program.
EXAMPLE
The following example uses the _IOW macro to construct an ioctl called
DN_SETCOUNT. Note that DN_SETCOUNT passes the value zero (0) for the group
that this ioctl belongs to and the value 3 to identify the specific ioctl
type within the group. The DN_SETCOUNT ioctl also passes the data type int,
which the kernel passes to the sizeof operator to determine how much data
is passed from the user application back to the kernel.
#define DN_SETCOUNT _IOR(0,3,int)
SEE ALSO
ioctl Commands: _IO(9r), _IOR(9r), _IOWR(9r)
 |
Index for Section 9 |
|
 |
Alphabetical listing for Special Characters |
|
 |
Top of page |
|