1IOCTL_LIST(2)              Linux Programmer's Manual             IOCTL_LIST(2)
2
3
4

NAME

6       ioctl_list - list of ioctl calls in Linux/i386 kernel
7

DESCRIPTION

9       This  is  Ioctl List 1.3.27, a list of ioctl calls in Linux/i386 kernel
10       1.3.27.  It contains 421  ioctls  from  </usr/include/{asm,linux}/*.h>.
11       For  each  ioctl,  its numerical value, its name, and its argument type
12       are given.
13
14       An argument type of const struct foo * means the argument is  input  to
15       the  kernel.   struct  foo * means the kernel outputs the argument.  If
16       the kernel uses the argument for both input and output, this is  marked
17       with // I-O.
18
19       Some  ioctls  take  more  arguments or return more values than a single
20       structure.  These are marked // MORE and documented further in a  sepa‐
21       rate section.
22
23       This list is very incomplete.
24
25   ioctl structure
26       Ioctl  command  values  are  32-bit constants.  In principle these con‐
27       stants are completely arbitrary, but people have tried  to  build  some
28       structure into them.
29
30       The  old Linux situation was that of mostly 16-bit constants, where the
31       last byte is a serial number, and the preceding  byte(s)  give  a  type
32       indicating  the  driver.  Sometimes the major number was used: 0x03 for
33       the HDIO_* ioctls, 0x06 for the LP* ioctls.  And sometimes one or  more
34       ASCII  letters  were  used.   For example, TCGETS has value 0x00005401,
35       with 0x54 = 'T' indicating the terminal driver,  and  CYGETTIMEOUT  has
36       value  0x00435906,  with  0x43  0x59  = 'C' 'Y' indicating the cyclades
37       driver.
38
39       Later (0.98p5) some more information was built into  the  number.   One
40       has  2  direction  bits (00: none, 01: write, 10: read, 11: read/write)
41       followed by 14 size bits (giving the size of the argument), followed by
42       an  8-bit type (collecting the ioctls in groups for a common purpose or
43       a common driver), and an 8-bit serial number.
44
45       The macros describing this structure  live  in  <asm/ioctl.h>  and  are
46       _IO(type,nr)    and    {_IOR,_IOW,_IOWR}(type,nr,size).     They    use
47       sizeof(size) so that size is a misnomer here: this third argument is  a
48       data type.
49
50       Note  that the size bits are very unreliable: in lots of cases they are
51       wrong, either because of buggy macros using sizeof(sizeof(struct)),  or
52       because of legacy values.
53
54       Thus,  it seems that the new structure only gave disadvantages: it does
55       not help in checking, but it causes  varying  values  for  the  various
56       architectures.
57

RETURN VALUE

59       Decent  ioctls  return  0  on success and -1 on error, while any output
60       value is stored via the argument.  However, quite a few ioctls in  fact
61       return an output value.  This is not yet indicated below.
62
63       // Main table.
64
65       // <include/asm-i386/socket.h>
66
67       0x00008901   FIOSETOWN    const int *
68       0x00008902   SIOCSPGRP    const int *
69       0x00008903   FIOGETOWN    int *
70       0x00008904   SIOCGPGRP    int *
71       0x00008905   SIOCATMAR    int *
72       0x00008906   SIOCGSTAMP   timeval *
73
74       // <include/asm-i386/termios.h>
75
76       0x00005401   TCGETS           struct termios *
77       0x00005402   TCSETS           const struct termios *
78       0x00005403   TCSETSW          const struct termios *
79       0x00005404   TCSETSF          const struct termios *
80       0x00005405   TCGETA           struct termio *
81       0x00005406   TCSETA           const struct termio *
82       0x00005407   TCSETAW          const struct termio *
83       0x00005408   TCSETAF          const struct termio *
84       0x00005409   TCSBRK           int
85       0x0000540A   TCXONC           int
86       0x0000540B   TCFLSH           int
87       0x0000540C   TIOCEXCL         void
88       0x0000540D   TIOCNXCL         void
89       0x0000540E   TIOCSCTTY        int
90       0x0000540F   TIOCGPGRP        pid_t *
91       0x00005410   TIOCSPGRP        const pid_t *
92       0x00005411   TIOCOUTQ         int *
93       0x00005412   TIOCSTI          const char *
94       0x00005413   TIOCGWINSZ       struct winsize *
95       0x00005414   TIOCSWINSZ       const struct winsize *
96       0x00005415   TIOCMGET         int *
97       0x00005416   TIOCMBIS         const int *
98       0x00005417   TIOCMBIC         const int *
99       0x00005418   TIOCMSET         const int *
100       0x00005419   TIOCGSOFTCAR     int *
101       0x0000541A   TIOCSSOFTCAR     const int *
102       0x0000541B   FIONREAD         int *
103       0x0000541B   TIOCINQ          int *
104       0x0000541C   TIOCLINUX        const char *                   // MORE
105       0x0000541D   TIOCCONS         void
106       0x0000541E   TIOCGSERIAL      struct serial_struct *
107       0x0000541F   TIOCSSERIAL      const struct serial_struct *
108       0x00005420   TIOCPKT          const int *
109       0x00005421   FIONBIO          const int *
110       0x00005422   TIOCNOTTY        void
111       0x00005423   TIOCSETD         const int *
112       0x00005424   TIOCGETD         int *
113       0x00005425   TCSBRKP          int
114       0x00005426   TIOCTTYGSTRUCT   struct tty_struct *
115       0x00005450   FIONCLEX         void
116       0x00005451   FIOCLEX          void
117       0x00005452   FIOASYNC         const int *
118       0x00005453   TIOCSERCONFIG    void
119       0x00005454   TIOCSERGWILD     int *
120       0x00005455   TIOCSERSWILD     const int *
121       0x00005456   TIOCGLCKTRMIOS   struct termios *
122       0x00005457   TIOCSLCKTRMIOS   const struct termios *
123       0x00005458   TIOCSERGSTRUCT   struct async_struct *
124       0x00005459   TIOCSERGETLSR    int *
125
126       0x0000545A   TIOCSERGETMULTI   struct serial_multiport_struct *
127       0x0000545B   TIOCSERSETMULTI   const struct serial_multiport_struct *
128
129       // <include/linux/ax25.h>
130
131       0x000089E0   SIOCAX25GETUID     const struct sockaddr_ax25 *
132
133       0x000089E1   SIOCAX25ADDUID     const struct sockaddr_ax25 *
134       0x000089E2   SIOCAX25DELUID     const struct sockaddr_ax25 *
135       0x000089E3   SIOCAX25NOUID      const int *
136       0x000089E4   SIOCAX25DIGCTL     const int *
137       0x000089E5   SIOCAX25GETPARMS   struct ax25_parms_struct *     // I-O
138
139       0x000089E6   SIOCAX25SETPARMS   const struct ax25_parms_struct *
140
141       // <include/linux/cdk.h>
142
143       0x00007314   STL_BINTR    void
144       0x00007315   STL_BSTART   void
145       0x00007316   STL_BSTOP    void
146       0x00007317   STL_BRESET   void
147
148       // <include/linux/cdrom.h>
149
150       0x00005301   CDROMPAUSE        void
151       0x00005302   CDROMRESUME       void
152       0x00005303   CDROMPLAYMSF      const struct cdrom_msf *
153       0x00005304   CDROMPLAYTRKIND   const struct cdrom_ti *
154       0x00005305   CDROMREADTOCHDR   struct cdrom_tochdr *
155
156       0x00005306   CDROMREADTOCENTRY   struct cdrom_tocentry *   // I-O
157
158       0x00005307   CDROMSTOP        void
159       0x00005308   CDROMSTART       void
160       0x00005309   CDROMEJECT       void
161       0x0000530A   CDROMVOLCTRL     const struct cdrom_volctrl *
162       0x0000530B   CDROMSUBCHNL     struct cdrom_subchnl *            // I-O
163       0x0000530C   CDROMREADMODE2   const struct cdrom_msf *          // MORE
164       0x0000530D   CDROMREADMODE1   const struct cdrom_msf *          // MORE
165       0x0000530E   CDROMREADAUDIO   const struct cdrom_read_audio *   // MORE
166       0x0000530F   CDROMEJECT_SW    int
167
168       0x00005310   CDROMMULTISESSION   struct cdrom_multisession *   // I-O
169
170       0x00005311   CDROM_GET_UPC     struct { char [8]; } *
171       0x00005312   CDROMRESET        void
172       0x00005313   CDROMVOLREAD      struct cdrom_volctrl *
173       0x00005314   CDROMREADRAW      const struct cdrom_msf *   // MORE
174       0x00005315   CDROMREADCOOKED   const struct cdrom_msf *   // MORE
175       0x00005316   CDROMSEEK         const struct cdrom_msf *
176
177       // <include/linux/cm206.h>
178
179       0x00002000   CM206CTL_GET_STAT        int
180       0x00002001   CM206CTL_GET_LAST_STAT   int
181
182       // <include/linux/cyclades.h>
183
184       0x00435901   CYGETMON          struct cyclades_monitor *
185       0x00435902   CYGETTHRESH       int *
186       0x00435903   CYSETTHRESH       int
187       0x00435904   CYGETDEFTHRESH    int *
188       0x00435905   CYSETDEFTHRESH    int
189       0x00435906   CYGETTIMEOUT      int *
190       0x00435907   CYSETTIMEOUT      int
191       0x00435908   CYGETDEFTIMEOUT   int *
192       0x00435909   CYSETDEFTIMEOUT   int
193
194       // <include/linux/fd.h>
195
196       0x00000000   FDCLRPRM         void
197       0x00000001   FDSETPRM         const struct floppy_struct *
198
199       0x00000002   FDDEFPRM         const struct floppy_struct *
200       0x00000003   FDGETPRM         struct floppy_struct *
201       0x00000004   FDMSGON          void
202       0x00000005   FDMSGOFF         void
203       0x00000006   FDFMTBEG         void
204       0x00000007   FDFMTTRK         const struct format_descr *
205       0x00000008   FDFMTEND         void
206       0x0000000A   FDSETEMSGTRESH   int
207       0x0000000B   FDFLUSH          void
208       0x0000000C   FDSETMAXERRS     const struct floppy_max_errors *
209       0x0000000E   FDGETMAXERRS     struct floppy_max_errors *
210       0x00000010   FDGETDRVTYP      struct { char [16]; } *
211       0x00000014   FDSETDRVPRM      const struct floppy_drive_params *
212       0x00000015   FDGETDRVPRM      struct floppy_drive_params *
213       0x00000016   FDGETDRVSTAT     struct floppy_drive_struct *
214       0x00000017   FDPOLLDRVSTAT    struct floppy_drive_struct *
215       0x00000018   FDRESET          int
216       0x00000019   FDGETFDCSTAT     struct floppy_fdc_state *
217       0x0000001B   FDWERRORCLR      void
218       0x0000001C   FDWERRORGET      struct floppy_write_errors *
219
220       0x0000001E   FDRAWCMD    struct floppy_raw_cmd *   // MORE // I-O
221       0x00000028   FDTWADDLE   void
222
223       // <include/linux/fs.h>
224
225       0x0000125D   BLKROSET              const int *
226       0x0000125E   BLKROGET              int *
227       0x0000125F   BLKRRPART             void
228       0x00001260   BLKGETSIZE            unsigned long *
229       0x00001261   BLKFLSBUF             void
230       0x00001262   BLKRASET              unsigned long
231       0x00001263   BLKRAGET              unsigned long *
232       0x00000001   FIBMAP                int *             // I-O
233       0x00000002   FIGETBSZ              int *
234       0x80086601   FS_IOC_GETFLAGS       int *
235       0x40086602   FS_IOC_SETFLAGS       int *
236       0x80087601   FS_IOC_GETVERSION     int *
237       0x40087602   FS_IOC_SETVERSION     int *
238       0xC020660B   FS_IOC_FIEMAP         struct fiemap *
239       0x40086602   FS_IOC32_SETFLAGS     int *
240       0x40086602   FS_IOC32_SETFLAGS     int *
241       0x80047601   FS_IOC32_GETVERSION   int *
242       0x40047602   FS_IOC32_SETVERSION   int *
243
244       // <include/linux/hdreg.h>
245
246       0x00000301   HDIO_GETGEO             struct hd_geometry *
247       0x00000302   HDIO_GET_UNMASKINTR     int *
248       0x00000304   HDIO_GET_MULTCOUNT      int *
249       0x00000307   HDIO_GET_IDENTITY       struct hd_driveid *
250       0x00000308   HDIO_GET_KEEPSETTINGS   int *
251       0x00000309   HDIO_GET_CHIPSET        int *
252       0x0000030A   HDIO_GET_NOWERR         int *
253       0x0000030B   HDIO_GET_DMA            int *
254       0x0000031F   HDIO_DRIVE_CMD          int *                  // I-O
255       0x00000321   HDIO_SET_MULTCOUNT      int
256       0x00000322   HDIO_SET_UNMASKINTR     int
257       0x00000323   HDIO_SET_KEEPSETTINGS   int
258       0x00000324   HDIO_SET_CHIPSET        int
259       0x00000325   HDIO_SET_NOWERR         int
260       0x00000326   HDIO_SET_DMA            int
261
262       // <include/linux/if_eql.h>
263
264
265       0x000089F0   EQL_ENSLAVE       struct ifreq *   // MORE // I-O
266       0x000089F1   EQL_EMANCIPATE    struct ifreq *   // MORE // I-O
267       0x000089F2   EQL_GETSLAVECFG   struct ifreq *   // MORE // I-O
268       0x000089F3   EQL_SETSLAVECFG   struct ifreq *   // MORE // I-O
269       0x000089F4   EQL_GETMASTRCFG   struct ifreq *   // MORE // I-O
270       0x000089F5   EQL_SETMASTRCFG   struct ifreq *   // MORE // I-O
271
272       // <include/linux/if_plip.h>
273
274       0x000089F0   SIOCDEVPLIP   struct ifreq *   // I-O
275
276       // <include/linux/if_ppp.h>
277
278       0x00005490   PPPIOCGFLAGS       int *
279       0x00005491   PPPIOCSFLAGS       const int *
280       0x00005492   PPPIOCGASYNCMAP    int *
281       0x00005493   PPPIOCSASYNCMAP    const int *
282       0x00005494   PPPIOCGUNIT        int *
283       0x00005495   PPPIOCSINPSIG      const int *
284       0x00005497   PPPIOCSDEBUG       const int *
285       0x00005498   PPPIOCGDEBUG       int *
286       0x00005499   PPPIOCGSTAT        struct ppp_stats *
287       0x0000549A   PPPIOCGTIME        struct ppp_ddinfo *
288       0x0000549B   PPPIOCGXASYNCMAP   struct { int [8]; } *
289       0x0000549C   PPPIOCSXASYNCMAP   const struct { int [8]; } *
290       0x0000549D   PPPIOCSMRU         const int *
291       0x0000549E   PPPIOCRASYNCMAP    const int *
292       0x0000549F   PPPIOCSMAXCID      const int *
293
294       // <include/linux/ipx.h>
295
296       0x000089E0   SIOCAIPXITFCRT   const char *
297       0x000089E1   SIOCAIPXPRISLT   const char *
298       0x000089E2   SIOCIPXCFGDATA   struct ipx_config_data *
299
300       // <include/linux/kd.h>
301
302       0x00004B60   GIO_FONT   struct { char [8192]; } *
303       0x00004B61   PIO_FONT   const struct { char [8192]; } *
304
305       0x00004B6B  GIO_FONTX  struct console_font_desc *        // MORE // I-O
306       0x00004B6C  PIO_FONTX  const struct console_font_desc *  //MORE
307
308       0x00004B70   GIO_CMAP   struct { char [48]; } *
309       0x00004B71   PIO_CMAP   const struct { char [48]; }
310
311       0x00004B2F   KIOCSOUND     int
312       0x00004B30   KDMKTONE      int
313       0x00004B31   KDGETLED      char *
314       0x00004B32   KDSETLED      int
315       0x00004B33   KDGKBTYPE     char *
316       0x00004B34   KDADDIO       int                            // MORE
317       0x00004B35   KDDELIO       int                            // MORE
318       0x00004B36   KDENABIO      void                           // MORE
319       0x00004B37   KDDISABIO     void                           // MORE
320       0x00004B3A   KDSETMODE     int
321       0x00004B3B   KDGETMODE     int *
322       0x00004B3C   KDMAPDISP     void                           // MORE
323       0x00004B3D   KDUNMAPDISP   void                           // MORE
324       0x00004B40   GIO_SCRNMAP   struct { char [E_TABSZ]; } *
325
326       0x00004B41   PIO_SCRNMAP      const struct { char [E_TABSZ]; } *
327       0x00004B69   GIO_UNISCRNMAP   struct { short [E_TABSZ]; } *
328       0x00004B6A   PIO_UNISCRNMAP   const struct { short [E_TABSZ]; } *
329
330
331       0x00004B66   GIO_UNIMAP      struct unimapdesc *         // MORE // I-O
332       0x00004B67   PIO_UNIMAP      const struct unimapdesc *   // MORE
333       0x00004B68   PIO_UNIMAPCLR   const struct unimapinit *
334       0x00004B44   KDGKBMODE       int *
335       0x00004B45   KDSKBMODE       int
336       0x00004B62   KDGKBMETA       int *
337       0x00004B63   KDSKBMETA       int
338       0x00004B64   KDGKBLED        int *
339       0x00004B65   KDSKBLED        int
340       0x00004B46   KDGKBENT        struct kbentry *            // I-O
341       0x00004B47   KDSKBENT        const struct kbentry *
342       0x00004B48   KDGKBSENT       struct kbsentry *           // I-O
343       0x00004B49   KDSKBSENT       const struct kbsentry *
344       0x00004B4A   KDGKBDIACR      struct kbdiacrs *
345       0x00004B4B   KDSKBDIACR      const struct kbdiacrs *
346       0x00004B4C   KDGETKEYCODE    struct kbkeycode *          // I-O
347       0x00004B4D   KDSETKEYCODE    const struct kbkeycode *
348       0x00004B4E   KDSIGACCEPT     int
349
350       // <include/linux/lp.h>
351
352       0x00000601   LPCHAR        int
353       0x00000602   LPTIME        int
354       0x00000604   LPABORT       int
355       0x00000605   LPSETIRQ      int
356       0x00000606   LPGETIRQ      int *
357       0x00000608   LPWAIT        int
358       0x00000609   LPCAREFUL     int
359       0x0000060A   LPABORTOPEN   int
360       0x0000060B   LPGETSTATUS   int *
361       0x0000060C   LPRESET       void
362       0x0000060D   LPGETSTATS    struct lp_stats *
363
364       // <include/linux/mroute.h>
365
366       0x000089E0   SIOCGETVIFCNT   struct sioc_vif_req *   // I-O
367       0x000089E1   SIOCGETSGCNT    struct sioc_sg_req *    // I-O
368
369       // <include/linux/msdos_fs.h> see ioctl_fat(2)
370
371       0x82307201   VFAT_IOCTL_READDIR_BOTH    struct dirent [2]
372       0x82307202   VFAT_IOCTL_READDIR_SHORT   struct dirent [2]
373       0x80047210   FAT_IOCTL_GET_ATTRIBUTES   __u32 *
374       0x40047211   FAT_IOCTL_SET_ATTRIBUTES   const __u32 *
375       0x80047213   FAT_IOCTL_GET_VOLUME_ID    __u32 *
376
377       // <include/linux/mtio.h>
378
379       0x40086D01   MTIOCTOP         const struct mtop *
380       0x801C6D02   MTIOCGET         struct mtget *
381       0x80046D03   MTIOCPOS         struct mtpos *
382       0x80206D04   MTIOCGETCONFIG   struct mtconfiginfo *
383       0x40206D05   MTIOCSETCONFIG   const struct mtconfiginfo *
384
385       // <include/linux/netrom.h>
386
387       0x000089E0   SIOCNRGETPARMS   struct nr_parms_struct *         // I-O
388       0x000089E1   SIOCNRSETPARMS   const struct nr_parms_struct *
389       0x000089E2   SIOCNRDECOBS     void
390       0x000089E3   SIOCNRRTCTL      const int *
391
392       // <include/uapi/linux/wireless.h>
393       // This API is deprecated.
394       // It is being replaced by nl80211 and cfg80211.  See
395       // https://wireless.wiki.kernel.org/en/developers/documentation/nl80211
396
397       x00008b00   SIOCSIWCOMMIT      struct iwreq *
398       x00008b01   SIOCGIWNAME        struct iwreq *
399       x00008b02   SIOCSIWNWID        struct iwreq *
400       x00008b03   SIOCGIWNWID        struct iwreq *
401       x00008b04   SIOCSIWFREQ        struct iwreq *
402       x00008b05   SIOCGIWFREQ        struct iwreq *
403       x00008b06   SIOCSIWMODE        struct iwreq *
404       x00008b07   SIOCGIWMODE        struct iwreq *
405       x00008b08   SIOCSIWSENS        struct iwreq *
406       x00008b09   SIOCGIWSENS        struct iwreq *
407       x00008b0a   SIOCSIWRANGE       struct iwreq *
408       x00008b0b   SIOCGIWRANGE       struct iwreq *
409       x00008b0c   SIOCSIWPRIV        struct iwreq *
410       x00008b0d   SIOCGIWPRIV        struct iwreq *
411       x00008b0e   SIOCSIWSTATS       struct iwreq *
412       x00008b0f   SIOCGIWSTATS       struct iwreq *
413       x00008b10   SIOCSIWSPY         struct iwreq *
414       x00008b11   SIOCGIWSPY         struct iwreq *
415       x00008b12   SIOCSIWTHRSPY      struct iwreq *
416       x00008b13   SIOCGIWTHRSPY      struct iwreq *
417       x00008b14   SIOCSIWAP          struct iwreq *
418       x00008b15   SIOCGIWAP          struct iwreq *
419       x00008b17   SIOCGIWAPLIST      struct iwreq *
420       x00008b18   SIOCSIWSCAN        struct iwreq *
421       x00008b19   SIOCGIWSCAN        struct iwreq *
422       x00008b1a   SIOCSIWESSID       struct iwreq *
423       x00008b1b   SIOCGIWESSID       struct iwreq *
424       x00008b1c   SIOCSIWNICKN       struct iwreq *
425       x00008b1d   SIOCGIWNICKN       struct iwreq *
426       x00008b20   SIOCSIWRATE        struct iwreq *
427       x00008b21   SIOCGIWRATE        struct iwreq *
428       x00008b22   SIOCSIWRTS         struct iwreq *
429       x00008b23   SIOCGIWRTS         struct iwreq *
430       x00008b24   SIOCSIWFRAG        struct iwreq *
431       x00008b25   SIOCGIWFRAG        struct iwreq *
432       x00008b26   SIOCSIWTXPOW       struct iwreq *
433       x00008b27   SIOCGIWTXPOW       struct iwreq *
434       x00008b28   SIOCSIWRETRY       struct iwreq *
435       x00008b29   SIOCGIWRETRY       struct iwreq *
436       x00008b2a   SIOCSIWENCODE      struct iwreq *
437       x00008b2b   SIOCGIWENCODE      struct iwreq *
438       x00008b2c   SIOCSIWPOWER       struct iwreq *
439       x00008b2d   SIOCGIWPOWER       struct iwreq *
440       x00008b30   SIOCSIWGENIE       struct iwreq *
441       x00008b31   SIOCGIWGENIE       struct iwreq *
442       x00008b16   SIOCSIWMLME        struct iwreq *
443       x00008b32   SIOCSIWAUTH        struct iwreq *
444       x00008b33   SIOCGIWAUTH        struct iwreq *
445       x00008b34   SIOCSIWENCODEEXT   struct iwreq *
446       x00008b35   SIOCGIWENCODEEXT   struct iwreq *
447       x00008b36   SIOCSIWPMKSA       struct iwreq *
448
449       // <include/linux/sbpcd.h>
450
451       0x00009000   DDIOCSDBG          const int *
452       0x00005382   CDROMAUDIOBUFSIZ   int
453
454       // <include/linux/scc.h>
455
456       0x00005470   TIOCSCCINI    void
457       0x00005471   TIOCCHANINI   const struct scc_modem *
458       0x00005472   TIOCGKISS     struct ioctl_command *         // I-O
459       0x00005473   TIOCSKISS     const struct ioctl_command *
460       0x00005474   TIOCSCCSTAT   struct scc_stat *
461
462       // <include/linux/scsi.h>
463
464       0x00005382   SCSI_IOCTL_GET_IDLUN       struct { int [2]; } *
465       0x00005383   SCSI_IOCTL_TAGGED_ENABLE   void
466       0x00005384   SCSI_IOCTL_TAGGED_DISABLE  void
467
468       0x00005385   SCSI_IOCTL_PROBE_HOST   const int *   // MORE
469
470       // <include/linux/smb_fs.h>
471
472       0x80027501   SMB_IOC_GETMOUNTUID   uid_t *
473
474       // <include/uapi/linux/sockios.h> see netdevice(7)
475
476       0x0000890B   SIOCADDRT        const struct rtentry *   // MORE
477       0x0000890C   SIOCDELRT        const struct rtentry *   // MORE
478       0x00008910   SIOCGIFNAME      char []
479       0x00008911   SIOCSIFLINK      void
480       0x00008912   SIOCGIFCONF      struct ifconf *          // MORE // I-O
481       0x00008913   SIOCGIFFLAGS     struct ifreq *           // I-O
482       0x00008914   SIOCSIFFLAGS     const struct ifreq *
483       0x00008915   SIOCGIFADDR      struct ifreq *           // I-O
484       0x00008916   SIOCSIFADDR      const struct ifreq *
485       0x00008917   SIOCGIFDSTADDR   struct ifreq *           // I-O
486       0x00008918   SIOCSIFDSTADDR   const struct ifreq *
487       0x00008919   SIOCGIFBRDADDR   struct ifreq *           // I-O
488       0x0000891A   SIOCSIFBRDADDR   const struct ifreq *
489       0x0000891B   SIOCGIFNETMASK   struct ifreq *           // I-O
490       0x0000891C   SIOCSIFNETMASK   const struct ifreq *
491       0x0000891D   SIOCGIFMETRIC    struct ifreq *           // I-O
492       0x0000891E   SIOCSIFMETRIC    const struct ifreq *
493       0x0000891F   SIOCGIFMEM       struct ifreq *           // I-O
494       0x00008920   SIOCSIFMEM       const struct ifreq *
495       0x00008921   SIOCGIFMTU       struct ifreq *           // I-O
496       0x00008922   SIOCSIFMTU       const struct ifreq *
497
498       0x00008923   OLD_SIOCGIFHWADDR   struct ifreq *          // I-O
499       0x00008924   SIOCSIFHWADDR       const struct ifreq *    // MORE
500       0x00008925   SIOCGIFENCAP        int *
501       0x00008926   SIOCSIFENCAP        const int *
502       0x00008927   SIOCGIFHWADDR       struct ifreq *          // I-O
503       0x00008929   SIOCGIFSLAVE        void
504       0x00008930   SIOCSIFSLAVE        void
505       0x00008931   SIOCADDMULTI        const struct ifreq *
506       0x00008932   SIOCDELMULTI        const struct ifreq *
507       0x00008940   SIOCADDRTOLD        void
508       0x00008941   SIOCDELRTOLD        void
509       0x00008950   SIOCDARP            const struct arpreq *
510       0x00008951   SIOCGARP            struct arpreq *         // I-O
511       0x00008952   SIOCSARP            const struct arpreq *
512       0x00008960   SIOCDRARP           const struct arpreq *
513       0x00008961   SIOCGRARP           struct arpreq *         // I-O
514       0x00008962   SIOCSRARP           const struct arpreq *
515       0x00008970   SIOCGIFMAP          struct ifreq *          // I-O
516       0x00008971   SIOCSIFMAP          const struct ifreq *
517
518       // <include/linux/soundcard.h>
519
520       0x00005100   SNDCTL_SEQ_RESET   void
521       0x00005101   SNDCTL_SEQ_SYNC    void
522
523       0xC08C5102   SNDCTL_SYNTH_INFO        struct synth_info *   // I-O
524       0xC0045103   SNDCTL_SEQ_CTRLRATE      int *                 // I-O
525       0x80045104   SNDCTL_SEQ_GETOUTCOUNT   int *
526       0x80045105   SNDCTL_SEQ_GETINCOUNT    int *
527       0x40045106   SNDCTL_SEQ_PERCMODE      void
528
529       0x40285107   SNDCTL_FM_LOAD_INSTR   const struct sbi_instrument *
530
531       0x40045108   SNDCTL_SEQ_TESTMIDI       const int *
532       0x40045109   SNDCTL_SEQ_RESETSAMPLES   const int *
533       0x8004510A   SNDCTL_SEQ_NRSYNTHS       int *
534       0x8004510B   SNDCTL_SEQ_NRMIDIS        int *
535       0xC074510C   SNDCTL_MIDI_INFO          struct midi_info *     // I-O
536       0x4004510D   SNDCTL_SEQ_THRESHOLD      const int *
537       0xC004510E   SNDCTL_SYNTH_MEMAVL       int *                  // I-O
538       0x4004510F   SNDCTL_FM_4OP_ENABLE      const int *
539       0xCFB85110   SNDCTL_PMGR_ACCESS        struct patmgr_info *   // I-O
540       0x00005111   SNDCTL_SEQ_PANIC          void
541
542       0x40085112   SNDCTL_SEQ_OUTOFBAND   const struct seq_event_rec *
543
544       0xC0045401   SNDCTL_TMR_TIMEBASE    int *                  // I-O
545       0x00005402   SNDCTL_TMR_START       void
546       0x00005403   SNDCTL_TMR_STOP        void
547       0x00005404   SNDCTL_TMR_CONTINUE    void
548       0xC0045405   SNDCTL_TMR_TEMPO       int *                  // I-O
549       0xC0045406   SNDCTL_TMR_SOURCE      int *                  // I-O
550       0x40045407   SNDCTL_TMR_METRONOME   const int *
551       0x40045408   SNDCTL_TMR_SELECT      int *                  // I-O
552       0xCFB85001   SNDCTL_PMGR_IFACE      struct patmgr_info *   // I-O
553       0xC0046D00   SNDCTL_MIDI_PRETIME    int *                  // I-O
554       0xC0046D01   SNDCTL_MIDI_MPUMODE    const int *
555
556       0xC0216D02   SNDCTL_MIDI_MPUCMD   struct mpu_command_rec *   // I-O
557
558       0x00005000   SNDCTL_DSP_RESET           void
559       0x00005001   SNDCTL_DSP_SYNC            void
560       0xC0045002   SNDCTL_DSP_SPEED           int *   // I-O
561       0xC0045003   SNDCTL_DSP_STEREO          int *   // I-O
562       0xC0045004   SNDCTL_DSP_GETBLKSIZE      int *   // I-O
563       0xC0045006   SOUND_PCM_WRITE_CHANNELS   int *   // I-O
564       0xC0045007   SOUND_PCM_WRITE_FILTER     int *   // I-O
565       0x00005008   SNDCTL_DSP_POST            void
566       0xC0045009   SNDCTL_DSP_SUBDIVIDE       int *   // I-O
567       0xC004500A   SNDCTL_DSP_SETFRAGMENT     int *   // I-O
568       0x8004500B   SNDCTL_DSP_GETFMTS         int *
569       0xC0045005   SNDCTL_DSP_SETFMT          int *   // I-O
570
571       0x800C500C   SNDCTL_DSP_GETOSPACE      struct audio_buf_info *
572       0x800C500D   SNDCTL_DSP_GETISPACE      struct audio_buf_info *
573       0x0000500E   SNDCTL_DSP_NONBLOCK       void
574       0x80045002   SOUND_PCM_READ_RATE       int *
575       0x80045006   SOUND_PCM_READ_CHANNELS   int *
576       0x80045005   SOUND_PCM_READ_BITS       int *
577       0x80045007   SOUND_PCM_READ_FILTER     int *
578       0x00004300   SNDCTL_COPR_RESET         void
579       0xCFB04301   SNDCTL_COPR_LOAD          const struct copr_buffer *
580
581       0xC0144302   SNDCTL_COPR_RDATA   struct copr_debug_buf *   // I-O
582       0xC0144303   SNDCTL_COPR_RCODE   struct copr_debug_buf *   // I-O
583
584       0x40144304   SNDCTL_COPR_WDATA   const struct copr_debug_buf *
585       0x40144305   SNDCTL_COPR_WCODE   const struct copr_debug_buf *
586
587       0xC0144306   SNDCTL_COPR_RUN    struct copr_debug_buf *   // I-O
588       0xC0144307   SNDCTL_COPR_HALT   struct copr_debug_buf *   // I-O
589
590       0x4FA44308   SNDCTL_COPR_SENDMSG           const struct copr_msg *
591       0x8FA44309   SNDCTL_COPR_RCVMSG            struct copr_msg *
592       0x80044D00   SOUND_MIXER_READ_VOLUME       int *
593       0x80044D01   SOUND_MIXER_READ_BASS         int *
594
595       0x80044D02   SOUND_MIXER_READ_TREBLE       int *
596       0x80044D03   SOUND_MIXER_READ_SYNTH        int *
597       0x80044D04   SOUND_MIXER_READ_PCM          int *
598       0x80044D05   SOUND_MIXER_READ_SPEAKER      int *
599       0x80044D06   SOUND_MIXER_READ_LINE         int *
600       0x80044D07   SOUND_MIXER_READ_MIC          int *
601       0x80044D08   SOUND_MIXER_READ_CD           int *
602       0x80044D09   SOUND_MIXER_READ_IMIX         int *
603       0x80044D0A   SOUND_MIXER_READ_ALTPCM       int *
604       0x80044D0B   SOUND_MIXER_READ_RECLEV       int *
605       0x80044D0C   SOUND_MIXER_READ_IGAIN        int *
606       0x80044D0D   SOUND_MIXER_READ_OGAIN        int *
607       0x80044D0E   SOUND_MIXER_READ_LINE1        int *
608       0x80044D0F   SOUND_MIXER_READ_LINE2        int *
609       0x80044D10   SOUND_MIXER_READ_LINE3        int *
610       0x80044D1C   SOUND_MIXER_READ_MUTE         int *
611       0x80044D1D   SOUND_MIXER_READ_ENHANCE      int *
612       0x80044D1E   SOUND_MIXER_READ_LOUD         int *
613       0x80044DFF   SOUND_MIXER_READ_RECSRC       int *
614       0x80044DFE   SOUND_MIXER_READ_DEVMASK      int *
615       0x80044DFD   SOUND_MIXER_READ_RECMASK      int *
616       0x80044DFB   SOUND_MIXER_READ_STEREODEVS   int *
617       0x80044DFC   SOUND_MIXER_READ_CAPS         int *
618
619       0xC0044D00   SOUND_MIXER_WRITE_VOLUME    int *   // I-O
620       0xC0044D01   SOUND_MIXER_WRITE_BASS      int *   // I-O
621       0xC0044D02   SOUND_MIXER_WRITE_TREBLE    int *   // I-O
622       0xC0044D03   SOUND_MIXER_WRITE_SYNTH     int *   // I-O
623       0xC0044D04   SOUND_MIXER_WRITE_PCM       int *   // I-O
624       0xC0044D05   SOUND_MIXER_WRITE_SPEAKER   int *   // I-O
625       0xC0044D06   SOUND_MIXER_WRITE_LINE      int *   // I-O
626       0xC0044D07   SOUND_MIXER_WRITE_MIC       int *   // I-O
627       0xC0044D08   SOUND_MIXER_WRITE_CD        int *   // I-O
628       0xC0044D09   SOUND_MIXER_WRITE_IMIX      int *   // I-O
629       0xC0044D0A   SOUND_MIXER_WRITE_ALTPCM    int *   // I-O
630       0xC0044D0B   SOUND_MIXER_WRITE_RECLEV    int *   // I-O
631       0xC0044D0C   SOUND_MIXER_WRITE_IGAIN     int *   // I-O
632       0xC0044D0D   SOUND_MIXER_WRITE_OGAIN     int *   // I-O
633       0xC0044D0E   SOUND_MIXER_WRITE_LINE1     int *   // I-O
634       0xC0044D0F   SOUND_MIXER_WRITE_LINE2     int *   // I-O
635       0xC0044D10   SOUND_MIXER_WRITE_LINE3     int *   // I-O
636       0xC0044D1C   SOUND_MIXER_WRITE_MUTE      int *   // I-O
637       0xC0044D1D   SOUND_MIXER_WRITE_ENHANCE   int *   // I-O
638       0xC0044D1E   SOUND_MIXER_WRITE_LOUD      int *   // I-O
639       0xC0044DFF   SOUND_MIXER_WRITE_RECSRC    int *   // I-O
640
641       // <include/linux/timerfd.h> see timerfd_create(2)
642
643       0x40085400   TFD_IOC_SET_TICKS   uint64_t *
644
645       // <include/linux/umsdos_fs.h>
646
647       0x000004D2   UMSDOS_READDIR_DOS   struct umsdos_ioctl *         // I-O
648       0x000004D3   UMSDOS_UNLINK_DOS    const struct umsdos_ioctl *
649       0x000004D4   UMSDOS_RMDIR_DOS     const struct umsdos_ioctl *
650       0x000004D5   UMSDOS_STAT_DOS      struct umsdos_ioctl *         // I-O
651       0x000004D6   UMSDOS_CREAT_EMD     const struct umsdos_ioctl *
652       0x000004D7   UMSDOS_UNLINK_EMD    const struct umsdos_ioctl *
653       0x000004D8   UMSDOS_READDIR_EMD   struct umsdos_ioctl *         // I-O
654       0x000004D9   UMSDOS_GETVERSION    struct umsdos_ioctl *
655       0x000004DA   UMSDOS_INIT_EMD      void
656       0x000004DB   UMSDOS_DOS_SETUP     const struct umsdos_ioctl *
657       0x000004DC   UMSDOS_RENAME_DOS    const struct umsdos_ioctl *
658
659       // <include/linux/vt.h>
660
661       0x00005600   VT_OPENQRY       int *
662       0x00005601   VT_GETMODE       struct vt_mode *
663       0x00005602   VT_SETMODE       const struct vt_mode *
664       0x00005603   VT_GETSTATE      struct vt_stat *
665       0x00005604   VT_SENDSIG       void
666       0x00005605   VT_RELDISP       int
667       0x00005606   VT_ACTIVATE      int
668       0x00005607   VT_WAITACTIVE    int
669       0x00005608   VT_DISALLOCATE   int
670       0x00005609   VT_RESIZE        const struct vt_sizes *
671       0x0000560A   VT_RESIZEX       const struct vt_consize *
672
673       //  More  arguments.   Some ioctl's take a pointer to a structure which
674       contains additional pointers.  These are documented here in  alphabeti‐
675       cal order.
676
677       CDROMREADAUDIO  takes an input pointer const struct cdrom_read_audio *.
678       The buf field points to an output buffer of length nframes *  CD_FRAME‐
679       SIZE_RAW.
680
681       CDROMREADCOOKED,  CDROMREADMODE1, CDROMREADMODE2, and CDROMREADRAW take
682       an input pointer const struct cdrom_msf *.  They use the  same  pointer
683       as  an  output  pointer to char [].  The length varies by request.  For
684       CDROMREADMODE1, most drivers use CD_FRAMESIZE, but the  Optics  Storage
685       driver uses OPT_BLOCKSIZE instead (both have the numerical value 2048).
686
687           CDROMREADCOOKED    char [CD_FRAMESIZE]
688           CDROMREADMODE1     char [CD_FRAMESIZE or OPT_BLOCKSIZE]
689           CDROMREADMODE2     char [CD_FRAMESIZE_RAW0]
690           CDROMREADRAW       char [CD_FRAMESIZE_RAW]
691
692       EQL_ENSLAVE, EQL_EMANCIPATE, EQL_GETSLAVECFG, EQL_SETSLAVECFG, EQL_GET‐
693       MASTERCFG, and EQL_SETMASTERCFG take a struct  ifreq *.   The  ifr_data
694       field is a pointer to another structure as follows:
695
696           EQL_ENSLAVE         const struct slaving_request *
697           EQL_EMANCIPATE      const struct slaving_request *
698           EQL_GETSLAVECFG     struct slave_config *           // I-O
699           EQL_SETSLAVECFG     const struct slave_config *
700           EQL_GETMASTERCFG    struct master_config *
701           EQL_SETMASTERCFG    const struct master_config *
702
703       FDRAWCMD  takes  a struct floppy raw_cmd *.  If flags & FD_RAW_WRITE is
704       nonzero, then data points to an input  buffer  of  length  length.   If
705       flags & FD_RAW_READ is nonzero, then data points to an output buffer of
706       length length.
707
708       GIO_FONTX and PIO_FONTX take a struct console_font_desc *  or  a  const
709       struct  console_font_desc *, respectively.  chardata points to a buffer
710       of char [charcount].  This is an output buffer  for  GIO_FONTX  and  an
711       input buffer for PIO_FONTX.
712
713       GIO_UNIMAP  and PIO_UNIMAP take a struct unimapdesc * or a const struct
714       unimapdesc *, respectively.  entries points to a buffer of struct  uni‐
715       pair  [entry_ct].  This is an output buffer for GIO_UNIMAP and an input
716       buffer for PIO_UNIMAP.
717
718       KDADDIO, KDDELIO, KDDISABIO, and KDENABIO enable or disable  access  to
719       I/O ports.  They are essentially alternate interfaces to 'ioperm'.
720
721       KDMAPDISP and KDUNMAPDISP enable or disable memory mappings or I/O port
722       access.  They are not implemented in the kernel.
723
724       SCSI_IOCTL_PROBE_HOST takes an input pointer const int *,  which  is  a
725       length.   It  uses  the  same pointer as an output pointer to a char []
726       buffer of this length.
727
728       SIOCADDRT and SIOCDELRT take an input pointer whose type depends on the
729       protocol:
730
731           Most protocols      const struct rtentry *
732           AX.25               const struct ax25_route *
733           NET/ROM             const struct nr_route_struct *
734           INET6               const struct in6_rtmsg *
735
736       SIOCGIFCONF  takes  a  struct  ifconf *.  The ifc_buf field points to a
737       buffer of length ifc_len bytes, into which the kernel writes a list  of
738       type struct ifreq [].
739
740       SIOCSIFHWADDR  takes  an input pointer whose type depends on the proto‐
741       col:
742
743           Most protocols      const struct ifreq *
744           AX.25               const char [AX25_ADDR_LEN]
745
746       TIOCLINUX takes a const char *.  It uses this  to  distinguish  several
747       independent  subcases.   In the table below, N + foo means foo after an
748       N-byte  pad.   struct  selection  is  implicitly   defined   in   driv‐
749       ers/char/selection.c
750
751           TIOCLINUX-2         1 + const struct selection *
752           TIOCLINUX-3         void
753           TIOCLINUX-4         void
754           TIOCLINUX-5         4 + const struct { long [8]; } *
755           TIOCLINUX-6         char *
756           TIOCLINUX-7         char *
757           TIOCLINUX-10        1 + const char *
758
759       // Duplicate ioctls
760
761       This  list  does  not  include  ioctls  in the range SIOCDEVPRIVATE and
762       SIOCPROTOPRIVATE.
763
764       0x00000001   FDSETPRM              FIBMAP
765       0x00000002   FDDEFPRM              FIGETBSZ
766       0x00005382   CDROMAUDIOBUFSIZ      SCSI_IOCTL_GET_IDLUN
767       0x00005402   SNDCTL_TMR_START      TCSETS
768       0x00005403   SNDCTL_TMR_STOP       TCSETSW
769       0x00005404   SNDCTL_TMR_CONTINUE   TCSETSF
770

SEE ALSO

772       ioctl(2), ioctl_fat(2), netdevice(7)
773

COLOPHON

775       This page is part of release 4.15 of the Linux  man-pages  project.   A
776       description  of  the project, information about reporting bugs, and the
777       latest    version    of    this    page,    can     be     found     at
778       https://www.kernel.org/doc/man-pages/.
779
780
781
782Linux                             2017-09-15                     IOCTL_LIST(2)
Impressum