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