icon Top 9 categories map      RocketAware > man pages >


Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.

The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Search all pages


By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Integer, Floating point, Matrix, Statistics, Boolean, ...

Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...


RocketLink!--> Man page versions: OpenBSD FreeBSD NetBSD RedHat Solaris Others

IOCTL(2)                  OpenBSD Programmer's Manual                 IOCTL(2)

     ioctl - control device

     #include <sys/ioctl.h>

     ioctl(int d, unsigned long request, ...);

     The ioctl() function manipulates the underlying device parameters of spe-
     cial files.  In particular, many operating characteristics of character
     special files (e.g. terminals) may be controlled with ioctl() requests.

     The argument d must be an open file descriptor. The third argument is
     called arg and contains additional information needed by this device to
     perform the requested function.  arg is either an int or a pointer to a
     device-specific data structure, depending upon the given request.

     An ioctl request has encoded in it whether the argument is an ``in'' pa-
     rameter or ``out'' parameter, and the size of the third argument (arg) in
     bytes.  Macros and defines used in specifying an ioctl request are locat-
     ed in the file <sys/ioctl.h>.

     If an error has occurred, a value of -1 is returned and errno is set to
     indicate the error.

     ioctl() will fail if:

     [EBADF]       d is not a valid descriptor.

     [ENOTTY]      d is not associated with a character special device.

     [ENOTTY]      The specified request does not apply to the kind of object
                   that the descriptor d references.

     [EINVAL]      request or argp is not valid.

     cdio(1),  chio(1),  mt(1),  execve(2),  fcntl(2),  intro(4),  tty(4)

     An ioctl() function call appeared in Version 7 AT&T UNIX.

OpenBSD 2.6                    December 11, 1993                             1

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.

(Corrections, notes, and links courtesy of RocketAware.com)

[Detailed Topics]

[Overview Topics]

Up to: Stdio Stream file operations - Buffered access of files and devices. fopen, fputc, fgetc, et al.
Up to: Low level file and device operations - " Unbuffered " access of files and devices. (ioctl, fcntl, /dev, et al)
Up to: Hardware Access
Up to: Socket and I/O Operations - socket() and related functions.

RocketLink!--> Man page versions: OpenBSD FreeBSD NetBSD RedHat Solaris Others

Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > ioctl.2/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments