Manual Reference Pages  - IOCTL_LIST (2)

NAME

ioctl_list - list of ioctl calls in Linux/i386 kernel

CONTENTS

Description
See Also
Colophon

DESCRIPTION

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.

Some ioctls take more arguments or return more values than a single structure. These are marked // MORE and documented further in a separate section.

This list is very incomplete.

    ioctl structure

Ioctl command values are 32-bit constants. In principle these constants are completely arbitrary, but people have tried to build some structure into them.

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 argument 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.

RETURN VALUE

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.

// <include/asm-i386/socket.h>

0x00008901FIOSETOWNconst int *
0x00008902SIOCSPGRPconst int *
0x00008903FIOGETOWNint *
0x00008904SIOCGPGRPint *
0x00008905SIOCATMARint *
0x00008906SIOCGSTAMPtimeval *

// <include/asm-i386/termios.h>

0x00005401TCGETSstruct termios * 
0x00005402TCSETSconst struct termios * 
0x00005403TCSETSWconst struct termios * 
0x00005404TCSETSFconst struct termios * 
0x00005405TCGETAstruct termio * 
0x00005406TCSETAconst struct termio * 
0x00005407TCSETAWconst struct termio * 
0x00005408TCSETAFconst struct termio * 
0x00005409TCSBRKint 
0x0000540ATCXONCint 
0x0000540BTCFLSHint 
0x0000540CTIOCEXCLvoid 
0x0000540DTIOCNXCLvoid 
0x0000540ETIOCSCTTYint 
0x0000540FTIOCGPGRPpid_t * 
0x00005410TIOCSPGRPconst pid_t * 
0x00005411TIOCOUTQint * 
0x00005412TIOCSTIconst char * 
0x00005413TIOCGWINSZstruct winsize * 
0x00005414TIOCSWINSZconst struct winsize * 
0x00005415TIOCMGETint * 
0x00005416TIOCMBISconst int * 
0x00005417TIOCMBICconst int * 
0x00005418TIOCMSETconst int * 
0x00005419TIOCGSOFTCARint * 
0x0000541ATIOCSSOFTCARconst int * 
0x0000541BFIONREADint * 
0x0000541BTIOCINQint * 
0x0000541CTIOCLINUXconst char *// MORE
0x0000541DTIOCCONSvoid 
0x0000541ETIOCGSERIALstruct serial_struct * 
0x0000541FTIOCSSERIALconst struct serial_struct * 
0x00005420TIOCPKTconst int * 
0x00005421FIONBIOconst int * 
0x00005422TIOCNOTTYvoid 
0x00005423TIOCSETDconst int * 
0x00005424TIOCGETDint * 
0x00005425TCSBRKPint 
0x00005426TIOCTTYGSTRUCTstruct tty_struct * 
0x00005450FIONCLEXvoid 
0x00005451FIOCLEXvoid 
0x00005452FIOASYNCconst int * 
0x00005453TIOCSERCONFIGvoid 
0x00005454TIOCSERGWILDint * 
0x00005455TIOCSERSWILDconst int * 
0x00005456TIOCGLCKTRMIOSstruct termios * 
0x00005457TIOCSLCKTRMIOSconst struct termios * 
0x00005458TIOCSERGSTRUCTstruct async_struct * 
0x00005459TIOCSERGETLSRint * 

0x0000545ATIOCSERGETMULTIstruct serial_multiport_struct *
0x0000545BTIOCSERSETMULTIconst struct serial_multiport_struct *

// <include/linux/ax25.h>

0x000089E0SIOCAX25GETUIDconst struct sockaddr_ax25 * 
0x000089E1SIOCAX25ADDUIDconst struct sockaddr_ax25 * 
0x000089E2SIOCAX25DELUIDconst struct sockaddr_ax25 * 
0x000089E3SIOCAX25NOUIDconst int * 
0x000089E4SIOCAX25DIGCTLconst int * 
0x000089E5SIOCAX25GETPARMSstruct ax25_parms_struct *// I-O

0x000089E6SIOCAX25SETPARMSconst struct ax25_parms_struct *

// <include/linux/cdk.h>

0x00007314STL_BINTRvoid
0x00007315STL_BSTARTvoid
0x00007316STL_BSTOPvoid
0x00007317STL_BRESETvoid

