proc->thread stage 4: rework the VFS and DEVICE subsystems to take thread
[dragonfly.git] / sys / emulation / linux / linux_ioctl.h
CommitLineData
984263bc
MD
1/*
2 * Copyright (c) 1999 Marcel Moolenaar
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer
10 * in this position and unchanged.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: src/sys/compat/linux/linux_ioctl.h,v 1.4.2.4 2003/05/01 20:16:09 anholt Exp $
dadab5e9 29 * $DragonFly: src/sys/emulation/linux/linux_ioctl.h,v 1.3 2003/06/25 03:55:44 dillon Exp $
984263bc
MD
30 */
31
32#ifndef _LINUX_IOCTL_H_
33#define _LINUX_IOCTL_H_
34
35/*
36 * disk
37 */
38#define LINUX_BLKROSET 0x125d
39#define LINUX_BLKROGET 0x125e
40#define LINUX_BLKRRPART 0x125f
41#define LINUX_BLKGETSIZE 0x1260
42#define LINUX_BLKFLSBUF 0x1261
43#define LINUX_BLKRASET 0x1262
44#define LINUX_BLKRAGET 0x1263
45#define LINUX_BLKFRASET 0x1264
46#define LINUX_BLKFRAGET 0x1265
47#define LINUX_BLKSECTSET 0x1266
48#define LINUX_BLKSECTGET 0x1267
49#define LINUX_BLKSSZGET 0x1268
50
51#define LINUX_IOCTL_DISK_MIN LINUX_BLKROSET
52#define LINUX_IOCTL_DISK_MAX LINUX_BLKSSZGET
53
54/*
55 * cdrom
56 */
57#define LINUX_CDROMPAUSE 0x5301
58#define LINUX_CDROMRESUME 0x5302
59#define LINUX_CDROMPLAYMSF 0x5303
60#define LINUX_CDROMPLAYTRKIND 0x5304
61#define LINUX_CDROMREADTOCHDR 0x5305
62#define LINUX_CDROMREADTOCENTRY 0x5306
63#define LINUX_CDROMSTOP 0x5307
64#define LINUX_CDROMSTART 0x5308
65#define LINUX_CDROMEJECT 0x5309
66#define LINUX_CDROMVOLCTRL 0x530a
67#define LINUX_CDROMSUBCHNL 0x530b
68#define LINUX_CDROMREADMODE2 0x530c
69#define LINUX_CDROMREADMODE1 0x530d
70#define LINUX_CDROMREADAUDIO 0x530e
71#define LINUX_CDROMEJECT_SW 0x530f
72#define LINUX_CDROMMULTISESSION 0x5310
73#define LINUX_CDROM_GET_UPC 0x5311
74#define LINUX_CDROMRESET 0x5312
75#define LINUX_CDROMVOLREAD 0x5313
76#define LINUX_CDROMREADRAW 0x5314
77#define LINUX_CDROMREADCOOKED 0x5315
78#define LINUX_CDROMSEEK 0x5316
79#define LINUX_CDROMPLAYBLK 0x5317
80#define LINUX_CDROMREADALL 0x5318
81#define LINUX_CDROMCLOSETRAY 0x5319
82#define LINUX_CDROMLOADFROMSLOT 0x531a
83
84#define LINUX_IOCTL_CDROM_MIN LINUX_CDROMPAUSE
85#define LINUX_IOCTL_CDROM_MAX LINUX_CDROMLOADFROMSLOT
86
87#define LINUX_CDROM_LBA 0x01
88#define LINUX_CDROM_MSF 0x02
89
90/*
91 * console
92 */
93#define LINUX_KIOCSOUND 0x4B2F
94#define LINUX_KDMKTONE 0x4B30
95#define LINUX_KDGETLED 0x4B31
96#define LINUX_KDSETLED 0x4B32
97#define LINUX_KDSETMODE 0x4B3A
98#define LINUX_KDGETMODE 0x4B3B
99#define LINUX_KDGKBMODE 0x4B44
100#define LINUX_KDSKBMODE 0x4B45
101#define LINUX_VT_OPENQRY 0x5600
102#define LINUX_VT_GETMODE 0x5601
103#define LINUX_VT_SETMODE 0x5602
104#define LINUX_VT_GETSTATE 0x5603
105#define LINUX_VT_RELDISP 0x5605
106#define LINUX_VT_ACTIVATE 0x5606
107#define LINUX_VT_WAITACTIVE 0x5607
108
109#define LINUX_IOCTL_CONSOLE_MIN LINUX_KIOCSOUND
110#define LINUX_IOCTL_CONSOLE_MAX LINUX_VT_WAITACTIVE
111
112#define LINUX_LED_SCR 0x01
113#define LINUX_LED_NUM 0x02
114#define LINUX_LED_CAP 0x04
115
116#define LINUX_KD_TEXT 0x0
117#define LINUX_KD_GRAPHICS 0x1
118#define LINUX_KD_TEXT0 0x2
119#define LINUX_KD_TEXT1 0x3
120
121#define LINUX_KBD_RAW 0
122#define LINUX_KBD_XLATE 1
123#define LINUX_KBD_MEDIUMRAW 2
124
125/*
126 * socket
127 */
128#define LINUX_FIOSETOWN 0x8901
129#define LINUX_SIOCSPGRP 0x8902
130#define LINUX_FIOGETOWN 0x8903
131#define LINUX_SIOCGPGRP 0x8904
132#define LINUX_SIOCATMARK 0x8905
133#define LINUX_SIOCGSTAMP 0x8906
134#define LINUX_SIOCGIFCONF 0x8912
135#define LINUX_SIOCGIFFLAGS 0x8913
136#define LINUX_SIOCGIFADDR 0x8915
137#define LINUX_SIOCSIFADDR 0x8916
138#define LINUX_SIOCGIFDSTADDR 0x8917
139#define LINUX_SIOCGIFBRDADDR 0x8919
140#define LINUX_SIOCGIFNETMASK 0x891b
141#define LINUX_SIOCSIFNETMASK 0x891c
142#define LINUX_SIOCGIFMTU 0x8921
143#define LINUX_SIOCSIFMTU 0x8922
144#define LINUX_SIOCSIFNAME 0x8923
145#define LINUX_SIOCSIFHWADDR 0x8924
146#define LINUX_SIOCGIFHWADDR 0x8927
147#define LINUX_SIOCADDMULTI 0x8931
148#define LINUX_SIOCDELMULTI 0x8932
149
150#define LINUX_IOCTL_SOCKET_MIN LINUX_FIOSETOWN
151#define LINUX_IOCTL_SOCKET_MAX LINUX_SIOCDELMULTI
152
153/*
154 * Device private ioctl calls
155 */
156#define LINUX_SIOCDEVPRIVATE 0x89F0 /* to 89FF */
157#define LINUX_IOCTL_PRIVATE_MIN LINUX_SIOCDEVPRIVATE
158#define LINUX_IOCTL_PRIVATE_MAX LINUX_SIOCDEVPRIVATE+0xf
159
160/*
161 * sound
162 */
163#define LINUX_SOUND_MIXER_WRITE_VOLUME 0x4d00
164#define LINUX_SOUND_MIXER_WRITE_BASS 0x4d01
165#define LINUX_SOUND_MIXER_WRITE_TREBLE 0x4d02
166#define LINUX_SOUND_MIXER_WRITE_SYNTH 0x4d03
167#define LINUX_SOUND_MIXER_WRITE_PCM 0x4d04
168#define LINUX_SOUND_MIXER_WRITE_SPEAKER 0x4d05
169#define LINUX_SOUND_MIXER_WRITE_LINE 0x4d06
170#define LINUX_SOUND_MIXER_WRITE_MIC 0x4d07
171#define LINUX_SOUND_MIXER_WRITE_CD 0x4d08
172#define LINUX_SOUND_MIXER_WRITE_IMIX 0x4d09
173#define LINUX_SOUND_MIXER_WRITE_ALTPCM 0x4d0A
174#define LINUX_SOUND_MIXER_WRITE_RECLEV 0x4d0B
175#define LINUX_SOUND_MIXER_WRITE_IGAIN 0x4d0C
176#define LINUX_SOUND_MIXER_WRITE_OGAIN 0x4d0D
177#define LINUX_SOUND_MIXER_WRITE_LINE1 0x4d0E
178#define LINUX_SOUND_MIXER_WRITE_LINE2 0x4d0F
179#define LINUX_SOUND_MIXER_WRITE_LINE3 0x4d10
180#define LINUX_OSS_GETVERSION 0x4d76
181#define LINUX_SOUND_MIXER_READ_DEVMASK 0x4dfe
182#define LINUX_SNDCTL_DSP_RESET 0x5000
183#define LINUX_SNDCTL_DSP_SYNC 0x5001
184#define LINUX_SNDCTL_DSP_SPEED 0x5002
185#define LINUX_SNDCTL_DSP_STEREO 0x5003
186#define LINUX_SNDCTL_DSP_GETBLKSIZE 0x5004
187#define LINUX_SNDCTL_DSP_SETBLKSIZE LINUX_SNDCTL_DSP_GETBLKSIZE
188#define LINUX_SNDCTL_DSP_SETFMT 0x5005
189#define LINUX_SOUND_PCM_WRITE_CHANNELS 0x5006
190#define LINUX_SOUND_PCM_WRITE_FILTER 0x5007
191#define LINUX_SNDCTL_DSP_POST 0x5008
192#define LINUX_SNDCTL_DSP_SUBDIVIDE 0x5009
193#define LINUX_SNDCTL_DSP_SETFRAGMENT 0x500A
194#define LINUX_SNDCTL_DSP_GETFMTS 0x500B
195#define LINUX_SNDCTL_DSP_GETOSPACE 0x500C
196#define LINUX_SNDCTL_DSP_GETISPACE 0x500D
197#define LINUX_SNDCTL_DSP_NONBLOCK 0x500E
198#define LINUX_SNDCTL_DSP_GETCAPS 0x500F
199#define LINUX_SNDCTL_DSP_GETTRIGGER 0x5010
200#define LINUX_SNDCTL_DSP_SETTRIGGER LINUX_SNDCTL_DSP_GETTRIGGER
201#define LINUX_SNDCTL_DSP_GETIPTR 0x5011
202#define LINUX_SNDCTL_DSP_GETOPTR 0x5012
203#define LINUX_SNDCTL_DSP_GETODELAY 0x5017
204#define LINUX_SNDCTL_SEQ_RESET 0x5100
205#define LINUX_SNDCTL_SEQ_SYNC 0x5101
206#define LINUX_SNDCTL_SYNTH_INFO 0x5102
207#define LINUX_SNDCTL_SEQ_CTRLRATE 0x5103
208#define LINUX_SNDCTL_SEQ_GETOUTCOUNT 0x5104
209#define LINUX_SNDCTL_SEQ_GETINCOUNT 0x5105
210#define LINUX_SNDCTL_SEQ_PERCMODE 0x5106
211#define LINUX_SNDCTL_FM_LOAD_INSTR 0x5107
212#define LINUX_SNDCTL_SEQ_TESTMIDI 0x5108
213#define LINUX_SNDCTL_SEQ_RESETSAMPLES 0x5109
214#define LINUX_SNDCTL_SEQ_NRSYNTHS 0x510A
215#define LINUX_SNDCTL_SEQ_NRMIDIS 0x510B
216#define LINUX_SNDCTL_MIDI_INFO 0x510C
217#define LINUX_SNDCTL_SEQ_TRESHOLD 0x510D
218#define LINUX_SNDCTL_SYNTH_MEMAVL 0x510E
219
220#define LINUX_IOCTL_SOUND_MIN LINUX_SOUND_MIXER_WRITE_VOLUME
221#define LINUX_IOCTL_SOUND_MAX LINUX_SNDCTL_SYNTH_MEMAVL
222
223/*
224 * termio
225 */
226#ifdef __alpha__
227#define LINUX_TCGETS 0x7413
228#define LINUX_TCSETS 0x7414
229#define LINUX_TCSETSW 0x7415
230#define LINUX_TCSETSF 0x7416
231#define LINUX_TCGETA 0x7417
232#define LINUX_TCSETA 0x7418
233#define LINUX_TCSETAW 0x7419
234#define LINUX_TCSETAF 0x741c
235#define LINUX_TCSBRK 0x741d
236#define LINUX_TCXONC 0x741e
237#define LINUX_TCFLSH 0x741f
238#else
239#define LINUX_TCGETS 0x5401
240#define LINUX_TCSETS 0x5402
241#define LINUX_TCSETSW 0x5403
242#define LINUX_TCSETSF 0x5404
243#define LINUX_TCGETA 0x5405
244#define LINUX_TCSETA 0x5406
245#define LINUX_TCSETAW 0x5407
246#define LINUX_TCSETAF 0x5408
247#define LINUX_TCSBRK 0x5409
248#define LINUX_TCXONC 0x540A
249#define LINUX_TCFLSH 0x540B
250#endif
251
252#define LINUX_TIOCEXCL 0x540C
253#define LINUX_TIOCNXCL 0x540D
254#define LINUX_TIOCSCTTY 0x540E
255
256#ifdef __alpha__
257#define LINUX_TIOCSPGRP 0x7476
258#define LINUX_TIOCGPGRP 0x7477
259#else
260#define LINUX_TIOCGPGRP 0x540F
261#define LINUX_TIOCSPGRP 0x5410
262#endif
263
264#define LINUX_TIOCOUTQ 0x5411
265#define LINUX_TIOCSTI 0x5412
266
267#ifdef __alpha__
268#define LINUX_TIOCSWINSZ 0x7467
269#define LINUX_TIOCGWINSZ 0x7468
270#else
271#define LINUX_TIOCGWINSZ 0x5413
272#define LINUX_TIOCSWINSZ 0x5414
273#endif
274
275#define LINUX_TIOCMGET 0x5415
276#define LINUX_TIOCMBIS 0x5416
277#define LINUX_TIOCMBIC 0x5417
278#define LINUX_TIOCMSET 0x5418
279#define LINUX_TIOCGSOFTCAR 0x5419
280#define LINUX_TIOCSSOFTCAR 0x541A
281
282#ifdef __alpha__
283#define LINUX_FIONREAD 0x667f
284#else
285#define LINUX_FIONREAD 0x541B
286#endif
287
288#define LINUX_TIOCINQ FIONREAD
289#define LINUX_TIOCLINUX 0x541C
290#define LINUX_TIOCCONS 0x541D
291#define LINUX_TIOCGSERIAL 0x541E
292#define LINUX_TIOCSSERIAL 0x541F
293#define LINUX_TIOCPKT 0x5420
294
295#ifdef __alpha__
296#define LINUX_FIONBIO 0x667e
297#else
298#define LINUX_FIONBIO 0x5421
299#endif
300
301#define LINUX_TIOCNOTTY 0x5422
302#define LINUX_TIOCSETD 0x5423
303#define LINUX_TIOCGETD 0x5424
304#define LINUX_TCSBRKP 0x5425
305#define LINUX_TIOCTTYGSTRUCT 0x5426
306
307#ifdef __alpha__
308#define LINUX_FIOCLEX 0x6601
309#define LINUX_FIONCLEX 0x6602
310#define LINUX_FIOASYNC 0x667d
311#else
312#define LINUX_FIONCLEX 0x5450
313#define LINUX_FIOCLEX 0x5451
314#define LINUX_FIOASYNC 0x5452
315#endif
316
317#define LINUX_TIOCSERCONFIG 0x5453
318#define LINUX_TIOCSERGWILD 0x5454
319#define LINUX_TIOCSERSWILD 0x5455
320#define LINUX_TIOCGLCKTRMIOS 0x5456
321#define LINUX_TIOCSLCKTRMIOS 0x5457
322
323#ifdef __alpha__
324#define LINUX_IOCTL_TERMIO_MIN LINUX_TIOCEXCL
325#define LINUX_IOCTL_TERMIO_MAX LINUX_TIOCGPGRP
326#else
327#define LINUX_IOCTL_TERMIO_MIN LINUX_TCGETS
328#define LINUX_IOCTL_TERMIO_MAX LINUX_TIOCSLCKTRMIOS
329#endif
330
331/* arguments for tcflow() and LINUX_TCXONC */
332#define LINUX_TCOOFF 0
333#define LINUX_TCOON 1
334#define LINUX_TCIOFF 2
335#define LINUX_TCION 3
336
337/* arguments for tcflush() and LINUX_TCFLSH */
338#define LINUX_TCIFLUSH 0
339#define LINUX_TCOFLUSH 1
340#define LINUX_TCIOFLUSH 2
341
342/* line disciplines */
343#define LINUX_N_TTY 0
344#define LINUX_N_SLIP 1
345#define LINUX_N_MOUSE 2
346#define LINUX_N_PPP 3
347
348/* Linux termio c_cc values */
349#ifdef __alpha__
350#define LINUX__VINTR 0
351#define LINUX__VQUIT 1
352#define LINUX__VERASE 2
353#define LINUX__VKILL 3
354#define LINUX__VEOF 4
355#define LINUX__VMIN 4
356#define LINUX__VEOL 5
357#define LINUX__VTIME 5
358#define LINUX__VEOL2 6
359#define LINUX__VSWTC 7
360#else
361#define LINUX_VINTR 0
362#define LINUX_VQUIT 1
363#define LINUX_VERASE 2
364#define LINUX_VKILL 3
365#define LINUX_VEOF 4
366#define LINUX_VTIME 5
367#define LINUX_VMIN 6
368#define LINUX_VSWTC 7
369#endif
370#define LINUX_NCC 8
371
372/* Linux termios c_cc values */
373#ifdef __alpha__
374#define LINUX_VEOF 0
375#define LINUX_VEOL 1
376#define LINUX_VEOL2 2
377#define LINUX_VERASE 3
378#define LINUX_VWERASE 4
379#define LINUX_VKILL 5
380#define LINUX_VREPRINT 6
381#define LINUX_VSWTC 7
382#define LINUX_VINTR 8
383#define LINUX_VQUIT 9
384#define LINUX_VSUSP 10
385#define LINUX_VSTART 12
386#define LINUX_VSTOP 13
387#define LINUX_VLNEXT 14
388#define LINUX_VDISCARD 15
389#define LINUX_VMIN 16
390#define LINUX_VTIME 17
391#else
392/* In addition to the termio values */
393#define LINUX_VSTART 8
394#define LINUX_VSTOP 9
395#define LINUX_VSUSP 10
396#define LINUX_VEOL 11
397#define LINUX_VREPRINT 12
398#define LINUX_VDISCARD 13
399#define LINUX_VWERASE 14
400#define LINUX_VLNEXT 15
401#define LINUX_VEOL2 16
402#endif
403#define LINUX_NCCS 19
404
405#define LINUX_POSIX_VDISABLE '\0'
406
407/* Linux c_iflag masks */
408#define LINUX_IGNBRK 0x0000001
409#define LINUX_BRKINT 0x0000002
410#define LINUX_IGNPAR 0x0000004
411#define LINUX_PARMRK 0x0000008
412#define LINUX_INPCK 0x0000010
413#define LINUX_ISTRIP 0x0000020
414#define LINUX_INLCR 0x0000040
415#define LINUX_IGNCR 0x0000080
416#define LINUX_ICRNL 0x0000100
417
418#ifdef __alpha__
419#define LINUX_IXON 0x0000200
420#define LINUX_IXOFF 0x0000400
421#define LINUX_IXANY 0x0000800
422#define LINUX_IUCLC 0x0001000
423#else
424#define LINUX_IUCLC 0x0000200
425#define LINUX_IXON 0x0000400
426#define LINUX_IXANY 0x0000800
427#define LINUX_IXOFF 0x0001000
428#endif
429
430#define LINUX_IMAXBEL 0x0002000
431
432/* Linux c_oflag masks */
433#define LINUX_OPOST 0x0000001
434
435#ifdef __alpha__
436#define LINUX_ONLCR 0x0000002
437#define LINUX_OLCUC 0x0000004
438#else
439#define LINUX_OLCUC 0x0000002
440#define LINUX_ONLCR 0x0000004
441#endif
442
443#define LINUX_OCRNL 0x0000008
444#define LINUX_ONOCR 0x0000010
445#define LINUX_ONLRET 0x0000020
446#define LINUX_OFILL 0x0000040
447#define LINUX_OFDEL 0x0000080
448
449#ifdef __alpha__
450#define LINUX_NLDLY 0x0000300
451#define LINUX_NL0 0x0000000
452#define LINUX_NL1 0x0000100
453#define LINUX_NL2 0x0000200
454#define LINUX_NL3 0x0000300
455#define LINUX_TABDLY 0x000C000
456#define LINUX_TAB0 0x0000000
457#define LINUX_TAB1 0x0004000
458#define LINUX_TAB2 0x0008000
459#define LINUX_TAB3 0x000C000
460#define LINUX_CRDLY 0x0030000
461#define LINUX_CR0 0x0000000
462#define LINUX_CR1 0x0010000
463#define LINUX_CR2 0x0020000
464#define LINUX_CR3 0x0030000
465#define LINUX_FFDLY 0x0040000
466#define LINUX_FF0 0x0000000
467#define LINUX_FF1 0x0040000
468#define LINUX_BSDLY 0x0080000
469#define LINUX_BS0 0x0000000
470#define LINUX_BS1 0x0080000
471#define LINUX_VTDLY 0x0100000
472#define LINUX_VT0 0x0000000
473#define LINUX_VT1 0x0100000
474#define LINUX_XTABS 0x0200000
475#else
476#define LINUX_NLDLY 0x0000100
477#define LINUX_NL0 0x0000000
478#define LINUX_NL1 0x0000100
479#define LINUX_CRDLY 0x0000600
480#define LINUX_CR0 0x0000000
481#define LINUX_CR1 0x0000200
482#define LINUX_CR2 0x0000400
483#define LINUX_CR3 0x0000600
484#define LINUX_TABDLY 0x0001800
485#define LINUX_TAB0 0x0000000
486#define LINUX_TAB1 0x0000800
487#define LINUX_TAB2 0x0001000
488#define LINUX_TAB3 0x0001800
489#define LINUX_XTABS 0x0001800
490#define LINUX_BSDLY 0x0002000
491#define LINUX_BS0 0x0000000
492#define LINUX_BS1 0x0002000
493#define LINUX_VTDLY 0x0004000
494#define LINUX_VT0 0x0000000
495#define LINUX_VT1 0x0004000
496#define LINUX_FFDLY 0x0008000
497#define LINUX_FF0 0x0000000
498#define LINUX_FF1 0x0008000
499#endif
500
501#ifdef __alpha__
502#define LINUX_CBAUD 0x0000001f
503#else
504#define LINUX_CBAUD 0x0000100f
505#endif
506
507#define LINUX_B0 0x00000000
508#define LINUX_B50 0x00000001
509#define LINUX_B75 0x00000002
510#define LINUX_B110 0x00000003
511#define LINUX_B134 0x00000004
512#define LINUX_B150 0x00000005
513#define LINUX_B200 0x00000006
514#define LINUX_B300 0x00000007
515#define LINUX_B600 0x00000008
516#define LINUX_B1200 0x00000009
517#define LINUX_B1800 0x0000000a
518#define LINUX_B2400 0x0000000b
519#define LINUX_B4800 0x0000000c
520#define LINUX_B9600 0x0000000d
521#define LINUX_B19200 0x0000000e
522#define LINUX_B38400 0x0000000f
523#define LINUX_EXTA LINUX_B19200
524#define LINUX_EXTB LINUX_B38400
525
526#ifdef __alpha__
527#define LINUX_CBAUDEX 0x00000000
528#define LINUX_B57600 0x00000010
529#define LINUX_B115200 0x00000011
530#else
531#define LINUX_CBAUDEX 0x00001000
532#define LINUX_B57600 0x00001001
533#define LINUX_B115200 0x00001002
534#endif
535
536#ifdef __alpha__
537#define LINUX_CSIZE 0x00000300
538#define LINUX_CS5 0x00000000
539#define LINUX_CS6 0x00000100
540#define LINUX_CS7 0x00000200
541#define LINUX_CS8 0x00000300
542#define LINUX_CSTOPB 0x00000400
543#define LINUX_CREAD 0x00000800
544#define LINUX_PARENB 0x00001000
545#define LINUX_PARODD 0x00002000
546#define LINUX_HUPCL 0x00004000
547#define LINUX_CLOCAL 0x00008000
548#else
549#define LINUX_CSIZE 0x00000030
550#define LINUX_CS5 0x00000000
551#define LINUX_CS6 0x00000010
552#define LINUX_CS7 0x00000020
553#define LINUX_CS8 0x00000030
554#define LINUX_CSTOPB 0x00000040
555#define LINUX_CREAD 0x00000080
556#define LINUX_PARENB 0x00000100
557#define LINUX_PARODD 0x00000200
558#define LINUX_HUPCL 0x00000400
559#define LINUX_CLOCAL 0x00000800
560#endif
561
562#define LINUX_CRTSCTS 0x80000000
563
564/* Linux c_lflag masks */
565#ifdef __alpha__
566#define LINUX_ECHOKE 0x00000001
567#define LINUX_ECHOE 0x00000002
568#define LINUX_ECHOK 0x00000004
569#define LINUX_ECHO 0x00000008
570#define LINUX_ECHONL 0x00000010
571#define LINUX_ECHOPRT 0x00000020
572#define LINUX_ECHOCTL 0x00000040
573#define LINUX_ISIG 0x00000080
574#define LINUX_ICANON 0x00000100
575#define LINUX_IEXTEN 0x00000400
576#define LINUX_XCASE 0x00004000
577#define LINUX_TOSTOP 0x00400000
578#define LINUX_FLUSHO 0x00800000
579#define LINUX_PENDIN 0x20000000
580#define LINUX_NOFLSH 0x80000000
581#else
582#define LINUX_ISIG 0x00000001
583#define LINUX_ICANON 0x00000002
584#define LINUX_XCASE 0x00000004
585#define LINUX_ECHO 0x00000008
586#define LINUX_ECHOE 0x00000010
587#define LINUX_ECHOK 0x00000020
588#define LINUX_ECHONL 0x00000040
589#define LINUX_NOFLSH 0x00000080
590#define LINUX_TOSTOP 0x00000100
591#define LINUX_ECHOCTL 0x00000200
592#define LINUX_ECHOPRT 0x00000400
593#define LINUX_ECHOKE 0x00000800
594#define LINUX_FLUSHO 0x00001000
595#define LINUX_PENDIN 0x00002000
596#define LINUX_IEXTEN 0x00008000
597#endif
598
599/* serial_struct values for TIOC[GS]SERIAL ioctls */
600#define LINUX_ASYNC_CLOSING_WAIT_INF 0
601#define LINUX_ASYNC_CLOSING_WAIT_NONE 65535
602
603#define LINUX_PORT_UNKNOWN 0
604#define LINUX_PORT_8250 1
605#define LINUX_PORT_16450 2
606#define LINUX_PORT_16550 3
607#define LINUX_PORT_16550A 4
608#define LINUX_PORT_CIRRUS 5
609#define LINUX_PORT_16650 6
610
611#define LINUX_PORT_MAX 6
612
613#define LINUX_ASYNC_HUP_NOTIFY 0x0001
614#define LINUX_ASYNC_FOURPORT 0x0002
615#define LINUX_ASYNC_SAK 0x0004
616#define LINUX_ASYNC_SPLIT_TERMIOS 0x0008
617#define LINUX_ASYNC_SPD_MASK 0x0030
618#define LINUX_ASYNC_SPD_HI 0x0010
619#define LINUX_ASYNC_SPD_VHI 0x0020
620#define LINUX_ASYNC_SPD_CUST 0x0030
621#define LINUX_ASYNC_SKIP_TEST 0x0040
622#define LINUX_ASYNC_AUTO_IRQ 0x0080
623#define LINUX_ASYNC_SESSION_LOCKOUT 0x0100
624#define LINUX_ASYNC_PGRP_LOCKOUT 0x0200
625#define LINUX_ASYNC_CALLOUT_NOHUP 0x0400
626#define LINUX_ASYNC_FLAGS 0x0FFF
627
628#define LINUX_IOCTL_DRM_MIN 0x6400
629#define LINUX_IOCTL_DRM_MAX 0x64ff
630
631/*
632 * This doesn't really belong here, but I can't think of a better
633 * place to put it.
634 */
dadab5e9 635struct ifnet;
984263bc
MD
636int linux_ifname(struct ifnet *, char *, size_t);
637
638#endif /* !_LINUX_IOCTL_H_ */