]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/ioctl_list.2
ffix
[thirdparty/man-pages.git] / man2 / ioctl_list.2
CommitLineData
fea681da
MK
1.\" Ioctl List 1.3.27
2.\" Sun 17 Sep 1995
3.\" Michael Elizabeth Chastain
4.\" <mec@duracef.shout.net>
c13182ef 5.\"
fea681da 6.\" // Copyright
c13182ef 7.\"
fea681da
MK
8.\" Ioctl List 1.3.27 is copyright 1995 by Michael Elizabeth Chastain.
9.\" It is licensed under the Gnu Public License, Version 2.
c13182ef
MK
10.\"
11.\"
12.\"
fea681da 13.\" // Change Log
c13182ef 14.\"
fea681da
MK
15.\" 1.3.27 421 ioctls.
16.\" Type information for non-pointer args.
17.\" SIOCDEVPRIVATE, SIOCPROTOPRIVATE ioctls.
18.\" Descriptions of extended arguments.
c13182ef 19.\"
fea681da
MK
20.\" 1.2.9 365 ioctls.
21.\" First public version.
c13182ef
MK
22.\"
23.\"
d9343c5c 24.TH IOCTL_LIST 2 2003-03-30 "Linux" "Linux Programmer's Manual"
fea681da
MK
25.SH NAME
26ioctl_list \- list of ioctl calls in Linux/i386 kernel
fea681da 27.SH DESCRIPTION
fea681da 28This is Ioctl List 1.3.27, a list of ioctl calls in Linux/i386 kernel
c13182ef 291.3.27.
4bd8c614
MK
30It contains 421 ioctls from
31.IR /usr/include/{asm,linux}/*.h .
fea681da
MK
32For each ioctl, its numerical value, its name, and its argument
33type are given.
34.PP
35An argument type of 'const struct foo *' means the argument is input
36to the kernel. 'struct foo *' means the kernel outputs the argument.
37If the kernel uses the argument for both input and output, this is
38marked with // I-O.
39.PP
40Some ioctls take more arguments or return more values than a single
c13182ef
MK
41structure.
42These are marked // MORE and documented further in a
fea681da
MK
43separate section.
44.PP
45This list is very incomplete.
46Please e-mail changes and comments to <mec@duracef.shout.net>.
3fc15e60 47.SS "ioctl structure"
fea681da
MK
48.\" added two sections - aeb
49Ioctl command values are 32-bit constants.
50In principle these constants are completely arbitrary, but people have
51tried to build some structure into them.
52.LP
53The old Linux situation was that of mostly 16-bit constants, where the
54last byte is a serial number, and the preceding byte(s) give a type
c13182ef
MK
55indicating the driver.
56Sometimes the major number was used: 0x03
57for the HDIO_* ioctls, 0x06 for the LP* ioctls.
58And sometimes
59one or more ASCII letters were used.
60For example, TCGETS has value
fea681da
MK
610x00005401, with 0x54 = 'T' indicating the terminal driver, and
62CYGETTIMEOUT has value 0x00435906, with 0x43 0x59 = 'C' 'Y'
63indicating the cyclades driver.
64.LP
65Later (0.98p5) some more information was built into the number.
66One has 2 direction bits
67(00: none, 01: write, 10: read, 11: read/write)
68followed by 14 size bits (giving the size of the argument),
69followed by an 8-bit type (collecting the ioctls in groups
70for a common purpose or a common driver), and an 8-bit
71serial number.
72.LP
c84371c6 73The macros describing this structure live in \fI<asm/ioctl.h>\fP
fea681da
MK
74and are _IO(type,nr) and {_IOR,_IOW,_IOWR}(type,nr,size).
75They use sizeof(size) so that size is a
e9496f74 76misnomer here: this third parameter is a data type.
fea681da 77.LP
e9496f74
MK
78Note that the size bits are very unreliable: in lots of cases
79they are wrong, either because of buggy macros using
fea681da
MK
80sizeof(sizeof(struct)), or because of legacy values.
81.LP
82Thus, it seems that the new structure only gave disadvantages:
83it does not help in checking, but it causes varying values
84for the various architectures.
fea681da
MK
85.SH "RETURN VALUE"
86Decent ioctls return 0 on success and \-1 on error, while
c13182ef
MK
87any output value is stored via the argument.
88However,
fea681da
MK
89quite a few ioctls in fact return an output value.
90This is not yet indicated below.
fea681da
MK
91.nf
92
93// Main table.
94
95// <include/asm-i386/socket.h>
960x00008901 FIOSETOWN const int *
970x00008902 SIOCSPGRP const int *
980x00008903 FIOGETOWN int *
990x00008904 SIOCGPGRP int *
1000x00008905 SIOCATMARK int *
1010x00008906 SIOCGSTAMP timeval *
102
103// <include/asm-i386/termios.h>
1040x00005401 TCGETS struct termios *
1050x00005402 TCSETS const struct termios *
1060x00005403 TCSETSW const struct termios *
1070x00005404 TCSETSF const struct termios *
1080x00005405 TCGETA struct termio *
1090x00005406 TCSETA const struct termio *
1100x00005407 TCSETAW const struct termio *
1110x00005408 TCSETAF const struct termio *
1120x00005409 TCSBRK int
1130x0000540A TCXONC int
1140x0000540B TCFLSH int
1150x0000540C TIOCEXCL void
1160x0000540D TIOCNXCL void
1170x0000540E TIOCSCTTY int
1180x0000540F TIOCGPGRP pid_t *
1190x00005410 TIOCSPGRP const pid_t *
1200x00005411 TIOCOUTQ int *
1210x00005412 TIOCSTI const char *
1220x00005413 TIOCGWINSZ struct winsize *
1230x00005414 TIOCSWINSZ const struct winsize *
1240x00005415 TIOCMGET int *
1250x00005416 TIOCMBIS const int *
1260x00005417 TIOCMBIC const int *
1270x00005418 TIOCMSET const int *
1280x00005419 TIOCGSOFTCAR int *
1290x0000541A TIOCSSOFTCAR const int *
1300x0000541B FIONREAD int *
1310x0000541B TIOCINQ int *
1320x0000541C TIOCLINUX const char * // MORE
1330x0000541D TIOCCONS void
1340x0000541E TIOCGSERIAL struct serial_struct *
1350x0000541F TIOCSSERIAL const struct serial_struct *
1360x00005420 TIOCPKT const int *
1370x00005421 FIONBIO const int *
1380x00005422 TIOCNOTTY void
1390x00005423 TIOCSETD const int *
1400x00005424 TIOCGETD int *
1410x00005425 TCSBRKP int
1420x00005426 TIOCTTYGSTRUCT struct tty_struct *
1430x00005450 FIONCLEX void
1440x00005451 FIOCLEX void
1450x00005452 FIOASYNC const int *
1460x00005453 TIOCSERCONFIG void
1470x00005454 TIOCSERGWILD int *
1480x00005455 TIOCSERSWILD const int *
1490x00005456 TIOCGLCKTRMIOS struct termios *
1500x00005457 TIOCSLCKTRMIOS const struct termios *
1510x00005458 TIOCSERGSTRUCT struct async_struct *
1520x00005459 TIOCSERGETLSR int *
1530x0000545A TIOCSERGETMULTI struct serial_multiport_struct *
1540x0000545B TIOCSERSETMULTI const struct serial_multiport_struct *
155
156// <include/linux/ax25.h>
1570x000089E0 SIOCAX25GETUID const struct sockaddr_ax25 *
1580x000089E1 SIOCAX25ADDUID const struct sockaddr_ax25 *
1590x000089E2 SIOCAX25DELUID const struct sockaddr_ax25 *
1600x000089E3 SIOCAX25NOUID const int *
1610x000089E4 SIOCAX25DIGCTL const int *
1620x000089E5 SIOCAX25GETPARMS struct ax25_parms_struct * // I-O
ecbd70cd 1630x000089E6 SIOCAX25SETPARMS const struct ax25_parms_struct *
fea681da
MK
164
165// <include/linux/cdk.h>
1660x00007314 STL_BINTR void
1670x00007315 STL_BSTART void
1680x00007316 STL_BSTOP void
1690x00007317 STL_BRESET void
170
171// <include/linux/cdrom.h>
1720x00005301 CDROMPAUSE void
1730x00005302 CDROMRESUME void
1740x00005303 CDROMPLAYMSF const struct cdrom_msf *
1750x00005304 CDROMPLAYTRKIND const struct cdrom_ti *
1760x00005305 CDROMREADTOCHDR struct cdrom_tochdr *
1770x00005306 CDROMREADTOCENTRY struct cdrom_tocentry * // I-O
1780x00005307 CDROMSTOP void
1790x00005308 CDROMSTART void
1800x00005309 CDROMEJECT void
1810x0000530A CDROMVOLCTRL const struct cdrom_volctrl *
1820x0000530B CDROMSUBCHNL struct cdrom_subchnl * // I-O
1830x0000530C CDROMREADMODE2 const struct cdrom_msf * // MORE
1840x0000530D CDROMREADMODE1 const struct cdrom_msf * // MORE
1850x0000530E CDROMREADAUDIO const struct cdrom_read_audio * // MORE
1860x0000530F CDROMEJECT_SW int
1870x00005310 CDROMMULTISESSION struct cdrom_multisession * // I-O
1880x00005311 CDROM_GET_UPC struct { char [8]; } *
1890x00005312 CDROMRESET void
1900x00005313 CDROMVOLREAD struct cdrom_volctrl *
1910x00005314 CDROMREADRAW const struct cdrom_msf * // MORE
1920x00005315 CDROMREADCOOKED const struct cdrom_msf * // MORE
1930x00005316 CDROMSEEK const struct cdrom_msf *
194
195// <include/linux/cm206.h>
1960x00002000 CM206CTL_GET_STAT int
1970x00002001 CM206CTL_GET_LAST_STAT int
198
199// <include/linux/cyclades.h>
2000x00435901 CYGETMON struct cyclades_monitor *
2010x00435902 CYGETTHRESH int *
2020x00435903 CYSETTHRESH int
2030x00435904 CYGETDEFTHRESH int *
2040x00435905 CYSETDEFTHRESH int
2050x00435906 CYGETTIMEOUT int *
2060x00435907 CYSETTIMEOUT int
2070x00435908 CYGETDEFTIMEOUT int *
2080x00435909 CYSETDEFTIMEOUT int
209
210// <include/linux/ext2_fs.h>
2110x80046601 EXT2_IOC_GETFLAGS int *
2120x40046602 EXT2_IOC_SETFLAGS const int *
2130x80047601 EXT2_IOC_GETVERSION int *
2140x40047602 EXT2_IOC_SETVERSION const int *
215
216// <include/linux/fd.h>
2170x00000000 FDCLRPRM void
2180x00000001 FDSETPRM const struct floppy_struct *
2190x00000002 FDDEFPRM const struct floppy_struct *
2200x00000003 FDGETPRM struct floppy_struct *
2210x00000004 FDMSGON void
2220x00000005 FDMSGOFF void
2230x00000006 FDFMTBEG void
2240x00000007 FDFMTTRK const struct format_descr *
2250x00000008 FDFMTEND void
2260x0000000A FDSETEMSGTRESH int
2270x0000000B FDFLUSH void
2280x0000000C FDSETMAXERRS const struct floppy_max_errors *
2290x0000000E FDGETMAXERRS struct floppy_max_errors *
2300x00000010 FDGETDRVTYP struct { char [16]; } *
2310x00000014 FDSETDRVPRM const struct floppy_drive_params *
2320x00000015 FDGETDRVPRM struct floppy_drive_params *
2330x00000016 FDGETDRVSTAT struct floppy_drive_struct *
2340x00000017 FDPOLLDRVSTAT struct floppy_drive_struct *
2350x00000018 FDRESET int
2360x00000019 FDGETFDCSTAT struct floppy_fdc_state *
2370x0000001B FDWERRORCLR void
2380x0000001C FDWERRORGET struct floppy_write_errors *
2390x0000001E FDRAWCMD struct floppy_raw_cmd * // MORE // I-O
2400x00000028 FDTWADDLE void
241
242// <include/linux/fs.h>
2430x0000125D BLKROSET const int *
2440x0000125E BLKROGET int *
2450x0000125F BLKRRPART void
cf4224d4 2460x00001260 BLKGETSIZE unsigned long *
fea681da
MK
2470x00001261 BLKFLSBUF void
2480x00001262 BLKRASET int
2490x00001263 BLKRAGET int *
2500x00000001 FIBMAP int * // I-O
2510x00000002 FIGETBSZ int *
252
253// <include/linux/hdreg.h>
2540x00000301 HDIO_GETGEO struct hd_geometry *
2550x00000302 HDIO_GET_UNMASKINTR int *
2560x00000304 HDIO_GET_MULTCOUNT int *
2570x00000307 HDIO_GET_IDENTITY struct hd_driveid *
2580x00000308 HDIO_GET_KEEPSETTINGS int *
2590x00000309 HDIO_GET_CHIPSET int *
2600x0000030A HDIO_GET_NOWERR int *
2610x0000030B HDIO_GET_DMA int *
2620x0000031F HDIO_DRIVE_CMD int * // I-O
2630x00000321 HDIO_SET_MULTCOUNT int
2640x00000322 HDIO_SET_UNMASKINTR int
2650x00000323 HDIO_SET_KEEPSETTINGS int
2660x00000324 HDIO_SET_CHIPSET int
2670x00000325 HDIO_SET_NOWERR int
2680x00000326 HDIO_SET_DMA int
269
270// <include/linux/if_eql.h>
2710x000089F0 EQL_ENSLAVE struct ifreq * // MORE // I-O
2720x000089F1 EQL_EMANCIPATE struct ifreq * // MORE // I-O
2730x000089F2 EQL_GETSLAVECFG struct ifreq * // MORE // I-O
2740x000089F3 EQL_SETSLAVECFG struct ifreq * // MORE // I-O
2750x000089F4 EQL_GETMASTRCFG struct ifreq * // MORE // I-O
2760x000089F5 EQL_SETMASTRCFG struct ifreq * // MORE // I-O
277
278// <include/linux/if_plip.h>
2790x000089F0 SIOCDEVPLIP struct ifreq * // I-O
280
281// <include/linux/if_ppp.h>
2820x00005490 PPPIOCGFLAGS int *
2830x00005491 PPPIOCSFLAGS const int *
2840x00005492 PPPIOCGASYNCMAP int *
2850x00005493 PPPIOCSASYNCMAP const int *
2860x00005494 PPPIOCGUNIT int *
2870x00005495 PPPIOCSINPSIG const int *
2880x00005497 PPPIOCSDEBUG const int *
2890x00005498 PPPIOCGDEBUG int *
2900x00005499 PPPIOCGSTAT struct ppp_stats *
2910x0000549A PPPIOCGTIME struct ppp_ddinfo *
2920x0000549B PPPIOCGXASYNCMAP struct { int [8]; } *
2930x0000549C PPPIOCSXASYNCMAP const struct { int [8]; } *
2940x0000549D PPPIOCSMRU const int *
2950x0000549E PPPIOCRASYNCMAP const int *
2960x0000549F PPPIOCSMAXCID const int *
297
298// <include/linux/ipx.h>
2990x000089E0 SIOCAIPXITFCRT const char *
3000x000089E1 SIOCAIPXPRISLT const char *
3010x000089E2 SIOCIPXCFGDATA struct ipx_config_data *
302
303// <include/linux/kd.h>
3040x00004B60 GIO_FONT struct { char [8192]; } *
3050x00004B61 PIO_FONT const struct { char [8192]; } *
3060x00004B6B GIO_FONTX struct console_font_desc * // MORE I-O
3070x00004B6C PIO_FONTX const struct console_font_desc * //MORE
3080x00004B70 GIO_CMAP struct { char [48]; } *
3090x00004B71 PIO_CMAP const struct { char [48]; }
3100x00004B2F KIOCSOUND int
3110x00004B30 KDMKTONE int
3120x00004B31 KDGETLED char *
3130x00004B32 KDSETLED int
3140x00004B33 KDGKBTYPE char *
3150x00004B34 KDADDIO int // MORE
3160x00004B35 KDDELIO int // MORE
3170x00004B36 KDENABIO void // MORE
3180x00004B37 KDDISABIO void // MORE
3190x00004B3A KDSETMODE int
3200x00004B3B KDGETMODE int *
3210x00004B3C KDMAPDISP void // MORE
3220x00004B3D KDUNMAPDISP void // MORE
3230x00004B40 GIO_SCRNMAP struct { char [E_TABSZ]; } *
3240x00004B41 PIO_SCRNMAP const struct { char [E_TABSZ]; } *
3250x00004B69 GIO_UNISCRNMAP struct { short [E_TABSZ]; } *
3260x00004B6A PIO_UNISCRNMAP const struct { short [E_TABSZ]; } *
3270x00004B66 GIO_UNIMAP struct unimapdesc * // MORE // I-O
3280x00004B67 PIO_UNIMAP const struct unimapdesc * // MORE
3290x00004B68 PIO_UNIMAPCLR const struct unimapinit *
3300x00004B44 KDGKBMODE int *
3310x00004B45 KDSKBMODE int
3320x00004B62 KDGKBMETA int *
3330x00004B63 KDSKBMETA int
3340x00004B64 KDGKBLED int *
3350x00004B65 KDSKBLED int
3360x00004B46 KDGKBENT struct kbentry * // I-O
3370x00004B47 KDSKBENT const struct kbentry *
3380x00004B48 KDGKBSENT struct kbsentry * // I-O
3390x00004B49 KDSKBSENT const struct kbsentry *
3400x00004B4A KDGKBDIACR struct kbdiacrs *
3410x00004B4B KDSKBDIACR const struct kbdiacrs *
3420x00004B4C KDGETKEYCODE struct kbkeycode * // I-O
3430x00004B4D KDSETKEYCODE const struct kbkeycode *
3440x00004B4E KDSIGACCEPT int
345
346// <include/linux/lp.h>
3470x00000601 LPCHAR int
3480x00000602 LPTIME int
3490x00000604 LPABORT int
3500x00000605 LPSETIRQ int
3510x00000606 LPGETIRQ int *
3520x00000608 LPWAIT int
3530x00000609 LPCAREFUL int
3540x0000060A LPABORTOPEN int
3550x0000060B LPGETSTATUS int *
3560x0000060C LPRESET void
3570x0000060D LPGETSTATS struct lp_stats *
358
359// <include/linux/mroute.h>
3600x000089E0 SIOCGETVIFCNT struct sioc_vif_req * // I-O
3610x000089E1 SIOCGETSGCNT struct sioc_sg_req * // I-O
362
363// <include/linux/mtio.h>
3640x40086D01 MTIOCTOP const struct mtop *
3650x801C6D02 MTIOCGET struct mtget *
3660x80046D03 MTIOCPOS struct mtpos *
3670x80206D04 MTIOCGETCONFIG struct mtconfiginfo *
3680x40206D05 MTIOCSETCONFIG const struct mtconfiginfo *
369
370// <include/linux/netrom.h>
3710x000089E0 SIOCNRGETPARMS struct nr_parms_struct * // I-O
3720x000089E1 SIOCNRSETPARMS const struct nr_parms_struct *
3730x000089E2 SIOCNRDECOBS void
3740x000089E3 SIOCNRRTCTL const int *
375
376// <include/linux/sbpcd.h>
3770x00009000 DDIOCSDBG const int *
3780x00005382 CDROMAUDIOBUFSIZ int
379
380// <include/linux/scc.h>
3810x00005470 TIOCSCCINI void
3820x00005471 TIOCCHANINI const struct scc_modem *
3830x00005472 TIOCGKISS struct ioctl_command * // I-O
3840x00005473 TIOCSKISS const struct ioctl_command *
3850x00005474 TIOCSCCSTAT struct scc_stat *
386
387// <include/linux/scsi.h>
3880x00005382 SCSI_IOCTL_GET_IDLUN struct { int [2]; } *
3890x00005383 SCSI_IOCTL_TAGGED_ENABLE void
3900x00005384 SCSI_IOCTL_TAGGED_DISABLE void
3910x00005385 SCSI_IOCTL_PROBE_HOST const int * // MORE
392
393// <include/linux/smb_fs.h>
3940x80027501 SMB_IOC_GETMOUNTUID uid_t *
395
396// <include/linux/sockios.h>
3970x0000890B SIOCADDRT const struct rtentry * // MORE
3980x0000890C SIOCDELRT const struct rtentry * // MORE
3990x00008910 SIOCGIFNAME char []
4000x00008911 SIOCSIFLINK void
4010x00008912 SIOCGIFCONF struct ifconf * // MORE // I-O
4020x00008913 SIOCGIFFLAGS struct ifreq * // I-O
4030x00008914 SIOCSIFFLAGS const struct ifreq *
4040x00008915 SIOCGIFADDR struct ifreq * // I-O
4050x00008916 SIOCSIFADDR const struct ifreq *
4060x00008917 SIOCGIFDSTADDR struct ifreq * // I-O
4070x00008918 SIOCSIFDSTADDR const struct ifreq *
4080x00008919 SIOCGIFBRDADDR struct ifreq * // I-O
4090x0000891A SIOCSIFBRDADDR const struct ifreq *
4100x0000891B SIOCGIFNETMASK struct ifreq * // I-O
4110x0000891C SIOCSIFNETMASK const struct ifreq *
4120x0000891D SIOCGIFMETRIC struct ifreq * // I-O
4130x0000891E SIOCSIFMETRIC const struct ifreq *
4140x0000891F SIOCGIFMEM struct ifreq * // I-O
4150x00008920 SIOCSIFMEM const struct ifreq *
4160x00008921 SIOCGIFMTU struct ifreq * // I-O
4170x00008922 SIOCSIFMTU const struct ifreq *
4180x00008923 OLD_SIOCGIFHWADDR struct ifreq * // I-O
4190x00008924 SIOCSIFHWADDR const struct ifreq * // MORE
4200x00008925 SIOCGIFENCAP int *
4210x00008926 SIOCSIFENCAP const int *
4220x00008927 SIOCGIFHWADDR struct ifreq * // I-O
4230x00008929 SIOCGIFSLAVE void
4240x00008930 SIOCSIFSLAVE void
4250x00008931 SIOCADDMULTI const struct ifreq *
4260x00008932 SIOCDELMULTI const struct ifreq *
4270x00008940 SIOCADDRTOLD void
4280x00008941 SIOCDELRTOLD void
4290x00008950 SIOCDARP const struct arpreq *
4300x00008951 SIOCGARP struct arpreq * // I-O
4310x00008952 SIOCSARP const struct arpreq *
4320x00008960 SIOCDRARP const struct arpreq *
4330x00008961 SIOCGRARP struct arpreq * // I-O
4340x00008962 SIOCSRARP const struct arpreq *
4350x00008970 SIOCGIFMAP struct ifreq * // I-O
4360x00008971 SIOCSIFMAP const struct ifreq *
437
438// <include/linux/soundcard.h>
4390x00005100 SNDCTL_SEQ_RESET void
4400x00005101 SNDCTL_SEQ_SYNC void
4410xC08C5102 SNDCTL_SYNTH_INFO struct synth_info * // I-O
4420xC0045103 SNDCTL_SEQ_CTRLRATE int * // I-O
4430x80045104 SNDCTL_SEQ_GETOUTCOUNT int *
4440x80045105 SNDCTL_SEQ_GETINCOUNT int *
4450x40045106 SNDCTL_SEQ_PERCMODE void
4460x40285107 SNDCTL_FM_LOAD_INSTR const struct sbi_instrument *
4470x40045108 SNDCTL_SEQ_TESTMIDI const int *
4480x40045109 SNDCTL_SEQ_RESETSAMPLES const int *
4490x8004510A SNDCTL_SEQ_NRSYNTHS int *
4500x8004510B SNDCTL_SEQ_NRMIDIS int *
4510xC074510C SNDCTL_MIDI_INFO struct midi_info * // I-O
4520x4004510D SNDCTL_SEQ_THRESHOLD const int *
4530xC004510E SNDCTL_SYNTH_MEMAVL int * // I-O
4540x4004510F SNDCTL_FM_4OP_ENABLE const int *
4550xCFB85110 SNDCTL_PMGR_ACCESS struct patmgr_info * // I-O
4560x00005111 SNDCTL_SEQ_PANIC void
4570x40085112 SNDCTL_SEQ_OUTOFBAND const struct seq_event_rec *
4580xC0045401 SNDCTL_TMR_TIMEBASE int * // I-O
4590x00005402 SNDCTL_TMR_START void
4600x00005403 SNDCTL_TMR_STOP void
4610x00005404 SNDCTL_TMR_CONTINUE void
4620xC0045405 SNDCTL_TMR_TEMPO int * // I-O
4630xC0045406 SNDCTL_TMR_SOURCE int * // I-O
4640x40045407 SNDCTL_TMR_METRONOME const int *
4650x40045408 SNDCTL_TMR_SELECT int * // I-O
4660xCFB85001 SNDCTL_PMGR_IFACE struct patmgr_info * // I-O
4670xC0046D00 SNDCTL_MIDI_PRETIME int * // I-O
4680xC0046D01 SNDCTL_MIDI_MPUMODE const int *
4690xC0216D02 SNDCTL_MIDI_MPUCMD struct mpu_command_rec * // I-O
4700x00005000 SNDCTL_DSP_RESET void
4710x00005001 SNDCTL_DSP_SYNC void
4720xC0045002 SNDCTL_DSP_SPEED int * // I-O
4730xC0045003 SNDCTL_DSP_STEREO int * // I-O
4740xC0045004 SNDCTL_DSP_GETBLKSIZE int * // I-O
4750xC0045006 SOUND_PCM_WRITE_CHANNELS int * // I-O
4760xC0045007 SOUND_PCM_WRITE_FILTER int * // I-O
4770x00005008 SNDCTL_DSP_POST void
4780xC0045009 SNDCTL_DSP_SUBDIVIDE int * // I-O
4790xC004500A SNDCTL_DSP_SETFRAGMENT int * // I-O
4800x8004500B SNDCTL_DSP_GETFMTS int *
4810xC0045005 SNDCTL_DSP_SETFMT int * // I-O
4820x800C500C SNDCTL_DSP_GETOSPACE struct audio_buf_info *
4830x800C500D SNDCTL_DSP_GETISPACE struct audio_buf_info *
4840x0000500E SNDCTL_DSP_NONBLOCK void
4850x80045002 SOUND_PCM_READ_RATE int *
4860x80045006 SOUND_PCM_READ_CHANNELS int *
4870x80045005 SOUND_PCM_READ_BITS int *
4880x80045007 SOUND_PCM_READ_FILTER int *
4890x00004300 SNDCTL_COPR_RESET void
4900xCFB04301 SNDCTL_COPR_LOAD const struct copr_buffer *
4910xC0144302 SNDCTL_COPR_RDATA struct copr_debug_buf * // I-O
4920xC0144303 SNDCTL_COPR_RCODE struct copr_debug_buf * // I-O
4930x40144304 SNDCTL_COPR_WDATA const struct copr_debug_buf *
4940x40144305 SNDCTL_COPR_WCODE const struct copr_debug_buf *
4950xC0144306 SNDCTL_COPR_RUN struct copr_debug_buf * // I-O
4960xC0144307 SNDCTL_COPR_HALT struct copr_debug_buf * // I-O
4970x4FA44308 SNDCTL_COPR_SENDMSG const struct copr_msg *
4980x8FA44309 SNDCTL_COPR_RCVMSG struct copr_msg *
4990x80044D00 SOUND_MIXER_READ_VOLUME int *
5000x80044D01 SOUND_MIXER_READ_BASS int *
5010x80044D02 SOUND_MIXER_READ_TREBLE int *
5020x80044D03 SOUND_MIXER_READ_SYNTH int *
5030x80044D04 SOUND_MIXER_READ_PCM int *
5040x80044D05 SOUND_MIXER_READ_SPEAKER int *
5050x80044D06 SOUND_MIXER_READ_LINE int *
5060x80044D07 SOUND_MIXER_READ_MIC int *
5070x80044D08 SOUND_MIXER_READ_CD int *
5080x80044D09 SOUND_MIXER_READ_IMIX int *
5090x80044D0A SOUND_MIXER_READ_ALTPCM int *
5100x80044D0B SOUND_MIXER_READ_RECLEV int *
5110x80044D0C SOUND_MIXER_READ_IGAIN int *
5120x80044D0D SOUND_MIXER_READ_OGAIN int *
5130x80044D0E SOUND_MIXER_READ_LINE1 int *
5140x80044D0F SOUND_MIXER_READ_LINE2 int *
5150x80044D10 SOUND_MIXER_READ_LINE3 int *
5160x80044D1C SOUND_MIXER_READ_MUTE int *
5170x80044D1D SOUND_MIXER_READ_ENHANCE int *
5180x80044D1E SOUND_MIXER_READ_LOUD int *
5190x80044DFF SOUND_MIXER_READ_RECSRC int *
5200x80044DFE SOUND_MIXER_READ_DEVMASK int *
5210x80044DFD SOUND_MIXER_READ_RECMASK int *
5220x80044DFB SOUND_MIXER_READ_STEREODEVS int *
5230x80044DFC SOUND_MIXER_READ_CAPS int *
5240xC0044D00 SOUND_MIXER_WRITE_VOLUME int * // I-O
5250xC0044D01 SOUND_MIXER_WRITE_BASS int * // I-O
5260xC0044D02 SOUND_MIXER_WRITE_TREBLE int * // I-O
5270xC0044D03 SOUND_MIXER_WRITE_SYNTH int * // I-O
5280xC0044D04 SOUND_MIXER_WRITE_PCM int * // I-O
5290xC0044D05 SOUND_MIXER_WRITE_SPEAKER int * // I-O
5300xC0044D06 SOUND_MIXER_WRITE_LINE int * // I-O
5310xC0044D07 SOUND_MIXER_WRITE_MIC int * // I-O
5320xC0044D08 SOUND_MIXER_WRITE_CD int * // I-O
5330xC0044D09 SOUND_MIXER_WRITE_IMIX int * // I-O
5340xC0044D0A SOUND_MIXER_WRITE_ALTPCM int * // I-O
5350xC0044D0B SOUND_MIXER_WRITE_RECLEV int * // I-O
5360xC0044D0C SOUND_MIXER_WRITE_IGAIN int * // I-O
5370xC0044D0D SOUND_MIXER_WRITE_OGAIN int * // I-O
5380xC0044D0E SOUND_MIXER_WRITE_LINE1 int * // I-O
5390xC0044D0F SOUND_MIXER_WRITE_LINE2 int * // I-O
5400xC0044D10 SOUND_MIXER_WRITE_LINE3 int * // I-O
5410xC0044D1C SOUND_MIXER_WRITE_MUTE int * // I-O
5420xC0044D1D SOUND_MIXER_WRITE_ENHANCE int * // I-O
5430xC0044D1E SOUND_MIXER_WRITE_LOUD int * // I-O
5440xC0044DFF SOUND_MIXER_WRITE_RECSRC int * // I-O
545
546// <include/linux/umsdos_fs.h>
5470x000004D2 UMSDOS_READDIR_DOS struct umsdos_ioctl * // I-O
5480x000004D3 UMSDOS_UNLINK_DOS const struct umsdos_ioctl *
5490x000004D4 UMSDOS_RMDIR_DOS const struct umsdos_ioctl *
5500x000004D5 UMSDOS_STAT_DOS struct umsdos_ioctl * // I-O
5510x000004D6 UMSDOS_CREAT_EMD const struct umsdos_ioctl *
5520x000004D7 UMSDOS_UNLINK_EMD const struct umsdos_ioctl *
5530x000004D8 UMSDOS_READDIR_EMD struct umsdos_ioctl * // I-O
5540x000004D9 UMSDOS_GETVERSION struct umsdos_ioctl *
5550x000004DA UMSDOS_INIT_EMD void
5560x000004DB UMSDOS_DOS_SETUP const struct umsdos_ioctl *
5570x000004DC UMSDOS_RENAME_DOS const struct umsdos_ioctl *
558
559// <include/linux/vt.h>
5600x00005600 VT_OPENQRY int *
5610x00005601 VT_GETMODE struct vt_mode *
5620x00005602 VT_SETMODE const struct vt_mode *
5630x00005603 VT_GETSTATE struct vt_stat *
5640x00005604 VT_SENDSIG void
5650x00005605 VT_RELDISP int
5660x00005606 VT_ACTIVATE int
5670x00005607 VT_WAITACTIVE int
5680x00005608 VT_DISALLOCATE int
5690x00005609 VT_RESIZE const struct vt_sizes *
5700x0000560A VT_RESIZEX const struct vt_consize *
571
fea681da 572// More arguments.
88933758 573.fi
fea681da 574Some ioctl's take a pointer to a structure which contains additional
88933758 575pointers. These are documented here in alphabetical order.
fea681da
MK
576
577CDROMREADAUDIO takes an input pointer 'const struct cdrom_read_audio *'.
88933758 578The 'buf' field points to an output buffer of length 'nframes * CD_FRAMESIZE_RAW'.
fea681da
MK
579
580CDROMREADCOOKED, CDROMREADMODE1, CDROMREADMODE2, and CDROMREADRAW take
c13182ef
MK
581an input pointer 'const struct cdrom_msf *'.
582They use the same pointer as an output pointer to 'char []'.
583The length varies by request.
584For CDROMREADMODE1, most drivers use 'CD_FRAMESIZE', but the Optics Storage
fea681da
MK
585driver uses 'OPT_BLOCKSIZE' instead (both have the numerical value
5862048).
88933758 587.nf
fea681da
MK
588
589 CDROMREADCOOKED char [CD_FRAMESIZE]
590 CDROMREADMODE1 char [CD_FRAMESIZE or OPT_BLOCKSIZE]
591 CDROMREADMODE2 char [CD_FRAMESIZE_RAW0]
592 CDROMREADRAW char [CD_FRAMESIZE_RAW]
593
88933758 594.fi
fea681da
MK
595EQL_ENSLAVE, EQL_EMANCIPATE, EQL_GETSLAVECFG, EQL_SETSLAVECFG,
596EQL_GETMASTERCFG, and EQL_SETMASTERCFG take a 'struct ifreq *'.
597The 'ifr_data' field is a pointer to another structure as follows:
88933758 598.nf
fea681da 599
74d32233 600 EQL_ENSLAVE const struct slaving_request *
fea681da
MK
601 EQL_EMANCIPATE const struct slaving_request *
602 EQL_GETSLAVECFG struct slave_config * // I-O
603 EQL_SETSLAVECFG const struct slave_config *
604 EQL_GETMASTERCFG struct master_config *
605 EQL_SETMASTERCFG const struct master_config *
606
88933758 607.fi
c13182ef
MK
608FDRAWCMD takes a 'struct floppy raw_cmd *'.
609If 'flags & FD_RAW_WRITE'
fea681da
MK
610is non-zero, then 'data' points to an input buffer of length 'length'.
611If 'flags & FD_RAW_READ' is non-zero, then 'data' points to an output
612buffer of length 'length'.
613
614GIO_FONTX and PIO_FONTX take a 'struct console_font_desc *' or
615a 'const struct console_font_desc *', respectively. 'chardata' points to
c13182ef
MK
616a buffer of 'char [charcount]'.
617This is an output buffer for GIO_FONTX
fea681da
MK
618and an input buffer for PIO_FONTX.
619
620GIO_UNIMAP and PIO_UNIMAP take a 'struct unimapdesc *' or
621a 'const struct unimapdesc *', respectively. 'entries' points to a buffer
c13182ef
MK
622of 'struct unipair [entry_ct]'.
623This is an output buffer for GIO_UNIMAP
fea681da
MK
624and an input buffer for PIO_UNIMAP.
625
626KDADDIO, KDDELIO, KDDISABIO, and KDENABIO enable or disable access to
c13182ef
MK
627I/O ports.
628They are essentially alternate interfaces to 'ioperm'.
fea681da
MK
629
630KDMAPDISP and KDUNMAPDISP enable or disable memory mappings or I/O port
c13182ef
MK
631access.
632They are not implemented in the kernel.
fea681da
MK
633
634SCSI_IOCTL_PROBE_HOST takes an input pointer 'const int *', which is a
c13182ef
MK
635length.
636It uses the same pointer as an output pointer to a 'char []'
fea681da
MK
637buffer of this length.
638
639SIOCADDRT and SIOCDELRT take an input pointer whose type depends on
640the protocol:
88933758 641.nf
fea681da
MK
642
643 Most protocols const struct rtentry *
644 AX.25 const struct ax25_route *
645 NET/ROM const struct nr_route_struct *
646
88933758 647.fi
c13182ef
MK
648SIOCGIFCONF takes a 'struct ifconf *'.
649The 'ifc_buf' field points to a
fea681da
MK
650buffer of length 'ifc_len' bytes, into which the kernel writes a list of
651type 'struct ifreq []'.
652
653SIOCSIFHWADDR takes an input pointer whose type depends on the protocol:
88933758 654.nf
fea681da
MK
655
656 Most protocols const struct ifreq *
657 AX.25 const char [AX25_ADDR_LEN]
658
88933758 659.fi
c13182ef
MK
660TIOCLINUX takes a 'const char *'.
661It uses this to distinguish several
662independent sub-cases.
663In the table below, 'N + foo' means 'foo' after
fea681da
MK
664an N-byte pad. 'struct selection' is implicitly defined
665in 'drivers/char/selection.c'
88933758 666.nf
fea681da
MK
667
668 TIOCLINUX-2 1 + const struct selection *
669 TIOCLINUX-3 void
670 TIOCLINUX-4 void
671 TIOCLINUX-5 4 + const struct { long [8]; } *
672 TIOCLINUX-6 char *
673 TIOCLINUX-7 char *
674 TIOCLINUX-10 1 + const char *
675
88933758 676.fi
fea681da
MK
677// Duplicate ioctls
678
679This list does not include ioctls in the range SIOCDEVPRIVATE and
680SIOCPROTOPRIVATE.
88933758 681.nf
fea681da
MK
682
6830x00000001 FDSETPRM FIBMAP
6840x00000002 FDDEFPRM FIGETBSZ
6850x00005382 CDROMAUDIOBUFSIZ SCSI_IOCTL_GET_IDLUN
6860x00005402 SNDCTL_TMR_START TCSETS
6870x00005403 SNDCTL_TMR_STOP TCSETSW
6880x00005404 SNDCTL_TMR_CONTINUE TCSETSF
7b5ab594
MK
689.SH SEE ALSO
690.BR ioctl (2)