]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/ioctl_list.2
ioctl_list.2: Remove hex values from constants
[thirdparty/man-pages.git] / man2 / ioctl_list.2
1 .\" Ioctl List 1.3.27 is copyright 1995 by Michael Elizabeth Chastain.
2 .\" Michael Elizabeth Chastain
3 .\" <mec@duracef.shout.net>
4 .\"
5 .\" %%%LICENSE_START(GPLv2_MISC)
6 .\" It is licensed under the GNU General Public License, Version 2.
7 .\" %%%LICENSE_END
8 .\"
9 .\" Ioctl List 1.3.27
10 .\" Sun 17 Sep 1995
11 .\"
12 .\" // Copyright
13 .\"
14 .\"
15 .\"
16 .\" // Change Log
17 .\"
18 .\" 1.3.27 421 ioctls.
19 .\" Type information for non-pointer args.
20 .\" SIOCDEVPRIVATE, SIOCPROTOPRIVATE ioctls.
21 .\" Descriptions of extended arguments.
22 .\"
23 .\" 1.2.9 365 ioctls.
24 .\" First public version.
25 .\"
26 .\"
27 .\" 2007-12-29 Alain Portal <aportal@univ-montp2.fr> and Michael Kerrisk
28 .\" <mtk.manpages@gmail.com>:
29 .\" Various formatting improvements
30 .\"
31 .TH IOCTL_LIST 2 2019-11-19 "Linux" "Linux Programmer's Manual"
32 .SH NAME
33 ioctl_list \- list of ioctl calls in Linux/i386 kernel
34 .SH DESCRIPTION
35 This is Ioctl List 1.3.27, a list of ioctl calls in Linux/i386 kernel
36 1.3.27.
37 It contains 421 ioctls from
38 .IR </usr/include/{asm,linux}/*.h> .
39 For each ioctl, its numerical value, its name, and its argument
40 type are given.
41 .PP
42 An argument type of
43 .I "const struct foo\ *"
44 means the argument is input to the kernel.
45 .I "struct foo\ *"
46 means the kernel outputs the argument.
47 If the kernel uses the argument for both input and output, this is
48 marked with \fI//\ I-O\fP.
49 .PP
50 Some ioctls take more arguments or return more values than a single
51 structure.
52 These are marked \fI//\ MORE\fP and documented further in a
53 separate section.
54 In addition, information about some ioctls can be found in
55 the pages listed under SEE ALSO in
56 .BR ioctl (2).
57 .PP
58 This list is very incomplete.
59 .SS ioctl structure
60 .\" added two sections - aeb
61 Ioctl command values are 32-bit constants.
62 In principle these constants are completely arbitrary, but people have
63 tried to build some structure into them.
64 .PP
65 The old Linux situation was that of mostly 16-bit constants, where the
66 last byte is a serial number, and the preceding byte(s) give a type
67 indicating the driver.
68 Sometimes the major number was used: 0x03
69 for the
70 .B HDIO_*
71 ioctls, 0x06 for the
72 .B LP*
73 ioctls.
74 And sometimes
75 one or more ASCII letters were used.
76 For example,
77 .B TCGETS
78 has value
79 0x00005401, with 0x54 = \(aqT\(aq indicating the terminal driver, and
80 .B CYGETTIMEOUT
81 has value 0x00435906, with 0x43 0x59 = \(aqC\(aq \(aqY\(aq
82 indicating the cyclades driver.
83 .PP
84 Later (0.98p5) some more information was built into the number.
85 One has 2 direction bits
86 (00: none, 01: write, 10: read, 11: read/write)
87 followed by 14 size bits (giving the size of the argument),
88 followed by an 8-bit type (collecting the ioctls in groups
89 for a common purpose or a common driver), and an 8-bit
90 serial number.
91 .PP
92 The macros describing this structure live in
93 .I <asm/ioctl.h>
94 and are
95 .B _IO(type,nr)
96 and
97 .BR "{_IOR,_IOW,_IOWR}(type,nr,size)" .
98 They use
99 .I sizeof(size)
100 so that size is a
101 misnomer here: this third argument is a data type.
102 .PP
103 Note that the size bits are very unreliable: in lots of cases
104 they are wrong, either because of buggy macros using
105 .IR sizeof(sizeof(struct)) ,
106 or because of legacy values.
107 .PP
108 Thus, it seems that the new structure only gave disadvantages:
109 it does not help in checking, but it causes varying values
110 for the various architectures.
111 .SH RETURN VALUE
112 Decent ioctls return 0 on success and \-1 on error, while
113 any output value is stored via the argument.
114 However,
115 quite a few ioctls in fact return an output value.
116 This is not yet indicated below.
117 .PP
118 // Main table.
119 .PP
120 // <include/asm-i386/socket.h>
121 .TS
122 l l.
123 FIOSETOWN const int *
124 SIOCSPGRP const int *
125 FIOGETOWN int *
126 SIOCGPGRP int *
127 SIOCATMAR int *
128 SIOCGSTAMP timeval *
129 .TE
130 .sp 1
131 // <include/asm-i386/termios.h>
132 .TS
133 l l.
134 TCGETS struct termios *
135 TCSETS const struct termios *
136 TCSETSW const struct termios *
137 TCSETSF const struct termios *
138 TCGETA struct termio *
139 TCSETA const struct termio *
140 TCSETAW const struct termio *
141 TCSETAF const struct termio *
142 TCSBRK int
143 TCXONC int
144 TCFLSH int
145 TIOCEXCL void
146 TIOCNXCL void
147 TIOCSCTTY int
148 TIOCGPGRP pid_t *
149 TIOCSPGRP const pid_t *
150 TIOCOUTQ int *
151 TIOCSTI const char *
152 TIOCGWINSZ struct winsize *
153 TIOCSWINSZ const struct winsize *
154 TIOCMGET int *
155 TIOCMBIS const int *
156 TIOCMBIC const int *
157 TIOCMSET const int *
158 TIOCGSOFTCAR int *
159 TIOCSSOFTCAR const int *
160 FIONREAD int *
161 TIOCINQ int *
162 TIOCLINUX const char * // MORE
163 TIOCCONS void
164 TIOCGSERIAL struct serial_struct *
165 TIOCSSERIAL const struct serial_struct *
166 TIOCPKT const int *
167 FIONBIO const int *
168 TIOCNOTTY void
169 TIOCSETD const int *
170 TIOCGETD int *
171 TCSBRKP int
172 TIOCTTYGSTRUCT struct tty_struct *
173 FIONCLEX void
174 FIOCLEX void
175 FIOASYNC const int *
176 TIOCSERCONFIG void
177 TIOCSERGWILD int *
178 TIOCSERSWILD const int *
179 TIOCGLCKTRMIOS struct termios *
180 TIOCSLCKTRMIOS const struct termios *
181 TIOCSERGSTRUCT struct async_struct *
182 TIOCSERGETLSR int *
183 .TE
184 .\" Some tables are split into two or more to avoid the warning:
185 .\" "table wider than line width". Some lines are to long to fit
186 .\" on one line on an 80 columns console
187 .TS
188 l l.
189 TIOCSERGETMULTI struct serial_multiport_struct *
190 TIOCSERSETMULTI const struct serial_multiport_struct *
191 .TE
192 .sp 1
193 // <include/linux/ax25.h>
194 .TS
195 l l.
196 SIOCAX25GETUID const struct sockaddr_ax25 *
197 SIOCAX25ADDUID const struct sockaddr_ax25 *
198 SIOCAX25DELUID const struct sockaddr_ax25 *
199 SIOCAX25NOUID const int *
200 SIOCAX25DIGCTL const int *
201 SIOCAX25GETPARMS struct ax25_parms_struct * // I-O
202 .TE
203 .TS
204 l l.
205 SIOCAX25SETPARMS const struct ax25_parms_struct *
206 .TE
207 .sp 1
208 // <include/linux/cdk.h>
209 .TS
210 l l.
211 STL_BINTR void
212 STL_BSTART void
213 STL_BSTOP void
214 STL_BRESET void
215 .TE
216 .sp 1
217 // <include/linux/cdrom.h>
218 .TS
219 l l.
220 CDROMPAUSE void
221 CDROMRESUME void
222 CDROMPLAYMSF const struct cdrom_msf *
223 CDROMPLAYTRKIND const struct cdrom_ti *
224 CDROMREADTOCHDR struct cdrom_tochdr *
225 .TE
226 .TS
227 l l l.
228 CDROMREADTOCENTRY struct cdrom_tocentry * // I-O
229 .TE
230 .TS
231 l l l.
232 CDROMSTOP void
233 CDROMSTART void
234 CDROMEJECT void
235 CDROMVOLCTRL const struct cdrom_volctrl *
236 CDROMSUBCHNL struct cdrom_subchnl * // I-O
237 CDROMREADMODE2 const struct cdrom_msf * // MORE
238 CDROMREADMODE1 const struct cdrom_msf * // MORE
239 CDROMREADAUDIO const struct cdrom_read_audio * // MORE
240 CDROMEJECT_SW int
241 .TE
242 .TS
243 l l l.
244 CDROMMULTISESSION struct cdrom_multisession * // I-O
245 .TE
246 .TS
247 l l l.
248 CDROM_GET_UPC struct { char [8]; } *
249 CDROMRESET void
250 CDROMVOLREAD struct cdrom_volctrl *
251 CDROMREADRAW const struct cdrom_msf * // MORE
252 CDROMREADCOOKED const struct cdrom_msf * // MORE
253 CDROMSEEK const struct cdrom_msf *
254 .TE
255 .sp 1
256 // <include/linux/cm206.h>
257 .TS
258 l l.
259 CM206CTL_GET_STAT int
260 CM206CTL_GET_LAST_STAT int
261 .TE
262 .sp 1
263 // <include/linux/cyclades.h>
264 .TS
265 l l.
266 CYGETMON struct cyclades_monitor *
267 CYGETTHRESH int *
268 CYSETTHRESH int
269 CYGETDEFTHRESH int *
270 CYSETDEFTHRESH int
271 CYGETTIMEOUT int *
272 CYSETTIMEOUT int
273 CYGETDEFTIMEOUT int *
274 CYSETDEFTIMEOUT int
275 .TE
276 .sp 1
277 // <include/linux/fd.h>
278 .TS
279 l l.
280 FDCLRPRM void
281 FDSETPRM const struct floppy_struct *
282 FDDEFPRM const struct floppy_struct *
283 FDGETPRM struct floppy_struct *
284 FDMSGON void
285 FDMSGOFF void
286 FDFMTBEG void
287 FDFMTTRK const struct format_descr *
288 FDFMTEND void
289 FDSETEMSGTRESH int
290 FDFLUSH void
291 FDSETMAXERRS const struct floppy_max_errors *
292 FDGETMAXERRS struct floppy_max_errors *
293 FDGETDRVTYP struct { char [16]; } *
294 FDSETDRVPRM const struct floppy_drive_params *
295 FDGETDRVPRM struct floppy_drive_params *
296 FDGETDRVSTAT struct floppy_drive_struct *
297 FDPOLLDRVSTAT struct floppy_drive_struct *
298 FDRESET int
299 FDGETFDCSTAT struct floppy_fdc_state *
300 FDWERRORCLR void
301 FDWERRORGET struct floppy_write_errors *
302 .TE
303 .TS
304 l l l.
305 FDRAWCMD struct floppy_raw_cmd * // MORE // I-O
306 FDTWADDLE void
307 .TE
308 .sp 1
309 // <include/linux/fs.h>
310 .TS
311 l l l.
312 BLKROSET const int *
313 BLKROGET int *
314 BLKRRPART void
315 BLKGETSIZE unsigned long *
316 BLKFLSBUF void
317 BLKRASET unsigned long
318 BLKRAGET unsigned long *
319 FIBMAP int * // I-O
320 FIGETBSZ int *
321 FS_IOC_GETFLAGS int *
322 FS_IOC_SETFLAGS int *
323 FS_IOC_GETVERSION int *
324 FS_IOC_SETVERSION int *
325 FS_IOC_FIEMAP struct fiemap *
326 FS_IOC32_SETFLAGS int *
327 FS_IOC32_SETFLAGS int *
328 FS_IOC32_GETVERSION int *
329 FS_IOC32_SETVERSION int *
330 .TE
331 .sp 1
332 // <include/linux/hdreg.h>
333 .TS
334 l l.
335 HDIO_GETGEO struct hd_geometry *
336 HDIO_GET_UNMASKINTR int *
337 HDIO_GET_MULTCOUNT int *
338 HDIO_GET_IDENTITY struct hd_driveid *
339 HDIO_GET_KEEPSETTINGS int *
340 HDIO_GET_CHIPSET int *
341 HDIO_GET_NOWERR int *
342 HDIO_GET_DMA int *
343 HDIO_DRIVE_CMD int * // I-O
344 HDIO_SET_MULTCOUNT int
345 HDIO_SET_UNMASKINTR int
346 HDIO_SET_KEEPSETTINGS int
347 HDIO_SET_CHIPSET int
348 HDIO_SET_NOWERR int
349 HDIO_SET_DMA int
350 .TE
351 .sp 1
352 // <include/linux/if_eql.h>
353 .TS
354 l l l.
355 EQL_ENSLAVE struct ifreq * // MORE // I-O
356 EQL_EMANCIPATE struct ifreq * // MORE // I-O
357 EQL_GETSLAVECFG struct ifreq * // MORE // I-O
358 EQL_SETSLAVECFG struct ifreq * // MORE // I-O
359 EQL_GETMASTRCFG struct ifreq * // MORE // I-O
360 EQL_SETMASTRCFG struct ifreq * // MORE // I-O
361 .TE
362 .sp 1
363 // <include/linux/if_plip.h>
364 .TS
365 l l l.
366 SIOCDEVPLIP struct ifreq * // I-O
367 .TE
368 .sp 1
369 // <include/linux/if_ppp.h>
370 .TS
371 l l.
372 PPPIOCGFLAGS int *
373 PPPIOCSFLAGS const int *
374 PPPIOCGASYNCMAP int *
375 PPPIOCSASYNCMAP const int *
376 PPPIOCGUNIT int *
377 PPPIOCSINPSIG const int *
378 PPPIOCSDEBUG const int *
379 PPPIOCGDEBUG int *
380 PPPIOCGSTAT struct ppp_stats *
381 PPPIOCGTIME struct ppp_ddinfo *
382 PPPIOCGXASYNCMAP struct { int [8]; } *
383 PPPIOCSXASYNCMAP const struct { int [8]; } *
384 PPPIOCSMRU const int *
385 PPPIOCRASYNCMAP const int *
386 PPPIOCSMAXCID const int *
387 .TE
388 .sp 1
389 // <include/linux/ipx.h>
390 .TS
391 l l.
392 SIOCAIPXITFCRT const char *
393 SIOCAIPXPRISLT const char *
394 SIOCIPXCFGDATA struct ipx_config_data *
395 .TE
396 .sp 1
397 // <include/linux/kd.h>
398 .TS
399 l l.
400 GIO_FONT struct { char [8192]; } *
401 PIO_FONT const struct { char [8192]; } *
402 .TE
403 .TS
404 l2 l2 l.
405 GIO_FONTX struct console_font_desc * // MORE // I-O
406 PIO_FONTX const struct console_font_desc * //MORE
407 .TE
408 .TS
409 l l l.
410 GIO_CMAP struct { char [48]; } *
411 PIO_CMAP const struct { char [48]; }
412 .TE
413 .TS
414 l l l.
415 KIOCSOUND int
416 KDMKTONE int
417 KDGETLED char *
418 KDSETLED int
419 KDGKBTYPE char *
420 KDADDIO int // MORE
421 KDDELIO int // MORE
422 KDENABIO void // MORE
423 KDDISABIO void // MORE
424 KDSETMODE int
425 KDGETMODE int *
426 KDMAPDISP void // MORE
427 KDUNMAPDISP void // MORE
428 GIO_SCRNMAP struct { char [E_TABSZ]; } *
429 .TE
430 .TS
431 l l.
432 PIO_SCRNMAP const struct { char [E_TABSZ]; } *
433 GIO_UNISCRNMAP struct { short [E_TABSZ]; } *
434 PIO_UNISCRNMAP const struct { short [E_TABSZ]; } *
435 .TE
436 .TS
437 l l l.
438 GIO_UNIMAP struct unimapdesc * // MORE // I-O
439 PIO_UNIMAP const struct unimapdesc * // MORE
440 PIO_UNIMAPCLR const struct unimapinit *
441 KDGKBMODE int *
442 KDSKBMODE int
443 KDGKBMETA int *
444 KDSKBMETA int
445 KDGKBLED int *
446 KDSKBLED int
447 KDGKBENT struct kbentry * // I-O
448 KDSKBENT const struct kbentry *
449 KDGKBSENT struct kbsentry * // I-O
450 KDSKBSENT const struct kbsentry *
451 KDGKBDIACR struct kbdiacrs *
452 KDSKBDIACR const struct kbdiacrs *
453 KDGETKEYCODE struct kbkeycode * // I-O
454 KDSETKEYCODE const struct kbkeycode *
455 KDSIGACCEPT int
456 .TE
457 .sp 1
458 // <include/linux/lp.h>
459 .TS
460 l l.
461 LPCHAR int
462 LPTIME int
463 LPABORT int
464 LPSETIRQ int
465 LPGETIRQ int *
466 LPWAIT int
467 LPCAREFUL int
468 LPABORTOPEN int
469 LPGETSTATUS int *
470 LPRESET void
471 LPGETSTATS struct lp_stats *
472 .TE
473 .sp 1
474 // <include/linux/mroute.h>
475 .TS
476 l l l.
477 SIOCGETVIFCNT struct sioc_vif_req * // I-O
478 SIOCGETSGCNT struct sioc_sg_req * // I-O
479 .TE
480 .sp 1
481 // <include/linux/msdos_fs.h> see
482 .BR ioctl_fat (2)
483 .TS
484 l l.
485 VFAT_IOCTL_READDIR_BOTH struct dirent [2]
486 VFAT_IOCTL_READDIR_SHORT struct dirent [2]
487 FAT_IOCTL_GET_ATTRIBUTES __u32 *
488 FAT_IOCTL_SET_ATTRIBUTES const __u32 *
489 FAT_IOCTL_GET_VOLUME_ID __u32 *
490 .TE
491 .sp 1
492 // <include/linux/mtio.h>
493 .TS
494 l l.
495 MTIOCTOP const struct mtop *
496 MTIOCGET struct mtget *
497 MTIOCPOS struct mtpos *
498 MTIOCGETCONFIG struct mtconfiginfo *
499 MTIOCSETCONFIG const struct mtconfiginfo *
500 .TE
501 .sp 1
502 // <include/linux/netrom.h>
503 .TS
504 l l l.
505 SIOCNRGETPARMS struct nr_parms_struct * // I-O
506 SIOCNRSETPARMS const struct nr_parms_struct *
507 SIOCNRDECOBS void
508 SIOCNRRTCTL const int *
509 .TE
510 .sp 1
511 // <include/uapi/linux/wireless.h>
512 .br
513 // This API is deprecated.
514 .br
515 // It is being replaced by nl80211 and cfg80211.
516 See
517 .br
518 //
519 .I https://wireless.wiki.kernel.org/en/developers/documentation/nl80211
520 .TS
521 l l l.
522 x00008b00 SIOCSIWCOMMIT struct iwreq *
523 x00008b01 SIOCGIWNAME struct iwreq *
524 x00008b02 SIOCSIWNWID struct iwreq *
525 x00008b03 SIOCGIWNWID struct iwreq *
526 x00008b04 SIOCSIWFREQ struct iwreq *
527 x00008b05 SIOCGIWFREQ struct iwreq *
528 x00008b06 SIOCSIWMODE struct iwreq *
529 x00008b07 SIOCGIWMODE struct iwreq *
530 x00008b08 SIOCSIWSENS struct iwreq *
531 x00008b09 SIOCGIWSENS struct iwreq *
532 x00008b0a SIOCSIWRANGE struct iwreq *
533 x00008b0b SIOCGIWRANGE struct iwreq *
534 x00008b0c SIOCSIWPRIV struct iwreq *
535 x00008b0d SIOCGIWPRIV struct iwreq *
536 x00008b0e SIOCSIWSTATS struct iwreq *
537 x00008b0f SIOCGIWSTATS struct iwreq *
538 x00008b10 SIOCSIWSPY struct iwreq *
539 x00008b11 SIOCGIWSPY struct iwreq *
540 x00008b12 SIOCSIWTHRSPY struct iwreq *
541 x00008b13 SIOCGIWTHRSPY struct iwreq *
542 x00008b14 SIOCSIWAP struct iwreq *
543 x00008b15 SIOCGIWAP struct iwreq *
544 x00008b17 SIOCGIWAPLIST struct iwreq *
545 x00008b18 SIOCSIWSCAN struct iwreq *
546 x00008b19 SIOCGIWSCAN struct iwreq *
547 x00008b1a SIOCSIWESSID struct iwreq *
548 x00008b1b SIOCGIWESSID struct iwreq *
549 x00008b1c SIOCSIWNICKN struct iwreq *
550 x00008b1d SIOCGIWNICKN struct iwreq *
551 x00008b20 SIOCSIWRATE struct iwreq *
552 x00008b21 SIOCGIWRATE struct iwreq *
553 x00008b22 SIOCSIWRTS struct iwreq *
554 x00008b23 SIOCGIWRTS struct iwreq *
555 x00008b24 SIOCSIWFRAG struct iwreq *
556 x00008b25 SIOCGIWFRAG struct iwreq *
557 x00008b26 SIOCSIWTXPOW struct iwreq *
558 x00008b27 SIOCGIWTXPOW struct iwreq *
559 x00008b28 SIOCSIWRETRY struct iwreq *
560 x00008b29 SIOCGIWRETRY struct iwreq *
561 x00008b2a SIOCSIWENCODE struct iwreq *
562 x00008b2b SIOCGIWENCODE struct iwreq *
563 x00008b2c SIOCSIWPOWER struct iwreq *
564 x00008b2d SIOCGIWPOWER struct iwreq *
565 x00008b30 SIOCSIWGENIE struct iwreq *
566 x00008b31 SIOCGIWGENIE struct iwreq *
567 x00008b16 SIOCSIWMLME struct iwreq *
568 x00008b32 SIOCSIWAUTH struct iwreq *
569 x00008b33 SIOCGIWAUTH struct iwreq *
570 x00008b34 SIOCSIWENCODEEXT struct iwreq *
571 x00008b35 SIOCGIWENCODEEXT struct iwreq *
572 x00008b36 SIOCSIWPMKSA struct iwreq *
573 .TE
574 .sp 1
575 // <include/linux/sbpcd.h>
576 .TS
577 l l.
578 DDIOCSDBG const int *
579 CDROMAUDIOBUFSIZ int
580 .TE
581 .sp 1
582 // <include/linux/scc.h>
583 .TS
584 l l l.
585 TIOCSCCINI void
586 TIOCCHANINI const struct scc_modem *
587 TIOCGKISS struct ioctl_command * // I-O
588 TIOCSKISS const struct ioctl_command *
589 TIOCSCCSTAT struct scc_stat *
590 .TE
591 .sp 1
592 // <include/linux/scsi.h>
593 .TS
594 l l.
595 SCSI_IOCTL_GET_IDLUN struct { int [2]; } *
596 SCSI_IOCTL_TAGGED_ENABLE void
597 SCSI_IOCTL_TAGGED_DISABLE void
598 .TE
599 .TS
600 l l l.
601 SCSI_IOCTL_PROBE_HOST const int * // MORE
602 .TE
603 .sp 1
604 // <include/linux/smb_fs.h>
605 .TS
606 l l l.
607 SMB_IOC_GETMOUNTUID uid_t *
608 .TE
609 .sp 1
610 // <include/uapi/linux/sockios.h> see
611 .BR netdevice (7)
612 .PP
613 .TS
614 l l l.
615 SIOCADDRT const struct rtentry * // MORE
616 SIOCDELRT const struct rtentry * // MORE
617 SIOCGIFNAME char []
618 SIOCSIFLINK void
619 SIOCGIFCONF struct ifconf * // MORE // I-O
620 SIOCGIFFLAGS struct ifreq * // I-O
621 SIOCSIFFLAGS const struct ifreq *
622 SIOCGIFADDR struct ifreq * // I-O
623 SIOCSIFADDR const struct ifreq *
624 SIOCGIFDSTADDR struct ifreq * // I-O
625 SIOCSIFDSTADDR const struct ifreq *
626 SIOCGIFBRDADDR struct ifreq * // I-O
627 SIOCSIFBRDADDR const struct ifreq *
628 SIOCGIFNETMASK struct ifreq * // I-O
629 SIOCSIFNETMASK const struct ifreq *
630 SIOCGIFMETRIC struct ifreq * // I-O
631 SIOCSIFMETRIC const struct ifreq *
632 SIOCGIFMEM struct ifreq * // I-O
633 SIOCSIFMEM const struct ifreq *
634 SIOCGIFMTU struct ifreq * // I-O
635 SIOCSIFMTU const struct ifreq *
636 .TE
637 .TS
638 l l l.
639 OLD_SIOCGIFHWADDR struct ifreq * // I-O
640 SIOCSIFHWADDR const struct ifreq * // MORE
641 SIOCGIFENCAP int *
642 SIOCSIFENCAP const int *
643 SIOCGIFHWADDR struct ifreq * // I-O
644 SIOCGIFSLAVE void
645 SIOCSIFSLAVE void
646 SIOCADDMULTI const struct ifreq *
647 SIOCDELMULTI const struct ifreq *
648 SIOCADDRTOLD void
649 SIOCDELRTOLD void
650 SIOCDARP const struct arpreq *
651 SIOCGARP struct arpreq * // I-O
652 SIOCSARP const struct arpreq *
653 SIOCDRARP const struct arpreq *
654 SIOCGRARP struct arpreq * // I-O
655 SIOCSRARP const struct arpreq *
656 SIOCGIFMAP struct ifreq * // I-O
657 SIOCSIFMAP const struct ifreq *
658 .TE
659 .sp 1
660 // <include/linux/soundcard.h>
661 .TS
662 l l.
663 SNDCTL_SEQ_RESET void
664 SNDCTL_SEQ_SYNC void
665 .TE
666 .TS
667 l l l.
668 SNDCTL_SYNTH_INFO struct synth_info * // I-O
669 SNDCTL_SEQ_CTRLRATE int * // I-O
670 SNDCTL_SEQ_GETOUTCOUNT int *
671 SNDCTL_SEQ_GETINCOUNT int *
672 SNDCTL_SEQ_PERCMODE void
673 .TE
674 .TS
675 l l.
676 SNDCTL_FM_LOAD_INSTR const struct sbi_instrument *
677 .TE
678 .TS
679 l l l.
680 SNDCTL_SEQ_TESTMIDI const int *
681 SNDCTL_SEQ_RESETSAMPLES const int *
682 SNDCTL_SEQ_NRSYNTHS int *
683 SNDCTL_SEQ_NRMIDIS int *
684 SNDCTL_MIDI_INFO struct midi_info * // I-O
685 SNDCTL_SEQ_THRESHOLD const int *
686 SNDCTL_SYNTH_MEMAVL int * // I-O
687 SNDCTL_FM_4OP_ENABLE const int *
688 SNDCTL_PMGR_ACCESS struct patmgr_info * // I-O
689 SNDCTL_SEQ_PANIC void
690 .TE
691 .TS
692 l l.
693 SNDCTL_SEQ_OUTOFBAND const struct seq_event_rec *
694 .TE
695 .TS
696 l l l.
697 SNDCTL_TMR_TIMEBASE int * // I-O
698 SNDCTL_TMR_START void
699 SNDCTL_TMR_STOP void
700 SNDCTL_TMR_CONTINUE void
701 SNDCTL_TMR_TEMPO int * // I-O
702 SNDCTL_TMR_SOURCE int * // I-O
703 SNDCTL_TMR_METRONOME const int *
704 SNDCTL_TMR_SELECT int * // I-O
705 SNDCTL_PMGR_IFACE struct patmgr_info * // I-O
706 SNDCTL_MIDI_PRETIME int * // I-O
707 SNDCTL_MIDI_MPUMODE const int *
708 .TE
709 .TS
710 l l l.
711 SNDCTL_MIDI_MPUCMD struct mpu_command_rec * // I-O
712 .TE
713 .TS
714 l l l.
715 SNDCTL_DSP_RESET void
716 SNDCTL_DSP_SYNC void
717 SNDCTL_DSP_SPEED int * // I-O
718 SNDCTL_DSP_STEREO int * // I-O
719 SNDCTL_DSP_GETBLKSIZE int * // I-O
720 SOUND_PCM_WRITE_CHANNELS int * // I-O
721 SOUND_PCM_WRITE_FILTER int * // I-O
722 SNDCTL_DSP_POST void
723 SNDCTL_DSP_SUBDIVIDE int * // I-O
724 SNDCTL_DSP_SETFRAGMENT int * // I-O
725 SNDCTL_DSP_GETFMTS int *
726 SNDCTL_DSP_SETFMT int * // I-O
727 .TE
728 .TS
729 l l.
730 SNDCTL_DSP_GETOSPACE struct audio_buf_info *
731 SNDCTL_DSP_GETISPACE struct audio_buf_info *
732 SNDCTL_DSP_NONBLOCK void
733 SOUND_PCM_READ_RATE int *
734 SOUND_PCM_READ_CHANNELS int *
735 SOUND_PCM_READ_BITS int *
736 SOUND_PCM_READ_FILTER int *
737 SNDCTL_COPR_RESET void
738 SNDCTL_COPR_LOAD const struct copr_buffer *
739 .TE
740 .TS
741 l l l.
742 SNDCTL_COPR_RDATA struct copr_debug_buf * // I-O
743 SNDCTL_COPR_RCODE struct copr_debug_buf * // I-O
744 .TE
745 .TS
746 l l.
747 SNDCTL_COPR_WDATA const struct copr_debug_buf *
748 SNDCTL_COPR_WCODE const struct copr_debug_buf *
749 .TE
750 .TS
751 l l l.
752 SNDCTL_COPR_RUN struct copr_debug_buf * // I-O
753 SNDCTL_COPR_HALT struct copr_debug_buf * // I-O
754 .TE
755 .TS
756 l l.
757 SNDCTL_COPR_SENDMSG const struct copr_msg *
758 SNDCTL_COPR_RCVMSG struct copr_msg *
759 SOUND_MIXER_READ_VOLUME int *
760 SOUND_MIXER_READ_BASS int *
761 SOUND_MIXER_READ_TREBLE int *
762 SOUND_MIXER_READ_SYNTH int *
763 SOUND_MIXER_READ_PCM int *
764 SOUND_MIXER_READ_SPEAKER int *
765 SOUND_MIXER_READ_LINE int *
766 SOUND_MIXER_READ_MIC int *
767 SOUND_MIXER_READ_CD int *
768 SOUND_MIXER_READ_IMIX int *
769 SOUND_MIXER_READ_ALTPCM int *
770 SOUND_MIXER_READ_RECLEV int *
771 SOUND_MIXER_READ_IGAIN int *
772 SOUND_MIXER_READ_OGAIN int *
773 SOUND_MIXER_READ_LINE1 int *
774 SOUND_MIXER_READ_LINE2 int *
775 SOUND_MIXER_READ_LINE3 int *
776 SOUND_MIXER_READ_MUTE int *
777 SOUND_MIXER_READ_ENHANCE int *
778 SOUND_MIXER_READ_LOUD int *
779 SOUND_MIXER_READ_RECSRC int *
780 SOUND_MIXER_READ_DEVMASK int *
781 SOUND_MIXER_READ_RECMASK int *
782 SOUND_MIXER_READ_STEREODEVS int *
783 SOUND_MIXER_READ_CAPS int *
784 .TE
785 .TS
786 l l l.
787 SOUND_MIXER_WRITE_VOLUME int * // I-O
788 SOUND_MIXER_WRITE_BASS int * // I-O
789 SOUND_MIXER_WRITE_TREBLE int * // I-O
790 SOUND_MIXER_WRITE_SYNTH int * // I-O
791 SOUND_MIXER_WRITE_PCM int * // I-O
792 SOUND_MIXER_WRITE_SPEAKER int * // I-O
793 SOUND_MIXER_WRITE_LINE int * // I-O
794 SOUND_MIXER_WRITE_MIC int * // I-O
795 SOUND_MIXER_WRITE_CD int * // I-O
796 SOUND_MIXER_WRITE_IMIX int * // I-O
797 SOUND_MIXER_WRITE_ALTPCM int * // I-O
798 SOUND_MIXER_WRITE_RECLEV int * // I-O
799 SOUND_MIXER_WRITE_IGAIN int * // I-O
800 SOUND_MIXER_WRITE_OGAIN int * // I-O
801 SOUND_MIXER_WRITE_LINE1 int * // I-O
802 SOUND_MIXER_WRITE_LINE2 int * // I-O
803 SOUND_MIXER_WRITE_LINE3 int * // I-O
804 SOUND_MIXER_WRITE_MUTE int * // I-O
805 SOUND_MIXER_WRITE_ENHANCE int * // I-O
806 SOUND_MIXER_WRITE_LOUD int * // I-O
807 SOUND_MIXER_WRITE_RECSRC int * // I-O
808 .TE
809 .sp 1
810 // <include/linux/timerfd.h> see
811 .BR timerfd_create (2)
812 .TS
813 l l l.
814 TFD_IOC_SET_TICKS uint64_t *
815 .TE
816 .sp 1
817 // <include/linux/umsdos_fs.h>
818 .TS
819 l l l.
820 UMSDOS_READDIR_DOS struct umsdos_ioctl * // I-O
821 UMSDOS_UNLINK_DOS const struct umsdos_ioctl *
822 UMSDOS_RMDIR_DOS const struct umsdos_ioctl *
823 UMSDOS_STAT_DOS struct umsdos_ioctl * // I-O
824 UMSDOS_CREAT_EMD const struct umsdos_ioctl *
825 UMSDOS_UNLINK_EMD const struct umsdos_ioctl *
826 UMSDOS_READDIR_EMD struct umsdos_ioctl * // I-O
827 UMSDOS_GETVERSION struct umsdos_ioctl *
828 UMSDOS_INIT_EMD void
829 UMSDOS_DOS_SETUP const struct umsdos_ioctl *
830 UMSDOS_RENAME_DOS const struct umsdos_ioctl *
831 .TE
832 .sp 1
833 // <include/linux/vt.h>
834 .TS
835 l l.
836 VT_OPENQRY int *
837 VT_GETMODE struct vt_mode *
838 VT_SETMODE const struct vt_mode *
839 VT_GETSTATE struct vt_stat *
840 VT_SENDSIG void
841 VT_RELDISP int
842 VT_ACTIVATE int
843 VT_WAITACTIVE int
844 VT_DISALLOCATE int
845 VT_RESIZE const struct vt_sizes *
846 VT_RESIZEX const struct vt_consize *
847 .TE
848 .sp 1
849 // More arguments.
850 Some ioctl's take a pointer to a structure which contains additional
851 pointers.
852 These are documented here in alphabetical order.
853 .PP
854 .B CDROMREADAUDIO
855 takes an input pointer
856 .IR "const struct cdrom_read_audio\ *" .
857 The
858 .I buf
859 field points to an output buffer of length
860 .IR "nframes\ * CD_FRAMESIZE_RAW" .
861 .PP
862 .BR CDROMREADCOOKED ,
863 .BR CDROMREADMODE1 ,
864 .BR CDROMREADMODE2 ,
865 and
866 .B CDROMREADRAW
867 take an input pointer
868 .IR "const struct cdrom_msf\ *" .
869 They use the same pointer as an output pointer to
870 .IR "char []" .
871 The length varies by request.
872 For
873 .BR CDROMREADMODE1 ,
874 most drivers use CD_FRAMESIZE, but the Optics Storage
875 driver uses OPT_BLOCKSIZE instead (both have the numerical value
876 2048).
877 .PP
878 .nf
879 CDROMREADCOOKED char [CD_FRAMESIZE]
880 CDROMREADMODE1 char [CD_FRAMESIZE or OPT_BLOCKSIZE]
881 CDROMREADMODE2 char [CD_FRAMESIZE_RAW0]
882 CDROMREADRAW char [CD_FRAMESIZE_RAW]
883 .fi
884 .PP
885 .BR EQL_ENSLAVE ,
886 .BR EQL_EMANCIPATE ,
887 .BR EQL_GETSLAVECFG ,
888 .BR EQL_SETSLAVECFG ,
889 .BR EQL_GETMASTERCFG ,
890 and
891 .B EQL_SETMASTERCFG
892 take a
893 .IR "struct ifreq\ *" .
894 The
895 .I ifr_data
896 field is a pointer to another structure as follows:
897 .PP
898 .nf
899 EQL_ENSLAVE const struct slaving_request *
900 EQL_EMANCIPATE const struct slaving_request *
901 EQL_GETSLAVECFG struct slave_config * // I-O
902 EQL_SETSLAVECFG const struct slave_config *
903 EQL_GETMASTERCFG struct master_config *
904 EQL_SETMASTERCFG const struct master_config *
905 .fi
906 .PP
907 .B FDRAWCMD
908 takes a
909 .IR "struct floppy raw_cmd\ *" .
910 If
911 .I flags & FD_RAW_WRITE
912 is nonzero, then
913 .I data
914 points to an input buffer of length
915 .IR length .
916 If
917 .I flags & FD_RAW_READ
918 is nonzero, then
919 .I data
920 points to an output buffer of length
921 .IR length .
922 .PP
923 .B GIO_FONTX
924 and
925 .B PIO_FONTX
926 take a
927 .I struct console_font_desc\ *
928 or a
929 .IR "const struct console_font_desc\ *" ,
930 respectively.
931 .I chardata
932 points to a buffer of
933 .IR "char [charcount]" .
934 This is an output buffer for
935 .B GIO_FONTX
936 and an input buffer for
937 .BR PIO_FONTX .
938 .PP
939 .B GIO_UNIMAP
940 and
941 .B PIO_UNIMAP
942 take a
943 .I "struct unimapdesc\ *"
944 or a
945 .IR "const struct unimapdesc\ *" ,
946 respectively.
947 .I entries
948 points to a buffer of
949 .IR "struct unipair [entry_ct]" .
950 This is an output buffer for
951 .B GIO_UNIMAP
952 and an input buffer for
953 .BR PIO_UNIMAP .
954 .PP
955 KDADDIO, KDDELIO, KDDISABIO, and KDENABIO enable or disable access to
956 I/O ports.
957 They are essentially alternate interfaces to 'ioperm'.
958 .PP
959 .B KDMAPDISP
960 and
961 .B KDUNMAPDISP
962 enable or disable memory mappings or I/O port access.
963 They are not implemented in the kernel.
964 .PP
965 .B SCSI_IOCTL_PROBE_HOST
966 takes an input pointer
967 .IR "const int\ *" ,
968 which is a length.
969 It uses the same pointer as an output pointer to a
970 .I char []
971 buffer of this length.
972 .PP
973 .B SIOCADDRT
974 and
975 .B SIOCDELRT
976 take an input pointer whose type depends on
977 the protocol:
978 .PP
979 .nf
980 Most protocols const struct rtentry *
981 AX.25 const struct ax25_route *
982 NET/ROM const struct nr_route_struct *
983 INET6 const struct in6_rtmsg *
984 .fi
985 .PP
986 .B SIOCGIFCONF
987 takes a
988 .IR "struct ifconf\ *" .
989 The
990 .I ifc_buf
991 field points to a buffer of length
992 .I ifc_len
993 bytes, into which the kernel writes a list of type
994 .IR "struct ifreq []" .
995 .PP
996 .B SIOCSIFHWADDR
997 takes an input pointer whose type depends on the protocol:
998 .PP
999 .nf
1000 Most protocols const struct ifreq *
1001 AX.25 const char [AX25_ADDR_LEN]
1002 .fi
1003 .PP
1004 .B TIOCLINUX
1005 takes a
1006 .IR "const char\ *" .
1007 It uses this to distinguish several
1008 independent subcases.
1009 In the table below,
1010 .I N + foo
1011 means
1012 .I foo
1013 after an N-byte pad.
1014 .I struct selection
1015 is implicitly defined in
1016 .IR drivers/char/selection.c
1017 .PP
1018 .nf
1019 TIOCLINUX-2 1 + const struct selection *
1020 TIOCLINUX-3 void
1021 TIOCLINUX-4 void
1022 TIOCLINUX-5 4 + const struct { long [8]; } *
1023 TIOCLINUX-6 char *
1024 TIOCLINUX-7 char *
1025 TIOCLINUX-10 1 + const char *
1026 .fi
1027 .PP
1028 // Duplicate ioctls
1029 .PP
1030 This list does not include ioctls in the range
1031 .B SIOCDEVPRIVATE
1032 and
1033 .BR SIOCPROTOPRIVATE .
1034 .TS
1035 l l l.
1036 FDSETPRM FIBMAP
1037 FDDEFPRM FIGETBSZ
1038 SCSI_IOCTL_GET_IDLUN
1039 SNDCTL_TMR_START TCSETS
1040 SNDCTL_TMR_STOP TCSETSW
1041 SNDCTL_TMR_CONTINUE TCSETSF
1042 .TE
1043 .SH SEE ALSO
1044 .BR ioctl (2),
1045 .BR ioctl_fat (2),
1046 .BR netdevice (7)