// <include/linux/cdrom.h>

0x00005301CDROMPAUSEvoid
0x00005302CDROMRESUMEvoid
0x00005303CDROMPLAYMSFconst struct cdrom_msf *
0x00005304CDROMPLAYTRKINDconst struct cdrom_ti *
0x00005305CDROMREADTOCHDRstruct cdrom_tochdr *

0x00005306CDROMREADTOCENTRYstruct cdrom_tocentry *// I-O

0x00005307CDROMSTOPvoid 
0x00005308CDROMSTARTvoid 
0x00005309CDROMEJECTvoid 
0x0000530ACDROMVOLCTRLconst struct cdrom_volctrl * 
0x0000530BCDROMSUBCHNLstruct cdrom_subchnl *// I-O
0x0000530CCDROMREADMODE2const struct cdrom_msf *// MORE
0x0000530DCDROMREADMODE1const struct cdrom_msf *// MORE
0x0000530ECDROMREADAUDIOconst struct cdrom_read_audio *// MORE
0x0000530FCDROMEJECT_SWint 

0x00005310CDROMMULTISESSIONstruct cdrom_multisession *// I-O

0x00005311CDROM_GET_UPCstruct { char [8]; } * 
0x00005312CDROMRESETvoid 
0x00005313CDROMVOLREADstruct cdrom_volctrl * 
0x00005314CDROMREADRAWconst struct cdrom_msf *// MORE
0x00005315CDROMREADCOOKEDconst struct cdrom_msf *// MORE
0x00005316CDROMSEEKconst struct cdrom_msf * 

// <include/linux/cm206.h>

0x00002000CM206CTL_GET_STATint
0x00002001CM206CTL_GET_LAST_STATint

// <include/linux/cyclades.h>

0x00435901CYGETMONstruct cyclades_monitor *
0x00435902CYGETTHRESHint *
0x00435903CYSETTHRESHint
0x00435904CYGETDEFTHRESHint *
0x00435905CYSETDEFTHRESHint
0x00435906CYGETTIMEOUTint *
0x00435907CYSETTIMEOUTint
0x00435908CYGETDEFTIMEOUTint *
0x00435909CYSETDEFTIMEOUTint

// <include/linux/ext2_fs.h>

0x80046601EXT2_IOC_GETFLAGSint *
0x40046602EXT2_IOC_SETFLAGSconst int *
0x80047601EXT2_IOC_GETVERSIONint *
0x40047602EXT2_IOC_SETVERSIONconst int *

// <include/linux/fd.h>

0x00000000FDCLRPRMvoid
0x00000001FDSETPRMconst struct floppy_struct *
0x00000002FDDEFPRMconst struct floppy_struct *
0x00000003FDGETPRMstruct floppy_struct *
0x00000004FDMSGONvoid
0x00000005FDMSGOFFvoid
0x00000006FDFMTBEGvoid
0x00000007FDFMTTRKconst struct format_descr *
0x00000008FDFMTENDvoid
0x0000000AFDSETEMSGTRESHint
0x0000000BFDFLUSHvoid
0x0000000CFDSETMAXERRSconst struct floppy_max_errors *
0x0000000EFDGETMAXERRSstruct floppy_max_errors *
0x00000010FDGETDRVTYPstruct { char [16]; } *
0x00000014FDSETDRVPRMconst struct floppy_drive_params *
0x00000015FDGETDRVPRMstruct floppy_drive_params *
0x00000016FDGETDRVSTATstruct floppy_drive_struct *
0x00000017FDPOLLDRVSTATstruct floppy_drive_struct *
0x00000018FDRESETint
0x00000019FDGETFDCSTATstruct floppy_fdc_state *
0x0000001BFDWERRORCLRvoid
0x0000001CFDWERRORGETstruct floppy_write_errors *

0x0000001EFDRAWCMDstruct floppy_raw_cmd *// MORE // I-O
0x00000028FDTWADDLEvoid 

// <include/linux/fs.h>

