Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. In computing,
ioctl, short for input/output control, is a system call for
device-specific operations and other operations which cannot be
expressed by regular system calls. It takes a parameter specifying a
request code; the effect of a call depends completely on the request
code. Request codes are often device-specific. For instance, a CD-ROM
driver which can get a physical device to eject a disc would provide an
ioctl request code to do that. Device-independent request codes are
sometimes used to give userland access to kernel functions which are
only used by core system software or still under development. The
"ioctl" system call first appeared in Version 7 of Unix under that name.
It is supported by most Unix and Unix-like systems, including Linux and
Mac OS X, though the available request codes differ from system to
system. Microsoft Windows provides a similar function, named
"DeviceIoControl", in its Win32 API.