Performs a variety of control functions on a FIFO or socket.
#include <unistd.h> int ioctl ( int fildes, int request, ...);
(IN) Specifies a descriptor returned from the open, pipe, sopen, or socket function.
(IN) Specifies the control function to be performed.
For FIFOs, see I/O Control Flags for FIFOs.
For BSD sockets, see I/O Control Flags for Sockets.
(IN/OUT) Points to an additional argument to be used or points to an argument returned by ioctl (depending on the control function performed).
If successful, returns a value dependent upon the control function (request parameter) but must be a nonnegative integer. Otherwise, returns -1 and sets errno to one of the following:
The ioctl function manipulates the underlying device parameters of special files, such as FIFOs and BSD sockets.