0x0000125DBLKROSETconst int * 
0x0000125EBLKROGETint * 
0x0000125FBLKRRPARTvoid 
0x00001260BLKGETSIZEunsigned long * 
0x00001261BLKFLSBUFvoid 
0x00001262BLKRASETint 
0x00001263BLKRAGETint * 
0x00000001FIBMAPint *// I-O
0x00000002FIGETBSZint * 

// <include/linux/hdreg.h>

0x00000301HDIO_GETGEOstruct hd_geometry * 
0x00000302HDIO_GET_UNMASKINTRint * 
0x00000304HDIO_GET_MULTCOUNTint * 
0x00000307HDIO_GET_IDENTITYstruct hd_driveid * 
0x00000308HDIO_GET_KEEPSETTINGSint * 
0x00000309HDIO_GET_CHIPSETint * 
0x0000030AHDIO_GET_NOWERRint * 
0x0000030BHDIO_GET_DMAint * 
0x0000031FHDIO_DRIVE_CMDint *// I-O
0x00000321HDIO_SET_MULTCOUNTint 
0x00000322HDIO_SET_UNMASKINTRint 
0x00000323HDIO_SET_KEEPSETTINGSint 
0x00000324HDIO_SET_CHIPSETint 
0x00000325HDIO_SET_NOWERRint 
0x00000326HDIO_SET_DMAint 

// <include/linux/if_eql.h>

0x000089F0EQL_ENSLAVEstruct ifreq *// MORE // I-O
0x000089F1EQL_EMANCIPATEstruct ifreq *// MORE // I-O
0x000089F2EQL_GETSLAVECFGstruct ifreq *// MORE // I-O
0x000089F3EQL_SETSLAVECFGstruct ifreq *// MORE // I-O
0x000089F4EQL_GETMASTRCFGstruct ifreq *// MORE // I-O
0x000089F5EQL_SETMASTRCFGstruct ifreq *// MORE // I-O

// <include/linux/if_plip.h>

0x000089F0SIOCDEVPLIPstruct ifreq *// I-O

// <include/linux/if_ppp.h>

0x00005490PPPIOCGFLAGSint *
0x00005491PPPIOCSFLAGSconst int *
0x00005492PPPIOCGASYNCMAPint *
0x00005493PPPIOCSASYNCMAPconst int *
0x00005494PPPIOCGUNITint *
0x00005495PPPIOCSINPSIGconst int *
0x00005497PPPIOCSDEBUGconst int *
0x00005498PPPIOCGDEBUGint *
0x00005499PPPIOCGSTATstruct ppp_stats *
0x0000549APPPIOCGTIMEstruct ppp_ddinfo *
0x0000549BPPPIOCGXASYNCMAPstruct { int [8]; } *
0x0000549CPPPIOCSXASYNCMAPconst struct { int [8]; } *
0x0000549DPPPIOCSMRUconst int *
0x0000549EPPPIOCRASYNCMAPconst int *
0x0000549FPPPIOCSMAXCIDconst int *

// <include/linux/ipx.h>

0x000089E0SIOCAIPXITFCRTconst char *
0x000089E1SIOCAIPXPRISLTconst char *
0x000089E2SIOCIPXCFGDATAstruct ipx_config_data *

// <include/linux/kd.h>

0x00004B60GIO_FONTstruct { char [8192]; } *
0x00004B61PIO_FONTconst struct { char [8192]; } *

0x00004B6BGIO_FONTXstruct console_font_desc *// MORE // I-O
0x00004B6CPIO_FONTXconst struct console_font_desc *//MORE

0x00004B70GIO_CMAPstruct { char [48]; } *
0x00004B71PIO_CMAPconst struct { char [48]; }

0x00004B2FKIOCSOUNDint 
0x00004B30KDMKTONEint 
0x00004B31KDGETLEDchar * 
0x00004B32KDSETLEDint 
0x00004B33KDGKBTYPEchar * 
0x00004B34KDADDIOint// MORE
0x00004B35KDDELIOint// MORE
0x00004B36KDENABIOvoid// MORE
0x00004B37KDDISABIOvoid// MORE
0x00004B3AKDSETMODEint 
0x00004B3BKDGETMODEint * 
0x00004B3CKDMAPDISPvoid// MORE
0x00004B3DKDUNMAPDISPvoid// MORE
0x00004B40GIO_SCRNMAPstruct { char [E_TABSZ]; } * 

