int ioctl(fd, request, arg) int fd, request; caddr_t arg;
ioctl() performs a special function on the object referred to by the open descriptor fd. The set of functions that may be performed depends on the object that fd refers to. For example, many operating characteristics of character special files (for instance, terminals) may be controlled with ioctl() requests. The writeups in section 4 discuss how ioctl() applies to various objects.
The request codes for particular functions are specified in include files specific to objects or to families of objects; the writeups in section 4 indicate which include files specify which requests.
For most ioctl() functions, arg is a pointer to data to be used by the function or to be filled in by the function. Other functions may ignore arg or may treat it directly as a data item; they may, for example, be passed an int value.
ioctl() will also fail if the object on which the function is being performed detects an error. In this case, an error code specific to the object and the function will be returned.
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97