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