0x00004B41PIO_SCRNMAPconst struct { char [E_TABSZ]; } *
0x00004B69GIO_UNISCRNMAPstruct { short [E_TABSZ]; } *
0x00004B6APIO_UNISCRNMAPconst struct { short [E_TABSZ]; } *

0x00004B66GIO_UNIMAPstruct unimapdesc *// MORE // I-O
0x00004B67PIO_UNIMAPconst struct unimapdesc *// MORE
0x00004B68PIO_UNIMAPCLRconst struct unimapinit * 
0x00004B44KDGKBMODEint * 
0x00004B45KDSKBMODEint 
0x00004B62KDGKBMETAint * 
0x00004B63KDSKBMETAint 
0x00004B64KDGKBLEDint * 
0x00004B65KDSKBLEDint 
0x00004B46KDGKBENTstruct kbentry *// I-O
0x00004B47KDSKBENTconst struct kbentry * 
0x00004B48KDGKBSENTstruct kbsentry *// I-O
0x00004B49KDSKBSENTconst struct kbsentry * 
0x00004B4AKDGKBDIACRstruct kbdiacrs * 
0x00004B4BKDSKBDIACRconst struct kbdiacrs * 
0x00004B4CKDGETKEYCODEstruct kbkeycode *// I-O
0x00004B4DKDSETKEYCODEconst struct kbkeycode * 
0x00004B4EKDSIGACCEPTint 

// <include/linux/lp.h>

0x00000601LPCHARint
0x00000602LPTIMEint
0x00000604LPABORTint
0x00000605LPSETIRQint
0x00000606LPGETIRQint *
0x00000608LPWAITint
0x00000609LPCAREFULint
0x0000060ALPABORTOPENint
0x0000060BLPGETSTATUSint *
0x0000060CLPRESETvoid
0x0000060DLPGETSTATSstruct lp_stats *

// <include/linux/mroute.h>

0x000089E0SIOCGETVIFCNTstruct sioc_vif_req *// I-O
0x000089E1SIOCGETSGCNTstruct sioc_sg_req *// I-O

// <include/linux/mtio.h>

0x40086D01MTIOCTOPconst struct mtop *
0x801C6D02MTIOCGETstruct mtget *
0x80046D03MTIOCPOSstruct mtpos *
0x80206D04MTIOCGETCONFIGstruct mtconfiginfo *
0x40206D05MTIOCSETCONFIGconst struct mtconfiginfo *

// <include/linux/netrom.h>

0x000089E0SIOCNRGETPARMSstruct nr_parms_struct *// I-O
0x000089E1SIOCNRSETPARMSconst struct nr_parms_struct * 
0x000089E2SIOCNRDECOBSvoid 
0x000089E3SIOCNRRTCTLconst int * 

// <include/linux/sbpcd.h>

0x00009000DDIOCSDBGconst int *
0x00005382CDROMAUDIOBUFSIZint

// <include/linux/scc.h>

0x00005470TIOCSCCINIvoid 
0x00005471TIOCCHANINIconst struct scc_modem * 
0x00005472TIOCGKISSstruct ioctl_command *// I-O
0x00005473TIOCSKISSconst struct ioctl_command * 
0x00005474TIOCSCCSTATstruct scc_stat * 

// <include/linux/scsi.h>

0x00005382SCSI_IOCTL_GET_IDLUNstruct { int [2]; } *
0x00005383SCSI_IOCTL_TAGGED_ENABLEvoid
0x00005384SCSI_IOCTL_TAGGED_DISABLEvoid

0x00005385SCSI_IOCTL_PROBE_HOSTconst int *// MORE

// <include/linux/smb_fs.h>

0x80027501SMB_IOC_GETMOUNTUIDuid_t *

// <include/linux/sockios.h>

