Unix/Linux系統調用
accept()函數 Unix/Linux
access()函數 Unix/Linux
acct()函數 Unix/Linux
add_key()函數 Unix/Linux
adjtimex()函數 Unix/Linux
afs_syscall()函數 Unix/Linux
alarm()函數 Unix/Linux
alloc_hugepages()函數 Unix/Linux
arch_prctl()函數 Unix/Linux
bdflush()函數 Unix/Linux
bind()函數 Unix/Linux
break未實現 Unix/Linux
brk()函數 Unix/Linux
cacheflush()函數 Unix/Linux
chdir()函數 Unix/Linux
chmod()函數 Unix/Linux
chown()函數 Unix/Linux
chroot()函數 Unix/Linux
clone()函數 Unix/Linux
close()函數 Unix/Linux
connect()函數 Unix/Linux
create_module()函數 Unix/Linux
open()函數 Unix/Linux
dup2()函數 Unix/Linux
dup()函數 Unix/Linux
epoll_create()函數 Unix/Linux
epoll_ctl()函數 Unix/Linux
epoll_wait()函數 Unix/Linux
execve()函數 Unix/Linux
exit_group函數 Unix/Linux
_exit()函數 Unix/Linux
exit()函數 Unix/Linux
faccessat()函數 Unix/Linux
fattach()函數 Unix/Linux
fchdir()函數 Unix/Linux
fchmodat()函數 Unix/Linux
fchmod()函數 Unix/Linux
fchownat()函數 Unix/Linux
fchown()函數 Unix/Linux
fcntl()函數 Unix/Linux
fdatasync()函數 Unix/Linux
fdetach()函數 Unix/Linux
flock()函數 Unix/Linux
fork()函數 Unix/Linux
alloc_hugepages()函數 Unix/Linux
fstatat()函數 Unix/Linux
statfs()函數 Unix/Linux
stat()函數 Unix/Linux
statvfs()函數 Unix/Linux
fsync()函數 Unix/Linux
truncate()函數 Unix/Linux
futex()函數 Unix/Linux
futimesat()函數 Unix/Linux
getcontext()函數 Unix/Linux
getcwd()函數 Unix/Linux
getdents()函數 Unix/Linux
getdomainname()函數 Unix/Linux
getdtablesize()函數 Unix/Linux
getgid()函數 Unix/Linux
getuid()函數 Unix/Linux
getgroups()函數 Unix/Linux
getgroups()函數 Unix/Linux
gethostname()函數 Unix/Linux
getitimer()函數 Unix/Linux
get_kernel_syms()函數 Unix/Linux
unimplemented()函數 Unix/Linux
getpagesize()函數 Unix/Linux
getpeername()函數 Unix/Linux
setpgid()函數 Unix/Linux
getpgrp()函數 Unix/Linux
getpid()函數 Unix/Linux
getpmsg()函數 Unix/Linux
getppid()函數 Unix/Linux
getpriority()函數 Unix/Linux
getresuid()函數 Unix/Linux
getrlimit()函數 Unix/Linux
get_robust_list()函數 Unix/Linux
getrusage()函數 Unix/Linux
getsid()函數 Unix/Linux
getsockname()函數 Unix/Linux
getsockopt()函數 Unix/Linux
get_thread_area()函數 Unix/Linux
gettid()函數 Unix/Linux
gettimeofday()函數 Unix/Linux
getuid()函數 Unix/Linux
getunwind()函數 Unix/Linux
gtty()函數 Unix/Linux
idle()函數 Unix/Linux
outb()函數 Unix/Linux
inb_p()函數 Unix/Linux
inl()函數 Unix/Linux
inl_p()函數 Unix/Linux
inotify_add_watch()函數 Unix/Linux
inotify_init()函數 Unix/Linux
inotify_rm_watch()函數 Unix/Linux
outb()函數 Unix/Linux
insl()函數 Unix/Linux
insw()函數 Unix/Linux
intro()函數 Unix/Linux
inw()函數 Unix/Linux
inw_p()函數 Unix/Linux
io_cancel()函數 Unix/Linux
ioctl()函數 Unix/Linux
ioctl_list()函數 Unix/Linux
io_destroy()函數 Unix/Linux
io_getevents()函數 Unix/Linux
ioperm()函數 Unix/Linux
iopl()函數 Unix/Linux
ioprio_set()函數 Unix/Linux
io_setup()函數 Unix/Linux
io_submit()函數 Unix/Linux
ipc()函數 Unix/Linux
isastream()函數 Unix/Linux
kexec_load()函數 Unix/Linux
keyctl()函數 Unix/Linux
kill()函數 Unix/Linux
killpg()函數 Unix/Linux
lchown()函數 Unix/Linux
linkat()函數 Unix/Linux
link()函數 Unix/Linux
listen()函數 Unix/Linux
_llseek()函數 Unix/Linux
llseek()函數 Unix/Linux
lock()函數 Unix/Linux
lookup_dcookie()函數 Unix/Linux
lseek()函數 Unix/Linux
lstat()函數 Unix/Linux
madvise()函數 Unix/Linux
mincore()函數 Unix/Linux
mkdirat()函數 Unix/Linux
mkdir()函數 Unix/Linux
mknod()函數 Unix/Linux
mlockall()函數 Unix/Linux
mlock()函數 Unix/Linux
mmap2()函數 Unix/Linux
mmap()函數 Unix/Linux
modify_ldt()函數 Unix/Linux
mount()函數 Unix/Linux
move_pages()函數 Unix/Linux
mprotect()函數 Unix/Linux
mpx()函數 Unix/Linux
mq_getsetattr()函數 Unix/Linux
mremap()函數 Unix/Linux
msgctl()函數 Unix/Linux
msgget()函數 Unix/Linux
msgop()函數 Unix/Linux
msgsnd()函數 Unix/Linux
msync()函數 Unix/Linux
multiplexer()函數 Unix/Linux
munlockall()函數 Unix/Linux
munlock()函數 Unix/Linux
munmap()函數 Unix/Linux
nanosleep()函數 Unix/Linux
_newselect()函數 Unix/Linux
nfsservctl()函數 Unix/Linux
nice()函數 Unix/Linux
obsolete()函數 Unix/Linux
oldfstat()函數 Unix/Linux
oldlstat()函數 Unix/Linux
oldolduname()函數 Unix/Linux
oldstat()函數 Unix/Linux
olduname()函數 Unix/Linux
openat()函數 Unix/Linux
open()函數 Unix/Linux
outb()函數 Unix/Linux
outb_p()函數 Unix/Linux
outsb()函數 Unix/Linux
outsl()函數 Unix/Linux
outsw()函數 Unix/Linux
outw()函數 Unix/Linux
outw_p()函數 Unix/Linux
path_resolution()函數 Unix/Linux
pause()函數 Unix/Linux
perfmonctl()函數 Unix/Linux
personality()函數 Unix/Linux
pipe()函數 Unix/Linux
pivot_root()函數 Unix/Linux
poll()函數 Unix/Linux
posix_fadvise()函數 Unix/Linux
ppoll()函數 Unix/Linux
prctl()函數 Unix/Linux
pread()函數 Unix/Linux
prof()函數 Unix/Linux
pselect()函數 Unix/Linux
ptrace()函數 Unix/Linux
putmsg()函數 Unix/Linux
putpmsg()函數 Unix/Linux
pwrite()函數 Unix/Linux
query_module()函數 Unix/Linux
quotactl()函數 Unix/Linux
readahead()函數 Unix/Linux
readdir()函數 Unix/Linux
read()函數 Unix/Linux
readlinkat()函數 Unix/Linux
readlink()函數 Unix/Linux
readv()函數 Unix/Linux
reboot()函數 Unix/Linux
recvfrom()函數 Unix/Linux
recv()函數 Unix/Linux
recvmsg()函數 Unix/Linux
remap_file_pages()函數 Unix/Linux
renameat()函數 Unix/Linux
rename()函數 Unix/Linux
request_key()函數 Unix/Linux
rmdir()函數 Unix/Linux
sbrk()函數 Unix/Linux
sched_setaffinity()函數 Unix/Linux
sched_getparam()函數 Unix/Linux
sched_get_priority_max()函數 Unix/Linux
sched_get_priority_min()函數 Unix/Linux
sched_setscheduler()函數 Unix/Linux
sched_rr_get_interval()函數 Unix/Linux
sched_setparam()函數 Unix/Linux
sched_yield()函數 Unix/Linux
security()函數 Unix/Linux
select()函數 Unix/Linux
select_tut()函數 Unix/Linux
semctl()函數 Unix/Linux

