-->
Page 785
<include/linux/soundcard.h>
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 |
Page 786
<include/linux/soundcard.h>
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 |
<include/linux/umsdos fs.h>
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 * |
<include/linux/vt.h>
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_WAI TACTI VE | int |
0x00005608 | VT_DISALLOCATE | int |
0x00005609 | VT_RESIZE | const struct vt_sizes * |
0x0000560A | VT_RESIZEX | const struct vt_consize * |
Page 787
MORE ARGUMENTS
Some ioctls take a pointer to a structure that 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 CDROM-READRAW 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 structifreq *. 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 nonzero, then data points to an input buffer of length length. If flags & FD RAW READ is nonzero, 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 subcases. In the following table, N + foo means foo after an N-byte pad. struct selection is implicitly defined in drivers/char/selection.c:
Page 788
TIOCLINUX-2 | 1 + const struct selection * |
TIOCLINUX-3 | void |
TIOCLINUX-4 | void |
TIOCLINUX-5 | 4 + const struct f long [8]; g * |
TIOCLINUX-6 | char * |
TIOCLINUX-7 | char * |
TIOCLINUX-10 | 1 + const char * |
DUPLICATE ICOTLS
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 |
Linux, 17 September 1995
iopermSets port input/output permissions
SYNOPSIS
#include <unistd.h> int ioperm(unsigned long from, unsigned long num,intturn_on);
DESCRIPTION
ioperm sets the port access permission bits for the process for num bytes starting from port address from to the value turn_on. The use of ioperm requires root privileges.
Only the first 0¥3ff I/O ports can be specified in this manner. For more ports, the iopl function must be used. Permissions are not inherited on fork, but on exec they are. This is useful for giving port access permissions to nonprivileged tasks.
RETURN VALUE
On success, 0 is returned. On error, _1 is returned and errno is set appropriately.
CONFORMS TO
ioperm is Linux specific.
SEE ALSO
iopl(2)
Linux, 21 January 1993
ioplChanges I/O privilege level