0x0000890BSIOCADDRTconst struct rtentry *// MORE
0x0000890CSIOCDELRTconst struct rtentry *// MORE
0x00008910SIOCGIFNAMEchar [] 
0x00008911SIOCSIFLINKvoid 
0x00008912SIOCGIFCONFstruct ifconf *// MORE // I-O
0x00008913SIOCGIFFLAGSstruct ifreq *// I-O
0x00008914SIOCSIFFLAGSconst struct ifreq * 
0x00008915SIOCGIFADDRstruct ifreq *// I-O
0x00008916SIOCSIFADDRconst struct ifreq * 
0x00008917SIOCGIFDSTADDRstruct ifreq *// I-O
0x00008918SIOCSIFDSTADDRconst struct ifreq * 
0x00008919SIOCGIFBRDADDRstruct ifreq *// I-O
0x0000891ASIOCSIFBRDADDRconst struct ifreq * 
0x0000891BSIOCGIFNETMASKstruct ifreq *// I-O
0x0000891CSIOCSIFNETMASKconst struct ifreq * 
0x0000891DSIOCGIFMETRICstruct ifreq *// I-O
0x0000891ESIOCSIFMETRICconst struct ifreq * 
0x0000891FSIOCGIFMEMstruct ifreq *// I-O
0x00008920SIOCSIFMEMconst struct ifreq * 
0x00008921SIOCGIFMTUstruct ifreq *// I-O
0x00008922SIOCSIFMTUconst struct ifreq * 

0x00008923OLD_SIOCGIFHWADDRstruct ifreq *// I-O
0x00008924SIOCSIFHWADDRconst struct ifreq *// MORE
0x00008925SIOCGIFENCAPint * 
0x00008926SIOCSIFENCAPconst int * 
0x00008927SIOCGIFHWADDRstruct ifreq *// I-O
0x00008929SIOCGIFSLAVEvoid 
0x00008930SIOCSIFSLAVEvoid 
0x00008931SIOCADDMULTIconst struct ifreq * 
0x00008932SIOCDELMULTIconst struct ifreq * 
0x00008940SIOCADDRTOLDvoid 
0x00008941SIOCDELRTOLDvoid 
0x00008950SIOCDARPconst struct arpreq * 
0x00008951SIOCGARPstruct arpreq *// I-O
0x00008952SIOCSARPconst struct arpreq * 
0x00008960SIOCDRARPconst struct arpreq * 
0x00008961SIOCGRARPstruct arpreq *// I-O
0x00008962SIOCSRARPconst struct arpreq * 
0x00008970SIOCGIFMAPstruct ifreq *// I-O
0x00008971SIOCSIFMAPconst struct ifreq * 

// <include/linux/soundcard.h>

0x00005100SNDCTL_SEQ_RESETvoid
0x00005101SNDCTL_SEQ_SYNCvoid

0xC08C5102SNDCTL_SYNTH_INFOstruct synth_info *// I-O
0xC0045103SNDCTL_SEQ_CTRLRATEint *// I-O
0x80045104SNDCTL_SEQ_GETOUTCOUNTint * 
0x80045105SNDCTL_SEQ_GETINCOUNTint * 
0x40045106SNDCTL_SEQ_PERCMODEvoid 

0x40285107SNDCTL_FM_LOAD_INSTRconst struct sbi_instrument *

0x40045108SNDCTL_SEQ_TESTMIDIconst int * 
0x40045109SNDCTL_SEQ_RESETSAMPLESconst int * 
0x8004510ASNDCTL_SEQ_NRSYNTHSint * 
0x8004510BSNDCTL_SEQ_NRMIDISint * 
0xC074510CSNDCTL_MIDI_INFOstruct midi_info *// I-O
0x4004510DSNDCTL_SEQ_THRESHOLDconst int * 
0xC004510ESNDCTL_SYNTH_MEMAVLint *// I-O
0x4004510FSNDCTL_FM_4OP_ENABLEconst int * 
0xCFB85110SNDCTL_PMGR_ACCESSstruct patmgr_info *// I-O
0x00005111SNDCTL_SEQ_PANICvoid 

0x40085112SNDCTL_SEQ_OUTOFBANDconst struct seq_event_rec *

0xC0045401SNDCTL_TMR_TIMEBASEint *// I-O
0x00005402SNDCTL_TMR_STARTvoid 
0x00005403SNDCTL_TMR_STOPvoid 
0x00005404SNDCTL_TMR_CONTINUEvoid 
0xC0045405SNDCTL_TMR_TEMPOint *// I-O
0xC0045406SNDCTL_TMR_SOURCEint *// I-O
0x40045407SNDCTL_TMR_METRONOMEconst int * 
0x40045408SNDCTL_TMR_SELECTint *// I-O
0xCFB85001SNDCTL_PMGR_IFACEstruct patmgr_info *// I-O
0xC0046D00SNDCTL_MIDI_PRETIMEint *// I-O
0xC0046D01SNDCTL_MIDI_MPUMODEconst int * 