ioctl_list()函數 Unix/Linux

ioctl_list - 在Linux/i386 中內核的ioctl調用列表

描述

This is Ioctl List 1.3.27, a list of ioctl calls in Linux/i386 kernel 1.3.27. It contains 421 ioctls from /usr/include/{asm,linux}/*.h. For each ioctl, its numerical value, its name, and its argument type are given.

An argument type of ’const struct foo *’ means the argument is input to the kernel. ’struct foo *’ means the kernel outputs the argument. If the kernel uses the argument for both input and output, this is marked with // I-O.

一些讀寫控制採取更多參數或返回超過一個單一的結構更多的值。這些標記//以上,進一步在一個單獨的部分記錄。

這個列表是非常不完整的。請電郵修訂和批註,Mail: <[email protected]>.

IOCTL結構

ioctl命令的值是32位的常數。原則上這些常量是完全任意的,但人們都試圖建立一些結構放進去。

The old Linux situation was that of mostly 16-bit constants, where the last byte is a serial number, and the preceding byte(s) give a type indicating the driver. Sometimes the major number was used: 0x03 for the HDIO_* ioctls, 0x06 for the LP* ioctls. And sometimes one or more ASCII letters were used. For example, TCGETS has value 0x00005401, with 0x54 = ’T’ indicating the terminal driver, and CYGETTIMEOUT has value 0x00435906, with 0x43 0x59 = ’C’ ’Y’ indicating the cyclades driver.

Later (0.98p5) some more information was built into the number. One has 2 direction bits (00: none, 01: write, 10: read, 11: read/write) followed by 14 size bits (giving the size of the argument), followed by an 8-bit type (collecting the ioctls in groups for a common purpose or a common driver), and an 8-bit serial number.

The macros describing this structure live in <asm/ioctl.h> and are _IO(type,nr) and {_IOR,_IOW,_IOWR}(type,nr,size). They use sizeof(size) so that size is a misnomer here: this third parameter is a data type.

Note that the size bits are very unreliable: in lots of cases they are wrong, either because of buggy macros using sizeof(sizeof(struct)), or because of legacy values.

Thus, it seems that the new structure only gave disadvantages: it does not help in checking, but it causes varying values for the various architectures.

返回值

Decent ioctls return 0 on success and -1 on error, while any output value is stored via the argument. However, quite a few ioctls in fact return an output value. This is not yet indicated below.

// Main table.

//

0x00008901 FIOSETOWN const int *
0x00008902 SIOCSPGRP const int *
0x00008903 FIOGETOWN int *
0x00008904 SIOCGPGRP int *
0x00008905 SIOCATMARK int *
0x00008906 SIOCGSTAMP timeval *

//

0x00005401 TCGETS struct termios \* 0x00005402 TCSETS const struct termios \* 0x00005403 TCSETSW const struct termios \* 0x00005404 TCSETSF const struct termios \* 0x00005405 TCGETA struct termio \* 0x00005406 TCSETA const struct termio \* 0x00005407 TCSETAW const struct termio \* 0x00005408 TCSETAF const struct termio \* 0x00005409 TCSBRK int 0x0000540A TCXONC int 0x0000540B TCFLSH int 0x0000540C TIOCEXCL void 0x0000540D TIOCNXCL void 0x0000540E TIOCSCTTY int 0x0000540F TIOCGPGRP pid\_t \* 0x00005410 TIOCSPGRP const pid\_t \* 0x00005411 TIOCOUTQ int \* 0x00005412 TIOCSTI const char \* 0x00005413 TIOCGWINSZ struct winsize \* 0x00005414 TIOCSWINSZ const struct winsize \* 0x00005415 TIOCMGET int \* 0x00005416 TIOCMBIS const int \* 0x00005417 TIOCMBIC const int \* 0x00005418 TIOCMSET const int \* 0x00005419 TIOCGSOFTCAR int \* 0x0000541A TIOCSSOFTCAR const int \* 0x0000541B FIONREAD int \* 0x0000541B TIOCINQ int \* 0x0000541C TIOCLINUX const char \* // MORE 0x0000541D TIOCCONS void 0x0000541E TIOCGSERIAL struct serial\_struct \* 0x0000541F TIOCSSERIAL const struct serial\_struct \* 0x00005420 TIOCPKT const int \* 0x00005421 FIONBIO const int \* 0x00005422 TIOCNOTTY void 0x00005423 TIOCSETD const int \* 0x00005424 TIOCGETD int \* 0x00005425 TCSBRKP int 0x00005426 TIOCTTYGSTRUCT struct tty\_struct \* 0x00005450 FIONCLEX void 0x00005451 FIOCLEX void 0x00005452 FIOASYNC const int \* 0x00005453 TIOCSERCONFIG void 0x00005454 TIOCSERGWILD int \* 0x00005455 TIOCSERSWILD const int \* 0x00005456 TIOCGLCKTRMIOS struct termios \* 0x00005457 TIOCSLCKTRMIOS const struct termios \* 0x00005458 TIOCSERGSTRUCT struct async\_struct \* 0x00005459 TIOCSERGETLSR int \* 0x0000545A TIOCSERGETMULTI struct serial\_multiport\_struct \* 0x0000545B TIOCSERSETMULTI const struct serial\_multiport\_struct \* // 

 0x000089E0 SIOCAX25GETUID const struct sockaddr\_ax25 \* 0x000089E1 SIOCAX25ADDUID const struct sockaddr\_ax25 \* 0x000089E2 SIOCAX25DELUID const struct sockaddr\_ax25 \* 0x000089E3 SIOCAX25NOUID const int \* 0x000089E4 SIOCAX25DIGCTL const int \* 0x000089E5 SIOCAX25GETPARMS struct ax25\_parms\_struct \* // I-O 0x000089E6 SIOCAX25SETPARMS const struct ax25\_parms-struct \* // 

  0x00007314 STL\_BINTR void 0x00007315 STL\_BSTART void 0x00007316 STL\_BSTOP void 0x00007317 STL\_BRESET void // 

   0x00005301 CDROMPAUSE void 0x00005302 CDROMRESUME void 0x00005303 CDROMPLAYMSF const struct cdrom\_msf \* 0x00005304 CDROMPLAYTRKIND const struct cdrom\_ti \* 0x00005305 CDROMREADTOCHDR struct cdrom\_tochdr \* 0x00005306 CDROMREADTOCENTRY struct cdrom\_tocentry \* // I-O 0x00005307 CDROMSTOP void 0x00005308 CDROMSTART void 0x00005309 CDROMEJECT void 0x0000530A CDROMVOLCTRL const struct cdrom\_volctrl \* 0x0000530B CDROMSUBCHNL struct cdrom\_subchnl \* // I-O 0x0000530C CDROMREADMODE2 const struct cdrom\_msf \* // MORE 0x0000530D CDROMREADMODE1 const struct cdrom\_msf \* // MORE 0x0000530E CDROMREADAUDIO const struct cdrom\_read\_audio \* // MORE 0x0000530F CDROMEJECT\_SW int 0x00005310 CDROMMULTISESSION struct cdrom\_multisession \* // I-O 0x00005311 CDROM\_GET\_UPC struct { char \[8\]; } \* 0x00005312 CDROMRESET void 0x00005313 CDROMVOLREAD struct cdrom\_volctrl \* 0x00005314 CDROMREADRAW const struct cdrom\_msf \* // MORE 0x00005315 CDROMREADCOOKED const struct cdrom\_msf \* // MORE 0x00005316 CDROMSEEK const struct cdrom\_msf \* // 

    0x00002000 CM206CTL\_GET\_STAT int 0x00002001 CM206CTL\_GET\_LAST\_STAT int // 

     0x00435901 CYGETMON struct cyclades\_monitor \* 0x00435902 CYGETTHRESH int \* 0x00435903 CYSETTHRESH int 0x00435904 CYGETDEFTHRESH int \* 0x00435905 CYSETDEFTHRESH int 0x00435906 CYGETTIMEOUT int \* 0x00435907 CYSETTIMEOUT int 0x00435908 CYGETDEFTIMEOUT int \* 0x00435909 CYSETDEFTIMEOUT int // 

      0x80046601 EXT2\_IOC\_GETFLAGS int \* 0x40046602 EXT2\_IOC\_SETFLAGS const int \* 0x80047601 EXT2\_IOC\_GETVERSION int \* 0x40047602 EXT2\_IOC\_SETVERSION const int \* // 

       0x00000000 FDCLRPRM void 0x00000001 FDSETPRM const struct floppy\_struct \* 0x00000002 FDDEFPRM const struct floppy\_struct \* 0x00000003 FDGETPRM struct floppy\_struct \* 0x00000004 FDMSGON void 0x00000005 FDMSGOFF void 0x00000006 FDFMTBEG void 0x00000007 FDFMTTRK const struct format\_descr \* 0x00000008 FDFMTEND void 0x0000000A FDSETEMSGTRESH int 0x0000000B FDFLUSH void 0x0000000C FDSETMAXERRS const struct floppy\_max\_errors \* 0x0000000E FDGETMAXERRS struct floppy\_max\_errors \* 0x00000010 FDGETDRVTYP struct { char \[16\]; } \* 0x00000014 FDSETDRVPRM const struct floppy\_drive\_params \* 0x00000015 FDGETDRVPRM struct floppy\_drive\_params \* 0x00000016 FDGETDRVSTAT struct floppy\_drive\_struct \* 0x00000017 FDPOLLDRVSTAT struct floppy\_drive\_struct \* 0x00000018 FDRESET int 0x00000019 FDGETFDCSTAT struct floppy\_fdc\_state \* 0x0000001B FDWERRORCLR void 0x0000001C FDWERRORGET struct floppy\_write\_errors \* 0x0000001E FDRAWCMD struct floppy\_raw\_cmd \* // MORE // I-O 0x00000028 FDTWADDLE void // 

        0x0000125D BLKROSET const int \* 0x0000125E BLKROGET int \* 0x0000125F BLKRRPART void 0x00001260 BLKGETSIZE int \* 0x00001261 BLKFLSBUF void 0x00001262 BLKRASET int 0x00001263 BLKRAGET int \* 0x00000001 FIBMAP int \* // I-O 0x00000002 FIGETBSZ int \* // 

         0x00000301 HDIO\_GETGEO struct hd\_geometry \* 0x00000302 HDIO\_GET\_UNMASKINTR int \* 0x00000304 HDIO\_GET\_MULTCOUNT int \* 0x00000307 HDIO\_GET\_IDENTITY struct hd\_driveid \* 0x00000308 HDIO\_GET\_KEEPSETTINGS int \* 0x00000309 HDIO\_GET\_CHIPSET int \* 0x0000030A HDIO\_GET\_NOWERR int \* 0x0000030B HDIO\_GET\_DMA int \* 0x0000031F HDIO\_DRIVE\_CMD int \* // I-O 0x00000321 HDIO\_SET\_MULTCOUNT int 0x00000322 HDIO\_SET\_UNMASKINTR int 0x00000323 HDIO\_SET\_KEEPSETTINGS int 0x00000324 HDIO\_SET\_CHIPSET int 0x00000325 HDIO\_SET\_NOWERR int 0x00000326 HDIO\_SET\_DMA int // 

          0x000089F0 EQL\_ENSLAVE struct ifreq \* // MORE // I-O 0x000089F1 EQL\_EMANCIPATE struct ifreq \* // MORE // I-O 0x000089F2 EQL\_GETSLAVECFG struct ifreq \* // MORE // I-O 0x000089F3 EQL\_SETSLAVECFG struct ifreq \* // MORE // I-O 0x000089F4 EQL\_GETMASTRCFG struct ifreq \* // MORE // I-O 0x000089F5 EQL\_SETMASTRCFG struct ifreq \* // MORE // I-O // 

           0x000089F0 SIOCDEVPLIP struct ifreq \* // I-O // 

            0x00005490 PPPIOCGFLAGS int \* 0x00005491 PPPIOCSFLAGS const int \* 0x00005492 PPPIOCGASYNCMAP int \* 0x00005493 PPPIOCSASYNCMAP const int \* 0x00005494 PPPIOCGUNIT int \* 0x00005495 PPPIOCSINPSIG const int \* 0x00005497 PPPIOCSDEBUG const int \* 0x00005498 PPPIOCGDEBUG int \* 0x00005499 PPPIOCGSTAT struct ppp\_stats \* 0x0000549A PPPIOCGTIME struct ppp\_ddinfo \* 0x0000549B PPPIOCGXASYNCMAP struct { int \[8\]; } \* 0x0000549C PPPIOCSXASYNCMAP const struct { int \[8\]; } \* 0x0000549D PPPIOCSMRU const int \* 0x0000549E PPPIOCRASYNCMAP const int \* 0x0000549F PPPIOCSMAXCID const int \* // 

             0x000089E0 SIOCAIPXITFCRT const char \* 0x000089E1 SIOCAIPXPRISLT const char \* 0x000089E2 SIOCIPXCFGDATA struct ipx\_config\_data \* // 

              0x00004B60 GIO\_FONT struct { char \[8192\]; } \* 0x00004B61 PIO\_FONT const struct { char \[8192\]; } \* 0x00004B6B GIO\_FONTX struct console\_font\_desc \* // MORE I-O 0x00004B6C PIO\_FONTX const struct console\_font\_desc \* //MORE 0x00004B70 GIO\_CMAP struct { char \[48\]; } \* 0x00004B71 PIO\_CMAP const struct { char \[48\]; } 0x00004B2F KIOCSOUND int 0x00004B30 KDMKTONE int 0x00004B31 KDGETLED char \* 0x00004B32 KDSETLED int 0x00004B33 KDGKBTYPE char \* 0x00004B34 KDADDIO int // MORE 0x00004B35 KDDELIO int // MORE 0x00004B36 KDENABIO void // MORE 0x00004B37 KDDISABIO void // MORE 0x00004B3A KDSETMODE int 0x00004B3B KDGETMODE int \* 0x00004B3C KDMAPDISP void // MORE 0x00004B3D KDUNMAPDISP void // MORE 0x00004B40 GIO\_SCRNMAP struct { char \[E\_TABSZ\]; } \* 0x00004B41 PIO\_SCRNMAP const struct { char \[E\_TABSZ\]; } \* 0x00004B69 GIO\_UNISCRNMAP struct { short \[E\_TABSZ\]; } \* 0x00004B6A PIO\_UNISCRNMAP const struct { short \[E\_TABSZ\]; } \* 0x00004B66 GIO\_UNIMAP struct unimapdesc \* // MORE // I-O 0x00004B67 PIO\_UNIMAP const struct unimapdesc \* // MORE 0x00004B68 PIO\_UNIMAPCLR const struct unimapinit \* 0x00004B44 KDGKBMODE int \* 0x00004B45 KDSKBMODE int 0x00004B62 KDGKBMETA int \* 0x00004B63 KDSKBMETA int 0x00004B64 KDGKBLED int \* 0x00004B65 KDSKBLED int 0x00004B46 KDGKBENT struct kbentry \* // I-O 0x00004B47 KDSKBENT const struct kbentry \* 0x00004B48 KDGKBSENT struct kbsentry \* // I-O 0x00004B49 KDSKBSENT const struct kbsentry \* 0x00004B4A KDGKBDIACR struct kbdiacrs \* 0x00004B4B KDSKBDIACR const struct kbdiacrs \* 0x00004B4C KDGETKEYCODE struct kbkeycode \* // I-O 0x00004B4D KDSETKEYCODE const struct kbkeycode \* 0x00004B4E KDSIGACCEPT int // 

               0x00000601 LPCHAR int 0x00000602 LPTIME int 0x00000604 LPABORT int 0x00000605 LPSETIRQ int 0x00000606 LPGETIRQ int \* 0x00000608 LPWAIT int 0x00000609 LPCAREFUL int 0x0000060A LPABORTOPEN int 0x0000060B LPGETSTATUS int \* 0x0000060C LPRESET void 0x0000060D LPGETSTATS struct lp\_stats \* // 

                0x000089E0 SIOCGETVIFCNT struct sioc\_vif\_req \* // I-O 0x000089E1 SIOCGETSGCNT struct sioc\_sg\_req \* // I-O // 

                 0x40086D01 MTIOCTOP const struct mtop \* 0x801C6D02 MTIOCGET struct mtget \* 0x80046D03 MTIOCPOS struct mtpos \* 0x80206D04 MTIOCGETCONFIG struct mtconfiginfo \* 0x40206D05 MTIOCSETCONFIG const struct mtconfiginfo \* // 

                  0x000089E0 SIOCNRGETPARMS struct nr\_parms\_struct \* // I-O 0x000089E1 SIOCNRSETPARMS const struct nr\_parms\_struct \* 0x000089E2 SIOCNRDECOBS void 0x000089E3 SIOCNRRTCTL const int \* // 

                   0x00009000 DDIOCSDBG const int \* 0x00005382 CDROMAUDIOBUFSIZ int // 

                    0x00005470 TIOCSCCINI void 0x00005471 TIOCCHANINI const struct scc\_modem \* 0x00005472 TIOCGKISS struct ioctl\_command \* // I-O 0x00005473 TIOCSKISS const struct ioctl\_command \* 0x00005474 TIOCSCCSTAT struct scc\_stat \* // 

                     0x00005382 SCSI\_IOCTL\_GET\_IDLUN struct { int \[2\]; } \* 0x00005383 SCSI\_IOCTL\_TAGGED\_ENABLE void 0x00005384 SCSI\_IOCTL\_TAGGED\_DISABLE void 0x00005385 SCSI\_IOCTL\_PROBE\_HOST const int \* // MORE // 

                      0x80027501 SMB\_IOC\_GETMOUNTUID uid\_t \* // 

                       0x0000890B SIOCADDRT const struct rtentry \* // MORE 0x0000890C SIOCDELRT const struct rtentry \* // MORE 0x00008910 SIOCGIFNAME char \[\] 0x00008911 SIOCSIFLINK void 0x00008912 SIOCGIFCONF struct ifconf \* // MORE // I-O 0x00008913 SIOCGIFFLAGS struct ifreq \* // I-O 0x00008914 SIOCSIFFLAGS const struct ifreq \* 0x00008915 SIOCGIFADDR struct ifreq \* // I-O 0x00008916 SIOCSIFADDR const struct ifreq \* 0x00008917 SIOCGIFDSTADDR struct ifreq \* // I-O 0x00008918 SIOCSIFDSTADDR const struct ifreq \* 0x00008919 SIOCGIFBRDADDR struct ifreq \* // I-O 0x0000891A SIOCSIFBRDADDR const struct ifreq \* 0x0000891B SIOCGIFNETMASK struct ifreq \* // I-O 0x0000891C SIOCSIFNETMASK const struct ifreq \* 0x0000891D SIOCGIFMETRIC struct ifreq \* // I-O 0x0000891E SIOCSIFMETRIC const struct ifreq \* 0x0000891F SIOCGIFMEM struct ifreq \* // I-O 0x00008920 SIOCSIFMEM const struct ifreq \* 0x00008921 SIOCGIFMTU struct ifreq \* // I-O 0x00008922 SIOCSIFMTU const struct ifreq \* 0x00008923 OLD\_SIOCGIFHWADDR struct ifreq \* // I-O 0x00008924 SIOCSIFHWADDR const struct ifreq \* // MORE 0x00008925 SIOCGIFENCAP int \* 0x00008926 SIOCSIFENCAP const int \* 0x00008927 SIOCGIFHWADDR struct ifreq \* // I-O 0x00008929 SIOCGIFSLAVE void 0x00008930 SIOCSIFSLAVE void 0x00008931 SIOCADDMULTI const struct ifreq \* 0x00008932 SIOCDELMULTI const struct ifreq \* 0x00008940 SIOCADDRTOLD void 0x00008941 SIOCDELRTOLD void 0x00008950 SIOCDARP const struct arpreq \* 0x00008951 SIOCGARP struct arpreq \* // I-O 0x00008952 SIOCSARP const struct arpreq \* 0x00008960 SIOCDRARP const struct arpreq \* 0x00008961 SIOCGRARP struct arpreq \* // I-O 0x00008962 SIOCSRARP const struct arpreq \* 0x00008970 SIOCGIFMAP struct ifreq \* // I-O 0x00008971 SIOCSIFMAP const struct ifreq \* // 

                        0x00005100 SNDCTL\_SEQ\_RESET void 0x00005101 SNDCTL\_SEQ\_SYNC void 0xC08C5102 SNDCTL\_SYNTH\_INFO struct synth\_info \* // I-O 0xC0045103 SNDCTL\_SEQ\_CTRLRATE int \* // I-O 0x80045104 SNDCTL\_SEQ\_GETOUTCOUNT int \* 0x80045105 SNDCTL\_SEQ\_GETINCOUNT int \* 0x40045106 SNDCTL\_SEQ\_PERCMODE void 0x40285107 SNDCTL\_FM\_LOAD\_INSTR const struct sbi\_instrument \* 0x40045108 SNDCTL\_SEQ\_TESTMIDI const int \* 0x40045109 SNDCTL\_SEQ\_RESETSAMPLES const int \* 0x8004510A SNDCTL\_SEQ\_NRSYNTHS int \* 0x8004510B SNDCTL\_SEQ\_NRMIDIS int \* 0xC074510C SNDCTL\_MIDI\_INFO struct midi\_info \* // I-O 0x4004510D SNDCTL\_SEQ\_THRESHOLD const int \* 0xC004510E SNDCTL\_SYNTH\_MEMAVL int \* // I-O 0x4004510F SNDCTL\_FM\_4OP\_ENABLE const int \* 0xCFB85110 SNDCTL\_PMGR\_ACCESS struct patmgr\_info \* // I-O 0x00005111 SNDCTL\_SEQ\_PANIC void 0x40085112 SNDCTL\_SEQ\_OUTOFBAND const struct seq\_event\_rec \* 0xC0045401 SNDCTL\_TMR\_TIMEBASE int \* // I-O 0x00005402 SNDCTL\_TMR\_START void 0x00005403 SNDCTL\_TMR\_STOP void 0x00005404 SNDCTL\_TMR\_CONTINUE void 0xC0045405 SNDCTL\_TMR\_TEMPO int \* // I-O 0xC0045406 SNDCTL\_TMR\_SOURCE int \* // I-O 0x40045407 SNDCTL\_TMR\_METRONOME const int \* 0x40045408 SNDCTL\_TMR\_SELECT int \* // I-O 0xCFB85001 SNDCTL\_PMGR\_IFACE struct patmgr\_info \* // I-O 0xC0046D00 SNDCTL\_MIDI\_PRETIME int \* // I-O 0xC0046D01 SNDCTL\_MIDI\_MPUMODE const int \* 0xC0216D02 SNDCTL\_MIDI\_MPUCMD struct mpu\_command\_rec \* // I-O 0x00005000 SNDCTL\_DSP\_RESET void 0x00005001 SNDCTL\_DSP\_SYNC void 0xC0045002 SNDCTL\_DSP\_SPEED int \* // I-O 0xC0045003 SNDCTL\_DSP\_STEREO int \* // I-O 0xC0045004 SNDCTL\_DSP\_GETBLKSIZE int \* // I-O 0xC0045006 SOUND\_PCM\_WRITE\_CHANNELS int \* // I-O 0xC0045007 SOUND\_PCM\_WRITE\_FILTER int \* // I-O 0x00005008 SNDCTL\_DSP\_POST void 0xC0045009 SNDCTL\_DSP\_SUBDIVIDE int \* // I-O 0xC004500A SNDCTL\_DSP\_SETFRAGMENT int \* // I-O 0x8004500B SNDCTL\_DSP\_GETFMTS int \* 0xC0045005 SNDCTL\_DSP\_SETFMT int \* // I-O 0x800C500C SNDCTL\_DSP\_GETOSPACE struct audio\_buf\_info \* 0x800C500D SNDCTL\_DSP\_GETISPACE struct audio\_buf\_info \* 0x0000500E SNDCTL\_DSP\_NONBLOCK void 0x80045002 SOUND\_PCM\_READ\_RATE int \* 0x80045006 SOUND\_PCM\_READ\_CHANNELS int \* 0x80045005 SOUND\_PCM\_READ\_BITS int \* 0x80045007 SOUND\_PCM\_READ\_FILTER int \* 0x00004300 SNDCTL\_COPR\_RESET void 0xCFB04301 SNDCTL\_COPR\_LOAD const struct copr\_buffer \* 0xC0144302 SNDCTL\_COPR\_RDATA struct copr\_debug\_buf \* // I-O 0xC0144303 SNDCTL\_COPR\_RCODE struct copr\_debug\_buf \* // I-O 0x40144304 SNDCTL\_COPR\_WDATA const struct copr\_debug\_buf \* 0x40144305 SNDCTL\_COPR\_WCODE const struct copr\_debug\_buf \* 0xC0144306 SNDCTL\_COPR\_RUN struct copr\_debug\_buf \* // I-O 0xC0144307 SNDCTL\_COPR\_HALT struct copr\_debug\_buf \* // I-O 0x4FA44308 SNDCTL\_COPR\_SENDMSG const struct copr\_msg \* 0x8FA44309 SNDCTL\_COPR\_RCVMSG struct copr\_msg \* 0x80044D00 SOUND\_MIXER\_READ\_VOLUME int \* 0x80044D01 SOUND\_MIXER\_READ\_BASS int \* 0x80044D02 SOUND\_MIXER\_READ\_TREBLE int \* 0x80044D03 SOUND\_MIXER\_READ\_SYNTH int \* 0x80044D04 SOUND\_MIXER\_READ\_PCM int \* 0x80044D05 SOUND\_MIXER\_READ\_SPEAKER int \* 0x80044D06 SOUND\_MIXER\_READ\_LINE int \* 0x80044D07 SOUND\_MIXER\_READ\_MIC int \* 0x80044D08 SOUND\_MIXER\_READ\_CD int \* 0x80044D09 SOUND\_MIXER\_READ\_IMIX int \* 0x80044D0A SOUND\_MIXER\_READ\_ALTPCM int \* 0x80044D0B SOUND\_MIXER\_READ\_RECLEV int \* 0x80044D0C SOUND\_MIXER\_READ\_IGAIN int \* 0x80044D0D SOUND\_MIXER\_READ\_OGAIN int \* 0x80044D0E SOUND\_MIXER\_READ\_LINE1 int \* 0x80044D0F SOUND\_MIXER\_READ\_LINE2 int \* 0x80044D10 SOUND\_MIXER\_READ\_LINE3 int \* 0x80044D1C SOUND\_MIXER\_READ\_MUTE int \* 0x80044D1D SOUND\_MIXER\_READ\_ENHANCE int \* 0x80044D1E SOUND\_MIXER\_READ\_LOUD int \* 0x80044DFF SOUND\_MIXER\_READ\_RECSRC int \* 0x80044DFE SOUND\_MIXER\_READ\_DEVMASK int \* 0x80044DFD SOUND\_MIXER\_READ\_RECMASK int \* 0x80044DFB SOUND\_MIXER\_READ\_STEREODEVS int \* 0x80044DFC SOUND\_MIXER\_READ\_CAPS int \* 0xC0044D00 SOUND\_MIXER\_WRITE\_VOLUME int \* // I-O 0xC0044D01 SOUND\_MIXER\_WRITE\_BASS int \* // I-O 0xC0044D02 SOUND\_MIXER\_WRITE\_TREBLE int \* // I-O 0xC0044D03 SOUND\_MIXER\_WRITE\_SYNTH int \* // I-O 0xC0044D04 SOUND\_MIXER\_WRITE\_PCM int \* // I-O 0xC0044D05 SOUND\_MIXER\_WRITE\_SPEAKER int \* // I-O 0xC0044D06 SOUND\_MIXER\_WRITE\_LINE int \* // I-O 0xC0044D07 SOUND\_MIXER\_WRITE\_MIC int \* // I-O 0xC0044D08 SOUND\_MIXER\_WRITE\_CD int \* // I-O 0xC0044D09 SOUND\_MIXER\_WRITE\_IMIX int \* // I-O 0xC0044D0A SOUND\_MIXER\_WRITE\_ALTPCM int \* // I-O 0xC0044D0B SOUND\_MIXER\_WRITE\_RECLEV int \* // I-O 0xC0044D0C SOUND\_MIXER\_WRITE\_IGAIN int \* // I-O 0xC0044D0D SOUND\_MIXER\_WRITE\_OGAIN int \* // I-O 0xC0044D0E SOUND\_MIXER\_WRITE\_LINE1 int \* // I-O 0xC0044D0F SOUND\_MIXER\_WRITE\_LINE2 int \* // I-O 0xC0044D10 SOUND\_MIXER\_WRITE\_LINE3 int \* // I-O 0xC0044D1C SOUND\_MIXER\_WRITE\_MUTE int \* // I-O 0xC0044D1D SOUND\_MIXER\_WRITE\_ENHANCE int \* // I-O 0xC0044D1E SOUND\_MIXER\_WRITE\_LOUD int \* // I-O 0xC0044DFF SOUND\_MIXER\_WRITE\_RECSRC int \* // I-O // 

                         0x000004D2 UMSDOS\_READDIR\_DOS struct umsdos\_ioctl \* // I-O 0x000004D3 UMSDOS\_UNLINK\_DOS const struct umsdos\_ioctl \* 0x000004D4 UMSDOS\_RMDIR\_DOS const struct umsdos\_ioctl \* 0x000004D5 UMSDOS\_STAT\_DOS struct umsdos\_ioctl \* // I-O 0x000004D6 UMSDOS\_CREAT\_EMD const struct umsdos\_ioctl \* 0x000004D7 UMSDOS\_UNLINK\_EMD const struct umsdos\_ioctl \* 0x000004D8 UMSDOS\_READDIR\_EMD struct umsdos\_ioctl \* // I-O 0x000004D9 UMSDOS\_GETVERSION struct umsdos\_ioctl \* 0x000004DA UMSDOS\_INIT\_EMD void 0x000004DB UMSDOS\_DOS\_SETUP const struct umsdos\_ioctl \* 0x000004DC UMSDOS\_RENAME\_DOS const struct umsdos\_ioctl \* // 

                          0x00005600 VT\_OPENQRY int \* 0x00005601 VT\_GETMODE struct vt\_mode \* 0x00005602 VT\_SETMODE const struct vt\_mode \* 0x00005603 VT\_GETSTATE struct vt\_stat \* 0x00005604 VT\_SENDSIG void 0x00005605 VT\_RELDISP int 0x00005606 VT\_ACTIVATE int 0x00005607 VT\_WAITACTIVE int 0x00005608 VT\_DISALLOCATE int 0x00005609 VT\_RESIZE const struct vt\_sizes \* 0x0000560A VT\_RESIZEX const struct vt\_consize \* // More arguments. Some ioctl’s take a pointer to a structure which contains additional pointers. These are documented here in alphabetical order. CDROMREADAUDIO takes an input pointer ’const struct cdrom\_read\_audio \*’. The ’buf’ field points to an output buffer of length ’nframes \* CD\_FRAMESIZE\_RAW’. CDROMREADCOOKED, CDROMREADMODE1, CDROMREADMODE2, and CDROMREADRAW take an input pointer ’const struct cdrom\_msf \*’. They use the same pointer as an output pointer to ’char \[\]’. The length varies by request. For CDROMREADMODE1, most drivers use ’CD\_FRAMESIZE’, but the Optics Storage driver uses ’OPT\_BLOCKSIZE’ instead (both have the numerical value 2048). CDROMREADCOOKED char \[CD\_FRAMESIZE\] CDROMREADMODE1 char \[CD\_FRAMESIZE or OPT\_BLOCKSIZE\] CDROMREADMODE2 char \[CD\_FRAMESIZE\_RAW0\] CDROMREADRAW char \[CD\_FRAMESIZE\_RAW\] EQL\_ENSLAVE, EQL\_EMANCIPATE, EQL\_GETSLAVECFG, EQL\_SETSLAVECFG, EQL\_GETMASTERCFG, and EQL\_SETMASTERCFG take a ’struct ifreq \*’. The ’ifr\_data’ field is a pointer to another structure as follows: EQL\_ENSLAVE const struct slaving\_request \* EQL\_EMANCIPATE const struct slaving\_request \* EQL\_GETSLAVECFG struct slave\_config \* // I-O EQL\_SETSLAVECFG const struct slave\_config \* EQL\_GETMASTERCFG struct master\_config \* EQL\_SETMASTERCFG const struct master\_config \* FDRAWCMD takes a ’struct floppy raw\_cmd \*’. If ’flags & FD\_RAW\_WRITE’ is non-zero, then ’data’ points to an input buffer of length ’length’. If ’flags & FD\_RAW\_READ’ is non-zero, then ’data’ points to an output buffer of length ’length’. GIO\_FONTX and PIO\_FONTX take a ’struct console\_font\_desc \*’ or a ’const struct console\_font\_desc \*’, respectively. ’chardata’ points to a buffer of ’char \[charcount\]’. This is an output buffer for GIO\_FONTX and an input buffer for PIO\_FONTX. GIO\_UNIMAP and PIO\_UNIMAP take a ’struct unimapdesc \*’ or a ’const struct unimapdesc \*’, respectively. ’entries’ points to a buffer of ’struct unipair \[entry\_ct\]’. This is an output buffer for GIO\_UNIMAP and an input buffer for PIO\_UNIMAP. KDADDIO, KDDELIO, KDDISABIO, and KDENABIO enable or disable access to I/O ports. They are essentially alternate interfaces to ’ioperm’. KDMAPDISP and KDUNMAPDISP enable or disable memory mappings or I/O port access. They are not implemented in the kernel. SCSI\_IOCTL\_PROBE\_HOST takes an input pointer ’const int \*’, which is a length. It uses the same pointer as an output pointer to a ’char \[\]’ buffer of this length. SIOCADDRT and SIOCDELRT take an input pointer whose type depends on the protocol: Most protocols const struct rtentry \* AX.25 const struct ax25\_route \* NET/ROM const struct nr\_route\_struct \* SIOCGIFCONF takes a ’struct ifconf \*’. The ’ifc\_buf’ field points to a buffer of length ’ifc\_len’ bytes, into which the kernel writes a list of type ’struct ifreq \[\]’. SIOCSIFHWADDR takes an input pointer whose type depends on the protocol: Most protocols const struct ifreq \* AX.25 const char \[AX25\_ADDR\_LEN\] TIOCLINUX takes a ’const char \*’. It uses this to distinguish several independent sub-cases. In the table below, ’N + foo’ means ’foo’ after an N-byte pad. ’struct selection’ is implicitly defined in ’drivers/char/selection.c’ TIOCLINUX-2 1 + const struct selection \* TIOCLINUX-3 void TIOCLINUX-4 void TIOCLINUX-5 4 + const struct { long \[8\]; } \* TIOCLINUX-6 char \* TIOCLINUX-7 char \* TIOCLINUX-10 1 + const char \* // Duplicate ioctls This list does not include ioctls in the range SIOCDEVPRIVATE and SIOCPROTOPRIVATE. 0x00000001 FDSETPRM FIBMAP 0x00000002 FDDEFPRM FIGETBSZ 0x00005382 CDROMAUDIOBUFSIZ SCSI\_IOCTL\_GET\_IDLUN 0x00005402 SNDCTL\_TMR\_START TCSETS 0x00005403 SNDCTL\_TMR\_STOP TCSETSW 0x00005404 SNDCTL\_TMR\_CONTINUE TCSETSF