xref: /386bsd/usr/share/man/cat2/ioctl.0 (revision a2142627)
1IOCTL(2)                  386BSD Programmer's Manual                  IOCTL(2)
2
3NNAAMMEE
4     iiooccttll - control device
5
6SSYYNNOOPPSSIISS
7     ##iinncclluuddee <<ssyyss//iiooccttll..hh>>
8
9     _i_n_t
10     iiooccttll(_i_n_t _d, _u_n_s_i_g_n_e_d _l_o_n_g _r_e_q_u_e_s_t, _c_h_a_r *_a_r_g_p)
11
12DDEESSCCRRIIPPTTIIOONN
13     The iiooccttll() function manipulates the underlying device parameters of
14     special files.  In particular, many operating characteristics of
15     character special files (e.g. terminals) may be controlled with iiooccttll()
16     requests.  The argument _d must be an open file descriptor.
17
18     An  ioctl _r_e_q_u_e_s_t has encoded in it whether the argument is an ``in''
19     parameter or ``out'' parameter, and the size of the argument _a_r_g_p in
20     bytes.  Macros and defines used in specifying an ioctl _r_e_q_u_e_s_t are
21     located in the file <_s_y_s/_i_o_c_t_l._h>.
22
23RREETTUURRNN VVAALLUUEESS
24     If an error has occurred, a value of -1 is returned and _e_r_r_n_o is set to
25     indicate the error.
26
27EERRRROORRSS
28     IIooccttll() will fail:
29
30     [EBADF]   _d is not a valid descriptor.
31
32     [ENOTTY]  _d is not associated with a character special device.
33
34     [ENOTTY]  The specified request does not apply to the kind of object that
35               the descriptor _d references.
36
37     [EINVAL]  _R_e_q_u_e_s_t or _a_r_g_p is not valid.
38
39SSEEEE AALLSSOO
40     execve(2),  fcntl(2),  mt(4),  tty(4),  intro(4)
41
42HHIISSTTOORRYY
43     An iiooccttll function call appeared in Version 7 AT&T UNIX.
44
454th Berkeley Distribution       March 10, 1991                               1
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67