0xC0216D02SNDCTL_MIDI_MPUCMDstruct mpu_command_rec *// I-O

0x00005000SNDCTL_DSP_RESETvoid 
0x00005001SNDCTL_DSP_SYNCvoid 
0xC0045002SNDCTL_DSP_SPEEDint *// I-O
0xC0045003SNDCTL_DSP_STEREOint *// I-O
0xC0045004SNDCTL_DSP_GETBLKSIZEint *// I-O
0xC0045006SOUND_PCM_WRITE_CHANNELSint *// I-O
0xC0045007SOUND_PCM_WRITE_FILTERint *// I-O
0x00005008SNDCTL_DSP_POSTvoid 
0xC0045009SNDCTL_DSP_SUBDIVIDEint *// I-O
0xC004500ASNDCTL_DSP_SETFRAGMENTint *// I-O
0x8004500BSNDCTL_DSP_GETFMTSint * 
0xC0045005SNDCTL_DSP_SETFMTint *// I-O

0x800C500CSNDCTL_DSP_GETOSPACEstruct audio_buf_info *
0x800C500DSNDCTL_DSP_GETISPACEstruct audio_buf_info *
0x0000500ESNDCTL_DSP_NONBLOCKvoid
0x80045002SOUND_PCM_READ_RATEint *
0x80045006SOUND_PCM_READ_CHANNELSint *
0x80045005SOUND_PCM_READ_BITSint *
0x80045007SOUND_PCM_READ_FILTERint *
0x00004300SNDCTL_COPR_RESETvoid
0xCFB04301SNDCTL_COPR_LOADconst struct copr_buffer *

0xC0144302SNDCTL_COPR_RDATAstruct copr_debug_buf *// I-O
0xC0144303SNDCTL_COPR_RCODEstruct copr_debug_buf *// I-O

0x40144304SNDCTL_COPR_WDATAconst struct copr_debug_buf *
0x40144305SNDCTL_COPR_WCODEconst struct copr_debug_buf *

0xC0144306SNDCTL_COPR_RUNstruct copr_debug_buf *// I-O
0xC0144307SNDCTL_COPR_HALTstruct copr_debug_buf *// I-O

0x4FA44308SNDCTL_COPR_SENDMSGconst struct copr_msg *
0x8FA44309SNDCTL_COPR_RCVMSGstruct copr_msg *
0x80044D00SOUND_MIXER_READ_VOLUMEint *
0x80044D01SOUND_MIXER_READ_BASSint *
0x80044D02SOUND_MIXER_READ_TREBLEint *
0x80044D03SOUND_MIXER_READ_SYNTHint *
0x80044D04SOUND_MIXER_READ_PCMint *
0x80044D05SOUND_MIXER_READ_SPEAKERint *
0x80044D06SOUND_MIXER_READ_LINEint *
0x80044D07SOUND_MIXER_READ_MICint *
0x80044D08SOUND_MIXER_READ_CDint *
0x80044D09SOUND_MIXER_READ_IMIXint *
0x80044D0ASOUND_MIXER_READ_ALTPCMint *
0x80044D0BSOUND_MIXER_READ_RECLEVint *
0x80044D0CSOUND_MIXER_READ_IGAINint *
0x80044D0DSOUND_MIXER_READ_OGAINint *
0x80044D0ESOUND_MIXER_READ_LINE1int *
0x80044D0FSOUND_MIXER_READ_LINE2int *
0x80044D10SOUND_MIXER_READ_LINE3int *
0x80044D1CSOUND_MIXER_READ_MUTEint *
0x80044D1DSOUND_MIXER_READ_ENHANCEint *
0x80044D1ESOUND_MIXER_READ_LOUDint *
0x80044DFFSOUND_MIXER_READ_RECSRCint *
0x80044DFESOUND_MIXER_READ_DEVMASKint *
0x80044DFDSOUND_MIXER_READ_RECMASKint *
0x80044DFBSOUND_MIXER_READ_STEREODEVSint *
0x80044DFCSOUND_MIXER_READ_CAPSint *

