]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/ioctl_list.2
Fix unbalanced quotes in formatting macros.
[thirdparty/man-pages.git] / man2 / ioctl_list.2
1 .\" Ioctl List 1.3.27
2 .\" Sun 17 Sep 1995
3 .\" Michael Elizabeth Chastain
4 .\" <mec@duracef.shout.net>
5 .\"
6 .\" // Copyright
7 .\"
8 .\" Ioctl List 1.3.27 is copyright 1995 by Michael Elizabeth Chastain.
9 .\" It is licensed under the Gnu Public License, Version 2.
10 .\"
11 .\"
12 .\"
13 .\" // Change Log
14 .\"
15 .\" 1.3.27 421 ioctls.
16 .\" Type information for non-pointer args.
17 .\" SIOCDEVPRIVATE, SIOCPROTOPRIVATE ioctls.
18 .\" Descriptions of extended arguments.
19 .\"
20 .\" 1.2.9 365 ioctls.
21 .\" First public version.
22 .\"
23 .\"
24 .\" 2007-12-29 Alain Portal <aportal@univ-montp2.fr> and Michael Kerrisk
25 .\" <mtk.manpages@g,mail.com>:
26 .\" Various formatting improvements
27 .TH IOCTL_LIST 2 2007-12-29 "Linux" "Linux Programmer's Manual"
28 .SH NAME
29 ioctl_list \- list of ioctl calls in Linux/i386 kernel
30 .SH DESCRIPTION
31 This is Ioctl List 1.3.27, a list of ioctl calls in Linux/i386 kernel
32 1.3.27.
33 It contains 421 ioctls from
34 .IR </usr/include/{asm,linux}/*.h> .
35 For each ioctl, its numerical value, its name, and its argument
36 type are given.
37 .PP
38 An argument type of
39 .I const struct foo *
40 means the argument is input to the kernel.
41 .I struct foo *
42 means the kernel outputs the argument.
43 If the kernel uses the argument for both input and output, this is
44 marked with \fI//\ I-O\fP.
45 .PP
46 Some ioctls take more arguments or return more values than a single
47 structure.
48 These are marked \fI//\ MORE\fP and documented further in a
49 separate section.
50 .PP
51 This list is very incomplete.
52 Please e-mail changes and comments to <mec@duracef.shout.net>.
53 .SS "ioctl structure"
54 .\" added two sections - aeb
55 Ioctl command values are 32-bit constants.
56 In principle these constants are completely arbitrary, but people have
57 tried to build some structure into them.
58 .LP
59 The old Linux situation was that of mostly 16-bit constants, where the
60 last byte is a serial number, and the preceding byte(s) give a type
61 indicating the driver.
62 Sometimes the major number was used: 0x03
63 for the
64 .B HDIO_*
65 ioctls, 0x06 for the
66 .B LP*
67 ioctls.
68 And sometimes
69 one or more ASCII letters were used.
70 For example,
71 .B TCGETS
72 has value
73 0x00005401, with 0x54 = 'T' indicating the terminal driver, and
74 .B CYGETTIMEOUT
75 has value 0x00435906, with 0x43 0x59 = 'C' 'Y'
76 indicating the cyclades driver.
77 .LP
78 Later (0.98p5) some more information was built into the number.
79 One has 2 direction bits
80 (00: none, 01: write, 10: read, 11: read/write)
81 followed by 14 size bits (giving the size of the argument),
82 followed by an 8-bit type (collecting the ioctls in groups
83 for a common purpose or a common driver), and an 8-bit
84 serial number.
85 .LP
86 The macros describing this structure live in \fI<asm/ioctl.h>\fP
87 and are
88 .B _IO(type,nr)
89 and
90 .BR "{_IOR,_IOW,_IOWR}(type,nr,size)" .
91 They use
92 .I sizeof(size)
93 so that size is a
94 misnomer here: this third parameter is a data type.
95 .LP
96 Note that the size bits are very unreliable: in lots of cases
97 they are wrong, either because of buggy macros using
98 .IR sizeof(sizeof(struct)) ,
99 or because of legacy values.
100 .LP
101 Thus, it seems that the new structure only gave disadvantages:
102 it does not help in checking, but it causes varying values
103 for the various architectures.
104 .SH "RETURN VALUE"
105 Decent ioctls return 0 on success and \-1 on error, while
106 any output value is stored via the argument.
107 However,
108 quite a few ioctls in fact return an output value.
109 This is not yet indicated below.
110
111 // Main table.
112
113 // <include/asm-i386/socket.h>
114 .TS
115 l l l.
116 0x00008901 FIOSETOWN const int *
117 0x00008902 SIOCSPGRP const int *
118 0x00008903 FIOGETOWN int *
119 0x00008904 SIOCGPGRP int *
120 0x00008905 SIOCATMAR int *
121 0x00008906 SIOCGSTAMP timeval *
122 .TE
123
124 // <include/asm-i386/termios.h>
125 .TS
126 l l l l.
127 0x00005401 TCGETS struct termios *
128 0x00005402 TCSETS const struct termios *
129 0x00005403 TCSETSW const struct termios *
130 0x00005404 TCSETSF const struct termios *
131 0x00005405 TCGETA struct termio *
132 0x00005406 TCSETA const struct termio *
133 0x00005407 TCSETAW const struct termio *
134 0x00005408 TCSETAF const struct termio *
135 0x00005409 TCSBRK int
136 0x0000540A TCXONC int
137 0x0000540B TCFLSH int
138 0x0000540C TIOCEXCL void
139 0x0000540D TIOCNXCL void
140 0x0000540E TIOCSCTTY int
141 0x0000540F TIOCGPGRP pid_t *
142 0x00005410 TIOCSPGRP const pid_t *
143 0x00005411 TIOCOUTQ int *
144 0x00005412 TIOCSTI const char *
145 0x00005413 TIOCGWINSZ struct winsize *
146 0x00005414 TIOCSWINSZ const struct winsize *
147 0x00005415 TIOCMGET int *
148 0x00005416 TIOCMBIS const int *
149 0x00005417 TIOCMBIC const int *
150 0x00005418 TIOCMSET const int *
151 0x00005419 TIOCGSOFTCAR int *
152 0x0000541A TIOCSSOFTCAR const int *
153 0x0000541B FIONREAD int *
154 0x0000541B TIOCINQ int *
155 0x0000541C TIOCLINUX const char * // MORE
156 0x0000541D TIOCCONS void
157 0x0000541E TIOCGSERIAL struct serial_struct *
158 0x0000541F TIOCSSERIAL const struct serial_struct *
159 0x00005420 TIOCPKT const int *
160 0x00005421 FIONBIO const int *
161 0x00005422 TIOCNOTTY void
162 0x00005423 TIOCSETD const int *
163 0x00005424 TIOCGETD int *
164 0x00005425 TCSBRKP int
165 0x00005426 TIOCTTYGSTRUCT struct tty_struct *
166 0x00005450 FIONCLEX void
167 0x00005451 FIOCLEX void
168 0x00005452 FIOASYNC const int *
169 0x00005453 TIOCSERCONFIG void
170 0x00005454 TIOCSERGWILD int *
171 0x00005455 TIOCSERSWILD const int *
172 0x00005456 TIOCGLCKTRMIOS struct termios *
173 0x00005457 TIOCSLCKTRMIOS const struct termios *
174 0x00005458 TIOCSERGSTRUCT struct async_struct *
175 0x00005459 TIOCSERGETLSR int *
176 0x0000545A TIOCSERGETMULTI struct serial_multiport_struct *
177 0x0000545B TIOCSERSETMULTI const struct serial_multiport_struct *
178 .TE
179
180 // <include/linux/ax25.h>
181 .TS
182 l l l l.
183 0x000089E0 SIOCAX25GETUID const struct sockaddr_ax25 *
184 0x000089E1 SIOCAX25ADDUID const struct sockaddr_ax25 *
185 0x000089E2 SIOCAX25DELUID const struct sockaddr_ax25 *
186 0x000089E3 SIOCAX25NOUID const int *
187 0x000089E4 SIOCAX25DIGCTL const int *
188 0x000089E5 SIOCAX25GETPARMS struct ax25_parms_struct * // I-O
189 0x000089E6 SIOCAX25SETPARMS const struct ax25_parms_struct *
190 .TE
191
192 // <include/linux/cdk.h>
193 .TS
194 l l l l.
195 0x00007314 STL_BINTR void
196 0x00007315 STL_BSTART void
197 0x00007316 STL_BSTOP void
198 0x00007317 STL_BRESET void
199 .TE
200
201 // <include/linux/cdrom.h>
202 .TS
203 l l l l.
204 0x00005301 CDROMPAUSE void
205 0x00005302 CDROMRESUME void
206 0x00005303 CDROMPLAYMSF const struct cdrom_msf *
207 0x00005304 CDROMPLAYTRKIND const struct cdrom_ti *
208 0x00005305 CDROMREADTOCHDR struct cdrom_tochdr *
209 0x00005306 CDROMREADTOCENTRY struct cdrom_tocentry * // I-O
210 0x00005307 CDROMSTOP void
211 0x00005308 CDROMSTART void
212 0x00005309 CDROMEJECT void
213 0x0000530A CDROMVOLCTRL const struct cdrom_volctrl *
214 0x0000530B CDROMSUBCHNL struct cdrom_subchnl * // I-O
215 0x0000530C CDROMREADMODE2 const struct cdrom_msf * // MORE
216 0x0000530D CDROMREADMODE1 const struct cdrom_msf * // MORE
217 0x0000530E CDROMREADAUDIO const struct cdrom_read_audio * // MORE
218 0x0000530F CDROMEJECT_SW int
219 0x00005310 CDROMMULTISESSION struct cdrom_multisession * // I-O
220 0x00005311 CDROM_GET_UPC struct { char [8]; } *
221 0x00005312 CDROMRESET void
222 0x00005313 CDROMVOLREAD struct cdrom_volctrl *
223 0x00005314 CDROMREADRAW const struct cdrom_msf * // MORE
224 0x00005315 CDROMREADCOOKED const struct cdrom_msf * // MORE
225 0x00005316 CDROMSEEK const struct cdrom_msf *
226 .TE
227
228 // <include/linux/cm206.h>
229 .TS
230 l l l l.
231 0x00002000 CM206CTL_GET_STAT int
232 0x00002001 CM206CTL_GET_LAST_STAT int
233 .TE
234
235 // <include/linux/cyclades.h>
236 .TS
237 l l l l.
238 0x00435901 CYGETMON struct cyclades_monitor *
239 0x00435902 CYGETTHRESH int *
240 0x00435903 CYSETTHRESH int
241 0x00435904 CYGETDEFTHRESH int *
242 0x00435905 CYSETDEFTHRESH int
243 0x00435906 CYGETTIMEOUT int *
244 0x00435907 CYSETTIMEOUT int
245 0x00435908 CYGETDEFTIMEOUT int *
246 0x00435909 CYSETDEFTIMEOUT int
247 .TE
248
249 // <include/linux/ext2_fs.h>
250 .TS
251 l l l l.
252 0x80046601 EXT2_IOC_GETFLAGS int *
253 0x40046602 EXT2_IOC_SETFLAGS const int *
254 0x80047601 EXT2_IOC_GETVERSION int *
255 0x40047602 EXT2_IOC_SETVERSION const int *
256 .TE
257
258 // <include/linux/fd.h>
259 .TS
260 l l l l.
261 0x00000000 FDCLRPRM void
262 0x00000001 FDSETPRM const struct floppy_struct *
263 0x00000002 FDDEFPRM const struct floppy_struct *
264 0x00000003 FDGETPRM struct floppy_struct *
265 0x00000004 FDMSGON void
266 0x00000005 FDMSGOFF void
267 0x00000006 FDFMTBEG void
268 0x00000007 FDFMTTRK const struct format_descr *
269 0x00000008 FDFMTEND void
270 0x0000000A FDSETEMSGTRESH int
271 0x0000000B FDFLUSH void
272 0x0000000C FDSETMAXERRS const struct floppy_max_errors *
273 0x0000000E FDGETMAXERRS struct floppy_max_errors *
274 0x00000010 FDGETDRVTYP struct { char [16]; } *
275 0x00000014 FDSETDRVPRM const struct floppy_drive_params *
276 0x00000015 FDGETDRVPRM struct floppy_drive_params *
277 0x00000016 FDGETDRVSTAT struct floppy_drive_struct *
278 0x00000017 FDPOLLDRVSTAT struct floppy_drive_struct *
279 0x00000018 FDRESET int
280 0x00000019 FDGETFDCSTAT struct floppy_fdc_state *
281 0x0000001B FDWERRORCLR void
282 0x0000001C FDWERRORGET struct floppy_write_errors *
283 0x0000001E FDRAWCMD struct floppy_raw_cmd * // MORE // I-O
284 0x00000028 FDTWADDLE void
285 .TE
286
287 // <include/linux/fs.h>
288 .TS
289 l l l l.
290 0x0000125D BLKROSET const int *
291 0x0000125E BLKROGET int *
292 0x0000125F BLKRRPART void
293 0x00001260 BLKGETSIZE unsigned long *
294 0x00001261 BLKFLSBUF void
295 0x00001262 BLKRASET int
296 0x00001263 BLKRAGET int *
297 0x00000001 FIBMAP int * // I-O
298 0x00000002 FIGETBSZ int *
299 .TE
300
301 // <include/linux/hdreg.h>
302 .TS
303 l l l l.
304 0x00000301 HDIO_GETGEO struct hd_geometry *
305 0x00000302 HDIO_GET_UNMASKINTR int *
306 0x00000304 HDIO_GET_MULTCOUNT int *
307 0x00000307 HDIO_GET_IDENTITY struct hd_driveid *
308 0x00000308 HDIO_GET_KEEPSETTINGS int *
309 0x00000309 HDIO_GET_CHIPSET int *
310 0x0000030A HDIO_GET_NOWERR int *
311 0x0000030B HDIO_GET_DMA int *
312 0x0000031F HDIO_DRIVE_CMD int * // I-O
313 0x00000321 HDIO_SET_MULTCOUNT int
314 0x00000322 HDIO_SET_UNMASKINTR int
315 0x00000323 HDIO_SET_KEEPSETTINGS int
316 0x00000324 HDIO_SET_CHIPSET int
317 0x00000325 HDIO_SET_NOWERR int
318 0x00000326 HDIO_SET_DMA int
319 .TE
320
321 // <include/linux/if_eql.h>
322 .TS
323 l l l l.
324 0x000089F0 EQL_ENSLAVE struct ifreq * // MORE // I-O
325 0x000089F1 EQL_EMANCIPATE struct ifreq * // MORE // I-O
326 0x000089F2 EQL_GETSLAVECFG struct ifreq * // MORE // I-O
327 0x000089F3 EQL_SETSLAVECFG struct ifreq * // MORE // I-O
328 0x000089F4 EQL_GETMASTRCFG struct ifreq * // MORE // I-O
329 0x000089F5 EQL_SETMASTRCFG struct ifreq * // MORE // I-O
330 .TE
331
332 // <include/linux/if_plip.h>
333 .TS
334 l l l l.
335 0x000089F0 SIOCDEVPLIP struct ifreq * // I-O
336 .TE
337
338 // <include/linux/if_ppp.h>
339 .TS
340 l l l l.
341 0x00005490 PPPIOCGFLAGS int *
342 0x00005491 PPPIOCSFLAGS const int *
343 0x00005492 PPPIOCGASYNCMAP int *
344 0x00005493 PPPIOCSASYNCMAP const int *
345 0x00005494 PPPIOCGUNIT int *
346 0x00005495 PPPIOCSINPSIG const int *
347 0x00005497 PPPIOCSDEBUG const int *
348 0x00005498 PPPIOCGDEBUG int *
349 0x00005499 PPPIOCGSTAT struct ppp_stats *
350 0x0000549A PPPIOCGTIME struct ppp_ddinfo *
351 0x0000549B PPPIOCGXASYNCMAP struct { int [8]; } *
352 0x0000549C PPPIOCSXASYNCMAP const struct { int [8]; } *
353 0x0000549D PPPIOCSMRU const int *
354 0x0000549E PPPIOCRASYNCMAP const int *
355 0x0000549F PPPIOCSMAXCID const int *
356 .TE
357
358 // <include/linux/ipx.h>
359 .TS
360 l l l l.
361 0x000089E0 SIOCAIPXITFCRT const char *
362 0x000089E1 SIOCAIPXPRISLT const char *
363 0x000089E2 SIOCIPXCFGDATA struct ipx_config_data *
364 .TE
365
366 // <include/linux/kd.h>
367 .TS
368 l l l l.
369 0x00004B60 GIO_FONT struct { char [8192]; } *
370 0x00004B61 PIO_FONT const struct { char [8192]; } *
371 0x00004B6B GIO_FONTX struct console_font_desc * // MORE // I-O
372 0x00004B6C PIO_FONTX const struct console_font_desc * //MORE
373 0x00004B70 GIO_CMAP struct { char [48]; } *
374 0x00004B71 PIO_CMAP const struct { char [48]; }
375 0x00004B2F KIOCSOUND int
376 0x00004B30 KDMKTONE int
377 0x00004B31 KDGETLED char *
378 0x00004B32 KDSETLED int
379 0x00004B33 KDGKBTYPE char *
380 0x00004B34 KDADDIO int // MORE
381 0x00004B35 KDDELIO int // MORE
382 0x00004B36 KDENABIO void // MORE
383 0x00004B37 KDDISABIO void // MORE
384 0x00004B3A KDSETMODE int
385 0x00004B3B KDGETMODE int *
386 0x00004B3C KDMAPDISP void // MORE
387 0x00004B3D KDUNMAPDISP void // MORE
388 0x00004B40 GIO_SCRNMAP struct { char [E_TABSZ]; } *
389 0x00004B41 PIO_SCRNMAP const struct { char [E_TABSZ]; } *
390 0x00004B69 GIO_UNISCRNMAP struct { short [E_TABSZ]; } *
391 0x00004B6A PIO_UNISCRNMAP const struct { short [E_TABSZ]; } *
392 0x00004B66 GIO_UNIMAP struct unimapdesc * // MORE // I-O
393 0x00004B67 PIO_UNIMAP const struct unimapdesc * // MORE
394 0x00004B68 PIO_UNIMAPCLR const struct unimapinit *
395 0x00004B44 KDGKBMODE int *
396 0x00004B45 KDSKBMODE int
397 0x00004B62 KDGKBMETA int *
398 0x00004B63 KDSKBMETA int
399 0x00004B64 KDGKBLED int *
400 0x00004B65 KDSKBLED int
401 0x00004B46 KDGKBENT struct kbentry * // I-O
402 0x00004B47 KDSKBENT const struct kbentry *
403 0x00004B48 KDGKBSENT struct kbsentry * // I-O
404 0x00004B49 KDSKBSENT const struct kbsentry *
405 0x00004B4A KDGKBDIACR struct kbdiacrs *
406 0x00004B4B KDSKBDIACR const struct kbdiacrs *
407 0x00004B4C KDGETKEYCODE struct kbkeycode * // I-O
408 0x00004B4D KDSETKEYCODE const struct kbkeycode *
409 0x00004B4E KDSIGACCEPT int
410 .TE
411
412 // <include/linux/lp.h>
413 .TS
414 l l l l.
415 0x00000601 LPCHAR int
416 0x00000602 LPTIME int
417 0x00000604 LPABORT int
418 0x00000605 LPSETIRQ int
419 0x00000606 LPGETIRQ int *
420 0x00000608 LPWAIT int
421 0x00000609 LPCAREFUL int
422 0x0000060A LPABORTOPEN int
423 0x0000060B LPGETSTATUS int *
424 0x0000060C LPRESET void
425 0x0000060D LPGETSTATS struct lp_stats *
426 .TE
427
428 // <include/linux/mroute.h>
429 .TS
430 l l l l.
431 0x000089E0 SIOCGETVIFCNT struct sioc_vif_req * // I-O
432 0x000089E1 SIOCGETSGCNT struct sioc_sg_req * // I-O
433 .TE
434
435 // <include/linux/mtio.h>
436 .TS
437 l l l l.
438 0x40086D01 MTIOCTOP const struct mtop *
439 0x801C6D02 MTIOCGET struct mtget *
440 0x80046D03 MTIOCPOS struct mtpos *
441 0x80206D04 MTIOCGETCONFIG struct mtconfiginfo *
442 0x40206D05 MTIOCSETCONFIG const struct mtconfiginfo *
443 .TE
444
445 // <include/linux/netrom.h>
446 .TS
447 l l l l.
448 0x000089E0 SIOCNRGETPARMS struct nr_parms_struct * // I-O
449 0x000089E1 SIOCNRSETPARMS const struct nr_parms_struct *
450 0x000089E2 SIOCNRDECOBS void
451 0x000089E3 SIOCNRRTCTL const int *
452 .TE
453
454 // <include/linux/sbpcd.h>
455 .TS
456 l l l l.
457 0x00009000 DDIOCSDBG const int *
458 0x00005382 CDROMAUDIOBUFSIZ int
459 .TE
460
461 // <include/linux/scc.h>
462 .TS
463 l l l l.
464 0x00005470 TIOCSCCINI void
465 0x00005471 TIOCCHANINI const struct scc_modem *
466 0x00005472 TIOCGKISS struct ioctl_command * // I-O
467 0x00005473 TIOCSKISS const struct ioctl_command *
468 0x00005474 TIOCSCCSTAT struct scc_stat *
469 .TE
470
471 // <include/linux/scsi.h>
472 .TS
473 l l l l.
474 0x00005382 SCSI_IOCTL_GET_IDLUN struct { int [2]; } *
475 0x00005383 SCSI_IOCTL_TAGGED_ENABLE void
476 0x00005384 SCSI_IOCTL_TAGGED_DISABLE void
477 0x00005385 SCSI_IOCTL_PROBE_HOST const int * // MORE
478 .TE
479
480 // <include/linux/smb_fs.h>
481 .TS
482 l l l l.
483 0x80027501 SMB_IOC_GETMOUNTUID uid_t *
484 .TE
485
486 // <include/linux/sockios.h>
487 .TS
488 l l l l.
489 0x0000890B SIOCADDRT const struct rtentry * // MORE
490 0x0000890C SIOCDELRT const struct rtentry * // MORE
491 0x00008910 SIOCGIFNAME char []
492 0x00008911 SIOCSIFLINK void
493 0x00008912 SIOCGIFCONF struct ifconf * // MORE // I-O
494 0x00008913 SIOCGIFFLAGS struct ifreq * // I-O
495 0x00008914 SIOCSIFFLAGS const struct ifreq *
496 0x00008915 SIOCGIFADDR struct ifreq * // I-O
497 0x00008916 SIOCSIFADDR const struct ifreq *
498 0x00008917 SIOCGIFDSTADDR struct ifreq * // I-O
499 0x00008918 SIOCSIFDSTADDR const struct ifreq *
500 0x00008919 SIOCGIFBRDADDR struct ifreq * // I-O
501 0x0000891A SIOCSIFBRDADDR const struct ifreq *
502 0x0000891B SIOCGIFNETMASK struct ifreq * // I-O
503 0x0000891C SIOCSIFNETMASK const struct ifreq *
504 0x0000891D SIOCGIFMETRIC struct ifreq * // I-O
505 0x0000891E SIOCSIFMETRIC const struct ifreq *
506 0x0000891F SIOCGIFMEM struct ifreq * // I-O
507 0x00008920 SIOCSIFMEM const struct ifreq *
508 0x00008921 SIOCGIFMTU struct ifreq * // I-O
509 0x00008922 SIOCSIFMTU const struct ifreq *
510 0x00008923 OLD_SIOCGIFHWADDR struct ifreq * // I-O
511 0x00008924 SIOCSIFHWADDR const struct ifreq * // MORE
512 0x00008925 SIOCGIFENCAP int *
513 0x00008926 SIOCSIFENCAP const int *
514 0x00008927 SIOCGIFHWADDR struct ifreq * // I-O
515 0x00008929 SIOCGIFSLAVE void
516 0x00008930 SIOCSIFSLAVE void
517 0x00008931 SIOCADDMULTI const struct ifreq *
518 0x00008932 SIOCDELMULTI const struct ifreq *
519 0x00008940 SIOCADDRTOLD void
520 0x00008941 SIOCDELRTOLD void
521 0x00008950 SIOCDARP const struct arpreq *
522 0x00008951 SIOCGARP struct arpreq * // I-O
523 0x00008952 SIOCSARP const struct arpreq *
524 0x00008960 SIOCDRARP const struct arpreq *
525 0x00008961 SIOCGRARP struct arpreq * // I-O
526 0x00008962 SIOCSRARP const struct arpreq *
527 0x00008970 SIOCGIFMAP struct ifreq * // I-O
528 0x00008971 SIOCSIFMAP const struct ifreq *
529 .TE
530
531 // <include/linux/soundcard.h>
532 .TS
533 l l l l.
534 0x00005100 SNDCTL_SEQ_RESET void
535 0x00005101 SNDCTL_SEQ_SYNC void
536 0xC08C5102 SNDCTL_SYNTH_INFO struct synth_info * // I-O
537 0xC0045103 SNDCTL_SEQ_CTRLRATE int * // I-O
538 0x80045104 SNDCTL_SEQ_GETOUTCOUNT int *
539 0x80045105 SNDCTL_SEQ_GETINCOUNT int *
540 0x40045106 SNDCTL_SEQ_PERCMODE void
541 0x40285107 SNDCTL_FM_LOAD_INSTR const struct sbi_instrument *
542 0x40045108 SNDCTL_SEQ_TESTMIDI const int *
543 0x40045109 SNDCTL_SEQ_RESETSAMPLES const int *
544 0x8004510A SNDCTL_SEQ_NRSYNTHS int *
545 0x8004510B SNDCTL_SEQ_NRMIDIS int *
546 0xC074510C SNDCTL_MIDI_INFO struct midi_info * // I-O
547 0x4004510D SNDCTL_SEQ_THRESHOLD const int *
548 0xC004510E SNDCTL_SYNTH_MEMAVL int * // I-O
549 0x4004510F SNDCTL_FM_4OP_ENABLE const int *
550 0xCFB85110 SNDCTL_PMGR_ACCESS struct patmgr_info * // I-O
551 0x00005111 SNDCTL_SEQ_PANIC void
552 0x40085112 SNDCTL_SEQ_OUTOFBAND const struct seq_event_rec *
553 0xC0045401 SNDCTL_TMR_TIMEBASE int * // I-O
554 0x00005402 SNDCTL_TMR_START void
555 0x00005403 SNDCTL_TMR_STOP void
556 0x00005404 SNDCTL_TMR_CONTINUE void
557 0xC0045405 SNDCTL_TMR_TEMPO int * // I-O
558 0xC0045406 SNDCTL_TMR_SOURCE int * // I-O
559 0x40045407 SNDCTL_TMR_METRONOME const int *
560 0x40045408 SNDCTL_TMR_SELECT int * // I-O
561 0xCFB85001 SNDCTL_PMGR_IFACE struct patmgr_info * // I-O
562 0xC0046D00 SNDCTL_MIDI_PRETIME int * // I-O
563 0xC0046D01 SNDCTL_MIDI_MPUMODE const int *
564 0xC0216D02 SNDCTL_MIDI_MPUCMD struct mpu_command_rec * // I-O
565 0x00005000 SNDCTL_DSP_RESET void
566 0x00005001 SNDCTL_DSP_SYNC void
567 0xC0045002 SNDCTL_DSP_SPEED int * // I-O
568 0xC0045003 SNDCTL_DSP_STEREO int * // I-O
569 0xC0045004 SNDCTL_DSP_GETBLKSIZE int * // I-O
570 0xC0045006 SOUND_PCM_WRITE_CHANNELS int * // I-O
571 0xC0045007 SOUND_PCM_WRITE_FILTER int * // I-O
572 0x00005008 SNDCTL_DSP_POST void
573 0xC0045009 SNDCTL_DSP_SUBDIVIDE int * // I-O
574 0xC004500A SNDCTL_DSP_SETFRAGMENT int * // I-O
575 0x8004500B SNDCTL_DSP_GETFMTS int *
576 0xC0045005 SNDCTL_DSP_SETFMT int * // I-O
577 0x800C500C SNDCTL_DSP_GETOSPACE struct audio_buf_info *
578 0x800C500D SNDCTL_DSP_GETISPACE struct audio_buf_info *
579 0x0000500E SNDCTL_DSP_NONBLOCK void
580 0x80045002 SOUND_PCM_READ_RATE int *
581 0x80045006 SOUND_PCM_READ_CHANNELS int *
582 0x80045005 SOUND_PCM_READ_BITS int *
583 0x80045007 SOUND_PCM_READ_FILTER int *
584 0x00004300 SNDCTL_COPR_RESET void
585 0xCFB04301 SNDCTL_COPR_LOAD const struct copr_buffer *
586 0xC0144302 SNDCTL_COPR_RDATA struct copr_debug_buf * // I-O
587 0xC0144303 SNDCTL_COPR_RCODE struct copr_debug_buf * // I-O
588 0x40144304 SNDCTL_COPR_WDATA const struct copr_debug_buf *
589 0x40144305 SNDCTL_COPR_WCODE const struct copr_debug_buf *
590 0xC0144306 SNDCTL_COPR_RUN struct copr_debug_buf * // I-O
591 0xC0144307 SNDCTL_COPR_HALT struct copr_debug_buf * // I-O
592 0x4FA44308 SNDCTL_COPR_SENDMSG const struct copr_msg *
593 0x8FA44309 SNDCTL_COPR_RCVMSG struct copr_msg *
594 0x80044D00 SOUND_MIXER_READ_VOLUME int *
595 0x80044D01 SOUND_MIXER_READ_BASS int *
596 0x80044D02 SOUND_MIXER_READ_TREBLE int *
597 0x80044D03 SOUND_MIXER_READ_SYNTH int *
598 0x80044D04 SOUND_MIXER_READ_PCM int *
599 0x80044D05 SOUND_MIXER_READ_SPEAKER int *
600 0x80044D06 SOUND_MIXER_READ_LINE int *
601 0x80044D07 SOUND_MIXER_READ_MIC int *
602 0x80044D08 SOUND_MIXER_READ_CD int *
603 0x80044D09 SOUND_MIXER_READ_IMIX int *
604 0x80044D0A SOUND_MIXER_READ_ALTPCM int *
605 0x80044D0B SOUND_MIXER_READ_RECLEV int *
606 0x80044D0C SOUND_MIXER_READ_IGAIN int *
607 0x80044D0D SOUND_MIXER_READ_OGAIN int *
608 0x80044D0E SOUND_MIXER_READ_LINE1 int *
609 0x80044D0F SOUND_MIXER_READ_LINE2 int *
610 0x80044D10 SOUND_MIXER_READ_LINE3 int *
611 0x80044D1C SOUND_MIXER_READ_MUTE int *
612 0x80044D1D SOUND_MIXER_READ_ENHANCE int *
613 0x80044D1E SOUND_MIXER_READ_LOUD int *
614 0x80044DFF SOUND_MIXER_READ_RECSRC int *
615 0x80044DFE SOUND_MIXER_READ_DEVMASK int *
616 0x80044DFD SOUND_MIXER_READ_RECMASK int *
617 0x80044DFB SOUND_MIXER_READ_STEREODEVS int *
618 0x80044DFC SOUND_MIXER_READ_CAPS int *
619 0xC0044D00 SOUND_MIXER_WRITE_VOLUME int * // I-O
620 0xC0044D01 SOUND_MIXER_WRITE_BASS int * // I-O
621 0xC0044D02 SOUND_MIXER_WRITE_TREBLE int * // I-O
622 0xC0044D03 SOUND_MIXER_WRITE_SYNTH int * // I-O
623 0xC0044D04 SOUND_MIXER_WRITE_PCM int * // I-O
624 0xC0044D05 SOUND_MIXER_WRITE_SPEAKER int * // I-O
625 0xC0044D06 SOUND_MIXER_WRITE_LINE int * // I-O
626 0xC0044D07 SOUND_MIXER_WRITE_MIC int * // I-O
627 0xC0044D08 SOUND_MIXER_WRITE_CD int * // I-O
628 0xC0044D09 SOUND_MIXER_WRITE_IMIX int * // I-O
629 0xC0044D0A SOUND_MIXER_WRITE_ALTPCM int * // I-O
630 0xC0044D0B SOUND_MIXER_WRITE_RECLEV int * // I-O
631 0xC0044D0C SOUND_MIXER_WRITE_IGAIN int * // I-O
632 0xC0044D0D SOUND_MIXER_WRITE_OGAIN int * // I-O
633 0xC0044D0E SOUND_MIXER_WRITE_LINE1 int * // I-O
634 0xC0044D0F SOUND_MIXER_WRITE_LINE2 int * // I-O
635 0xC0044D10 SOUND_MIXER_WRITE_LINE3 int * // I-O
636 0xC0044D1C SOUND_MIXER_WRITE_MUTE int * // I-O
637 0xC0044D1D SOUND_MIXER_WRITE_ENHANCE int * // I-O
638 0xC0044D1E SOUND_MIXER_WRITE_LOUD int * // I-O
639 0xC0044DFF SOUND_MIXER_WRITE_RECSRC int * // I-O
640 .TE
641
642 // <include/linux/umsdos_fs.h>
643 .TS
644 l l l l.
645 0x000004D2 UMSDOS_READDIR_DOS struct umsdos_ioctl * // I-O
646 0x000004D3 UMSDOS_UNLINK_DOS const struct umsdos_ioctl *
647 0x000004D4 UMSDOS_RMDIR_DOS const struct umsdos_ioctl *
648 0x000004D5 UMSDOS_STAT_DOS struct umsdos_ioctl * // I-O
649 0x000004D6 UMSDOS_CREAT_EMD const struct umsdos_ioctl *
650 0x000004D7 UMSDOS_UNLINK_EMD const struct umsdos_ioctl *
651 0x000004D8 UMSDOS_READDIR_EMD struct umsdos_ioctl * // I-O
652 0x000004D9 UMSDOS_GETVERSION struct umsdos_ioctl *
653 0x000004DA UMSDOS_INIT_EMD void
654 0x000004DB UMSDOS_DOS_SETUP const struct umsdos_ioctl *
655 0x000004DC UMSDOS_RENAME_DOS const struct umsdos_ioctl *
656 .TE
657
658 // <include/linux/vt.h>
659 .TS
660 l l l l.
661 0x00005600 VT_OPENQRY int *
662 0x00005601 VT_GETMODE struct vt_mode *
663 0x00005602 VT_SETMODE const struct vt_mode *
664 0x00005603 VT_GETSTATE struct vt_stat *
665 0x00005604 VT_SENDSIG void
666 0x00005605 VT_RELDISP int
667 0x00005606 VT_ACTIVATE int
668 0x00005607 VT_WAITACTIVE int
669 0x00005608 VT_DISALLOCATE int
670 0x00005609 VT_RESIZE const struct vt_sizes *
671 0x0000560A VT_RESIZEX const struct vt_consize *
672 .TE
673
674 // More arguments.
675 Some ioctl's take a pointer to a structure which contains additional
676 pointers. These are documented here in alphabetical order.
677
678 .B CDROMREADAUDIO
679 takes an input pointer
680 .IR "const struct cdrom_read_audio *" .
681 The
682 .I buf
683 field points to an output buffer of length
684 .IR "nframes * CD_FRAMESIZE_RAW" .
685
686 .BR CDROMREADCOOKED ,
687 .BR CDROMREADMODE1 ,
688 .BR CDROMREADMODE2 ,
689 and
690 .B CDROMREADRAW
691 take an input pointer
692 .IR "const struct cdrom_msf *" .
693 They use the same pointer as an output pointer to
694 .IR "char []" .
695 The length varies by request.
696 For
697 .BR CDROMREADMODE1 ,
698 most drivers use 'CD_FRAMESIZE', but the Optics Storage
699 driver uses 'OPT_BLOCKSIZE' instead (both have the numerical value
700 2048).
701 .nf
702
703 CDROMREADCOOKED char [CD_FRAMESIZE]
704 CDROMREADMODE1 char [CD_FRAMESIZE or OPT_BLOCKSIZE]
705 CDROMREADMODE2 char [CD_FRAMESIZE_RAW0]
706 CDROMREADRAW char [CD_FRAMESIZE_RAW]
707
708 .fi
709 .BR EQL_ENSLAVE ,
710 .BR EQL_EMANCIPATE ,
711 .BR EQL_GETSLAVECFG ,
712 .BR EQL_SETSLAVECFG ,
713 .BR EQL_GETMASTERCFG ,
714 and
715 .B EQL_SETMASTERCFG
716 take a
717 .IR "struct ifreq *" .
718 The
719 .I ifr_data
720 field is a pointer to another structure as follows:
721 .nf
722
723 EQL_ENSLAVE const struct slaving_request *
724 EQL_EMANCIPATE const struct slaving_request *
725 EQL_GETSLAVECFG struct slave_config * // I-O
726 EQL_SETSLAVECFG const struct slave_config *
727 EQL_GETMASTERCFG struct master_config *
728 EQL_SETMASTERCFG const struct master_config *
729
730 .fi
731 .B FDRAWCMD
732 takes a
733 .IR "struct floppy raw_cmd *" .
734 If
735 .I flags & FD_RAW_WRITE
736 is non-zero, then
737 .I data
738 points to an input buffer of length
739 .IR length .
740 If
741 .I flags & FD_RAW_READ
742 is non-zero, then
743 .I data
744 points to an output buffer of length
745 .IR length .
746
747 .B GIO_FONTX
748 and
749 .B PIO_FONTX
750 take a
751 .I struct console_font_desc *
752 or a
753 .IR "const struct console_font_desc *" ,
754 respectively.
755 .I chardata
756 points to a buffer of
757 .IR "char [charcount]" .
758 This is an output buffer for
759 .B GIO_FONTX
760 and an input buffer for
761 .BR PIO_FONTX .
762
763 .B GIO_UNIMAP
764 and
765 .B PIO_UNIMAP
766 take a
767 .I struct unimapdesc *
768 or a
769 .IR "const struct unimapdesc *" ,
770 respectively.
771 .I entries
772 points to a buffer of
773 .IR "struct unipair [entry_ct]" .
774 This is an output buffer for
775 .B GIO_UNIMAP
776 and an input buffer for
777 .BR PIO_UNIMAP .
778
779 KDADDIO, KDDELIO, KDDISABIO, and KDENABIO enable or disable access to
780 I/O ports.
781 They are essentially alternate interfaces to 'ioperm'.
782
783 .B KDMAPDISP
784 and
785 .B KDUNMAPDISP
786 enable or disable memory mappings or I/O port access.
787 They are not implemented in the kernel.
788
789 .B SCSI_IOCTL_PROBE_HOST
790 takes an input pointer
791 .IR "const int *" ,
792 which is a length.
793 It uses the same pointer as an output pointer to a
794 .I char []
795 buffer of this length.
796
797 .B SIOCADDRT
798 and
799 .B SIOCDELRT
800 take an input pointer whose type depends on
801 the protocol:
802 .nf
803
804 Most protocols const struct rtentry *
805 AX.25 const struct ax25_route *
806 NET/ROM const struct nr_route_struct *
807
808 .fi
809 .B SIOCGIFCONF
810 takes a
811 .IR "struct ifconf *" .
812 The
813 .I ifc_buf
814 field points to a buffer of length
815 .I ifc_len
816 bytes, into which the kernel writes a list of type
817 .IR "struct ifreq []" .
818
819 .B SIOCSIFHWADDR
820 takes an input pointer whose type depends on the protocol:
821 .nf
822
823 Most protocols const struct ifreq *
824 AX.25 const char [AX25_ADDR_LEN]
825
826 .fi
827 .B TIOCLINUX
828 takes a
829 .IR "const char *" .
830 It uses this to distinguish several
831 independent sub-cases.
832 In the table below,
833 .I N + foo
834 means
835 .I foo
836 after an N-byte pad.
837 .I struct selection
838 is implicitly defined in
839 .IR drivers/char/selection.c
840 .nf
841
842 TIOCLINUX-2 1 + const struct selection *
843 TIOCLINUX-3 void
844 TIOCLINUX-4 void
845 TIOCLINUX-5 4 + const struct { long [8]; } *
846 TIOCLINUX-6 char *
847 TIOCLINUX-7 char *
848 TIOCLINUX-10 1 + const char *
849
850 .fi
851 // Duplicate ioctls
852
853 This list does not include ioctls in the range
854 .B SIOCDEVPRIVATE
855 and
856 .BR SIOCPROTOPRIVATE .
857 .TS
858 l l l.
859 0x00000001 FDSETPRM FIBMAP
860 0x00000002 FDDEFPRM FIGETBSZ
861 0x00005382 CDROMAUDIOBUFSIZ SCSI_IOCTL_GET_IDLUN
862 0x00005402 SNDCTL_TMR_START TCSETS
863 0x00005403 SNDCTL_TMR_STOP TCSETSW
864 0x00005404 SNDCTL_TMR_CONTINUE TCSETSF
865 .TE
866 .SH SEE ALSO
867 .BR ioctl (2)