diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-10-09 00:00:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-10-09 00:00:47 +0000 |
commit | d6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch) | |
tree | e2be02f33984c48ec019c654051d27964e42c441 /Documentation/ioctl-number.txt | |
parent | 609d1e803baf519487233b765eb487f9ec227a18 (diff) |
Merge with 2.3.19.
Diffstat (limited to 'Documentation/ioctl-number.txt')
-rw-r--r-- | Documentation/ioctl-number.txt | 157 |
1 files changed, 98 insertions, 59 deletions
diff --git a/Documentation/ioctl-number.txt b/Documentation/ioctl-number.txt index ac2af6e3f..cc9e3704b 100644 --- a/Documentation/ioctl-number.txt +++ b/Documentation/ioctl-number.txt @@ -1,37 +1,41 @@ Ioctl Numbers -18 Feb 1998 -Michael Chastain +2 September 1999 +Michael Elizabeth Chastain <mec@shout.net> If you are adding new ioctl's to the kernel, you should use the _IO macros defined in <linux/ioctl.h>: _IO an ioctl with no parameters - _IOW an ioctl with write parameters (from user's point of view) - _IOR an ioctl with read parameters (from user's point of view) + _IOW an ioctl with write parameters (copy_from_user) + _IOR an ioctl with read parameters (copy_to_user) _IOWR an ioctl with both write and read parameters. -'Write' and 'read' are from the user's point of view. This is like the -system calls 'write' and 'read'. For example, a SET_FOO ioctl would be -_IOW, although the kernel would actually read data from user space; a -GET_FOO ioctl would be _IOR, although the kernel would actually write +'Write' and 'read' are from the user's point of view, just like the +system calls 'write' and 'read'. For example, a SET_FOO ioctl would +be _IOW, although the kernel would actually read data from user space; +a GET_FOO ioctl would be _IOR, although the kernel would actually write data to user space. The first argument to _IO, _IOW, _IOR, or _IOWR is an identifying letter -or number from the table below. If you are writing a driver for a new -device and need a letter, pick an unused letter. You can register the -letter by patching this file and submitting the patch to Linus Torvalds. -Or you can e-mail me at <mec@shout.net> and I'll register one for you. +or number from the table below. Because of the large number of drivers, +many drivers share a partial letter with other drivers. + +If you are writing a driver for a new device and need a letter, pick an +unused block with enough room for expansion: 32 to 256 ioctl commands. +You can register the block by patching this file and submitting the +patch to Linus Torvalds. Or you can e-mail me at <mec@shout.net> and +I'll register one for you. The second argument to _IO, _IOW, _IOR, or _IOWR is a sequence number to distinguish ioctls from each other. The third argument is the size of the structure going into the kernel or coming out of the kernel. -Some devices use their major number as the identifier; this is not -recommended. Some devices are even more irregular and don't follow -the convention at all. +Some devices use their major number as the identifier; this is OK, as +long as it is unique. Some devices are irregular and don't follow any +convention at all. -Following the convention is good because: +Following this convention is good because: (1) Keeping the ioctl's globally unique helps error checking: if a program calls an ioctl on the wrong device, it will get an @@ -44,89 +48,124 @@ Following the convention is good because: numbers are unique. (4) People looking for ioctls can grep for them more easily when - the convention is used to define the ioctl numbers. + this convention is used to define the ioctl numbers. (5) When following the convention, the driver code can use generic - code to call verify_area to validate parameters. + code to copy the parameters between user and kernel space. -This table lists ioctls visible from user land for Linux/i386. It is -current to Linux 2.1.15. +This table lists ioctls visible from user land for Linux/i386. It contains +most drivers up to 2.3.14, but I know I am missing some. Code Seq# Include File Comments ======================================================== -0x00 01-02 linux/fs.h conflict! -0x00 01-04 scsi/scsi_ioctl.h conflict! +0x00 00-1F linux/fs.h conflict! +0x00 00-1F scsi/scsi_ioctl.h conflict! +0x00 00-1F linux/fb.h conflict! +0x00 00-1F linux/wavefront.h conflict! 0x02 all linux/fd.h 0x03 all linux/hdreg.h 0x04 all linux/umsdos_fs.h 0x06 all linux/lp.h 0x09 all linux/md.h 0x12 all linux/fs.h -0x20 all linux/cm206.h + linux/blkpg.h +0x20 all drivers/cdrom/cm206.h 0x22 all scsi/sg.h -'A' all linux/apm_bios.h +'1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl + <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/> +'8' all SNP8023 advanced NIC card + <mailto:mcr@solidum.com> +'A' 00-1F linux/apm_bios.h +'B' C0-FF advanced bbus + <mailto:maassen@uni-freiburg.de> 'C' all linux/soundcard.h 'F' all linux/fb.h 'I' all linux/isdn.h +'J' 00-1F drivers/scsi/gdth_ioctl.h 'K' all linux/kd.h -'L' all linux/loop.h -'M' all linux/soundcard.h +'L' 00-1F linux/loop.h +'L' E0-FF linux/ppdd.h encrypted disk device driver + <http://linux01.gwdg.de/~alatham/ppdd.html> +'M' all linux/soundcard.h conflict! +'M' 00-1F linux/isicom.h conflict! 'P' all linux/soundcard.h 'Q' all linux/soundcard.h -'R' all linux/random.h -'S' 00-7F linux/cdrom.h -'S' 80-81 scsi/scsi_ioctl.h -'S' 82-FF scsi/scsi.h +'R' 00-1F linux/random.h +'S' all linux/cdrom.h conflict! +'S' 80-81 scsi/scsi_ioctl.h conflict! +'S' 82-FF scsi/scsi.h conflict! 'T' all linux/soundcard.h conflict! 'T' all asm-i386/ioctls.h conflict! +'U' all linux/drivers/usb/usb.h 'V' all linux/vt.h -'W' 00-1F linux/router.h conflict [Please reallocate] -'W' 00-1F linux/watchdog.h -'W' 20-27 linux/octal-relay.h in development -'W' 28-2F linux/iso16-relay.h in development +'W' 00-1F linux/watchdog.h conflict! +'W' 00-1F linux/wanrouter.h conflict! 'Y' all linux/cyclades.h -'a' all various, see http://lrcwww.epfl.ch/linux-atm/magic.html -'b' 00-FF bit3 vme host bridge in development: +'a' all ATM on linux + <http://lrcwww.epfl.ch/linux-atm/magic.html> +'b' 00-FF bit3 vme host bridge <mailto:natalia@nikhefk.nikhef.nl> -'c' all linux/comstats.h -'f' all linux/ext2_fs.h +'c' 00-7F linux/comstats.h conflict! +'c' 00-7F linux/coda.h conflict! +'d' 00-1F linux/devfs_fs.h conflict! +'d' 00-DF linux/video_decoder.h conflict! +'d' F0-FF linux/digi1.h +'e' all linux/digi1.h conflict! +'e' 00-1F linux/video_encoder.h conflict! +'e' 00-1F net/irda/irtty.h conflict! +'f' 00-1F linux/ext2_fs.h +'i' 00-3F linux/i2o.h 'j' 00-3F linux/joystick.h -'k' all asm-sparc/kbio.h, asm-sparc64/kbio.h -'l' 00-3F linux/tcfs_fs.h in development: +'k' all asm-sparc/kbio.h + asm-sparc64/kbio.h +'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system <http://mikonos.dia.unisa.it/tcfs> 'm' all linux/mtio.h conflict! 'm' all linux/soundcard.h conflict! +'m' all linux/synclink.h conflict! +'m' 00-1F net/irda/irmod.h conflict! 'n' all linux/ncp_fs.h 'p' 00-3F linux/mc146818rtc.h 'p' 40-7F linux/nvram.h -'p' 80-9F user-space parport in development: - <tim@cyberelk.demon.co.uk> -'r' all linux/msdos_fs.h +'p' 80-9F user-space parport + <mailto:tim@cyberelk.demon.co.uk> +'q' 00-1F linux/videotext.h conflict! +'q' 80-FF Internet PhoneJACK, Internet LineJACK + <http://www.quicknet.net> +'r' 00-1F linux/msdos_fs.h 's' all linux/cdk.h 't' 00-7F linux/if_ppp.h 't' 80-8F linux/isdn_ppp.h -'u' all linux/smb_fs.h -'v' all linux/ext2_fs.h -'w' all CERN SCI driver in development -'z' 00-3F CAN bus card in development: +'u' 00-1F linux/smb_fs.h +'v' 00-1F linux/ext2_fs.h conflict! +'v' all linux/videodev.h conflict! +'w' all CERN SCI driver +'z' 00-3F CAN bus card <mailto:hdstich@connectu.ulm.circular.de> -'z' 40-7F CAN bas card in development: +'z' 40-7F CAN bus card <mailto:oe@port.de> -0x89 00-0F asm-i386/sockios.h -0x89 10-DF linux/sockios.h +0x80 00-1F linux/fb.h +0x89 00-06 asm-i386/sockios.h +0x89 0B-DF linux/sockios.h 0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range 0x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range 0x8B all linux/wireless.h -0x8C 00-3F WiNRADiO driver in development: +0x8C 00-3F WiNRADiO driver <http://www.proximity.com.au/~brian/winradio/> -0x90 00 linux/sbpcd.h +0x90 00 drivers/cdrom/sbpcd.h 0x93 60-7F linux/auto_fs.h -0x99 00-0F 537-Addinboard driver in development: - <mailto:b.kohl@ipn-b.comlink.apc.org> -0xA0 all Small Device Project in development: - <mailto:khollis@northwest.com> +0x99 00-0F 537-Addinboard driver + <mailto:buk@buks.ipn.de> +0xA0 all linux/sdp/sdp.h Industrial Device Project + <mailto:kenji@bitgate.com> +0xA3 00-1F Philips SAA7146 dirver in development: + <mailto:Andreas.Beckmann@hamburg.sc.philips.com> 0xA3 80-8F Port ACL in development: <mailto:tlewis@mindspring.com> -0xA3 90-9F DoubleTalk driver in development: - <mailto:jrv@vanzandt.mv.com> -0xAB 00-06 Network block device +0xA3 90-9F linux/dtlk.h +0xAB 00-1F linux/nbd.h +0xAC 00-1F linux/raw.h +0xAD 00 Netfilter device in development: + <mailto:rusty@rustcorp.com.au> +0xB0 all RATIO devices in development: + <mailto:vgo@ratio.de> |