0xC0044D00SOUND_MIXER_WRITE_VOLUMEint *// I-O
0xC0044D01SOUND_MIXER_WRITE_BASSint *// I-O
0xC0044D02SOUND_MIXER_WRITE_TREBLEint *// I-O
0xC0044D03SOUND_MIXER_WRITE_SYNTHint *// I-O
0xC0044D04SOUND_MIXER_WRITE_PCMint *// I-O
0xC0044D05SOUND_MIXER_WRITE_SPEAKERint *// I-O
0xC0044D06SOUND_MIXER_WRITE_LINEint *// I-O
0xC0044D07SOUND_MIXER_WRITE_MICint *// I-O
0xC0044D08SOUND_MIXER_WRITE_CDint *// I-O
0xC0044D09SOUND_MIXER_WRITE_IMIXint *// I-O
0xC0044D0ASOUND_MIXER_WRITE_ALTPCMint *// I-O
0xC0044D0BSOUND_MIXER_WRITE_RECLEVint *// I-O
0xC0044D0CSOUND_MIXER_WRITE_IGAINint *// I-O
0xC0044D0DSOUND_MIXER_WRITE_OGAINint *// I-O
0xC0044D0ESOUND_MIXER_WRITE_LINE1int *// I-O
0xC0044D0FSOUND_MIXER_WRITE_LINE2int *// I-O
0xC0044D10SOUND_MIXER_WRITE_LINE3int *// I-O
0xC0044D1CSOUND_MIXER_WRITE_MUTEint *// I-O
0xC0044D1DSOUND_MIXER_WRITE_ENHANCEint *// I-O
0xC0044D1ESOUND_MIXER_WRITE_LOUDint *// I-O
0xC0044DFFSOUND_MIXER_WRITE_RECSRCint *// I-O

// <include/linux/umsdos_fs.h>

0x000004D2UMSDOS_READDIR_DOSstruct umsdos_ioctl *// I-O
0x000004D3UMSDOS_UNLINK_DOSconst struct umsdos_ioctl * 
0x000004D4UMSDOS_RMDIR_DOSconst struct umsdos_ioctl * 
0x000004D5UMSDOS_STAT_DOSstruct umsdos_ioctl *// I-O
0x000004D6UMSDOS_CREAT_EMDconst struct umsdos_ioctl * 
0x000004D7UMSDOS_UNLINK_EMDconst struct umsdos_ioctl * 
0x000004D8UMSDOS_READDIR_EMDstruct umsdos_ioctl *// I-O
0x000004D9UMSDOS_GETVERSIONstruct umsdos_ioctl * 
0x000004DAUMSDOS_INIT_EMDvoid 
0x000004DBUMSDOS_DOS_SETUPconst struct umsdos_ioctl * 
0x000004DCUMSDOS_RENAME_DOSconst struct umsdos_ioctl * 

// <include/linux/vt.h>

0x00005600VT_OPENQRYint *
0x00005601VT_GETMODEstruct vt_mode *
0x00005602VT_SETMODEconst struct vt_mode *
0x00005603VT_GETSTATEstruct vt_stat *
0x00005604VT_SENDSIGvoid
0x00005605VT_RELDISPint
0x00005606VT_ACTIVATEint
0x00005607VT_WAITACTIVEint
0x00005608VT_DISALLOCATEint
0x00005609VT_RESIZEconst struct vt_sizes *
0x0000560AVT_RESIZEXconst 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 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 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.

0x00000001FDSETPRMFIBMAP
0x00000002FDDEFPRMFIGETBSZ
0x00005382CDROMAUDIOBUFSIZSCSI_IOCTL_GET_IDLUN
0x00005402SNDCTL_TMR_STARTTCSETS
0x00005403SNDCTL_TMR_STOPTCSETSW
0x00005404SNDCTL_TMR_CONTINUETCSETSF

SEE ALSO

ioctl(2)

COLOPHON

This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.


Linux IOCTL_LIST (2) 2007-12-29
blog comments powered by Disqus