ioctls.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. #ifndef _ASM_SPARC_IOCTLS_H
  2. #define _ASM_SPARC_IOCTLS_H
  3. #include <asm/ioctl.h>
  4. /* Big T */
  5. #define TCGETA _IOR('T', 1, struct termio)
  6. #define TCSETA _IOW('T', 2, struct termio)
  7. #define TCSETAW _IOW('T', 3, struct termio)
  8. #define TCSETAF _IOW('T', 4, struct termio)
  9. #define TCSBRK _IO('T', 5)
  10. #define TCXONC _IO('T', 6)
  11. #define TCFLSH _IO('T', 7)
  12. #define TCGETS _IOR('T', 8, struct termios)
  13. #define TCSETS _IOW('T', 9, struct termios)
  14. #define TCSETSW _IOW('T', 10, struct termios)
  15. #define TCSETSF _IOW('T', 11, struct termios)
  16. #define TCGETS2 _IOR('T', 12, struct termios2)
  17. #define TCSETS2 _IOW('T', 13, struct termios2)
  18. #define TCSETSW2 _IOW('T', 14, struct termios2)
  19. #define TCSETSF2 _IOW('T', 15, struct termios2)
  20. /* Note that all the ioctls that are not available in Linux have a
  21. * double underscore on the front to: a) avoid some programs to
  22. * think we support some ioctls under Linux (autoconfiguration stuff)
  23. */
  24. /* Little t */
  25. #define TIOCGETD _IOR('t', 0, int)
  26. #define TIOCSETD _IOW('t', 1, int)
  27. #define __TIOCHPCL _IO('t', 2) /* SunOS Specific */
  28. #define __TIOCMODG _IOR('t', 3, int) /* SunOS Specific */
  29. #define __TIOCMODS _IOW('t', 4, int) /* SunOS Specific */
  30. #define __TIOCGETP _IOR('t', 8, struct sgttyb) /* SunOS Specific */
  31. #define __TIOCSETP _IOW('t', 9, struct sgttyb) /* SunOS Specific */
  32. #define __TIOCSETN _IOW('t', 10, struct sgttyb) /* SunOS Specific */
  33. #define TIOCEXCL _IO('t', 13)
  34. #define TIOCNXCL _IO('t', 14)
  35. #define __TIOCFLUSH _IOW('t', 16, int) /* SunOS Specific */
  36. #define __TIOCSETC _IOW('t', 17, struct tchars) /* SunOS Specific */
  37. #define __TIOCGETC _IOR('t', 18, struct tchars) /* SunOS Specific */
  38. #define __TIOCTCNTL _IOW('t', 32, int) /* SunOS Specific */
  39. #define __TIOCSIGNAL _IOW('t', 33, int) /* SunOS Specific */
  40. #define __TIOCSETX _IOW('t', 34, int) /* SunOS Specific */
  41. #define __TIOCGETX _IOR('t', 35, int) /* SunOS Specific */
  42. #define TIOCCONS _IO('t', 36)
  43. #define TIOCGSOFTCAR _IOR('t', 100, int)
  44. #define TIOCSSOFTCAR _IOW('t', 101, int)
  45. #define __TIOCUCNTL _IOW('t', 102, int) /* SunOS Specific */
  46. #define TIOCSWINSZ _IOW('t', 103, struct winsize)
  47. #define TIOCGWINSZ _IOR('t', 104, struct winsize)
  48. #define __TIOCREMOTE _IOW('t', 105, int) /* SunOS Specific */
  49. #define TIOCMGET _IOR('t', 106, int)
  50. #define TIOCMBIC _IOW('t', 107, int)
  51. #define TIOCMBIS _IOW('t', 108, int)
  52. #define TIOCMSET _IOW('t', 109, int)
  53. #define TIOCSTART _IO('t', 110)
  54. #define TIOCSTOP _IO('t', 111)
  55. #define TIOCPKT _IOW('t', 112, int)
  56. #define TIOCNOTTY _IO('t', 113)
  57. #define TIOCSTI _IOW('t', 114, char)
  58. #define TIOCOUTQ _IOR('t', 115, int)
  59. #define __TIOCGLTC _IOR('t', 116, struct ltchars) /* SunOS Specific */
  60. #define __TIOCSLTC _IOW('t', 117, struct ltchars) /* SunOS Specific */
  61. /* 118 is the non-posix setpgrp tty ioctl */
  62. /* 119 is the non-posix getpgrp tty ioctl */
  63. #define __TIOCCDTR _IO('t', 120) /* SunOS Specific */
  64. #define __TIOCSDTR _IO('t', 121) /* SunOS Specific */
  65. #define TIOCCBRK _IO('t', 122)
  66. #define TIOCSBRK _IO('t', 123)
  67. #define __TIOCLGET _IOW('t', 124, int) /* SunOS Specific */
  68. #define __TIOCLSET _IOW('t', 125, int) /* SunOS Specific */
  69. #define __TIOCLBIC _IOW('t', 126, int) /* SunOS Specific */
  70. #define __TIOCLBIS _IOW('t', 127, int) /* SunOS Specific */
  71. #define __TIOCISPACE _IOR('t', 128, int) /* SunOS Specific */
  72. #define __TIOCISIZE _IOR('t', 129, int) /* SunOS Specific */
  73. #define TIOCSPGRP _IOW('t', 130, int)
  74. #define TIOCGPGRP _IOR('t', 131, int)
  75. #define TIOCSCTTY _IO('t', 132)
  76. #define TIOCGSID _IOR('t', 133, int)
  77. /* Get minor device of a pty master's FD -- Solaris equiv is ISPTM */
  78. #define TIOCGPTN _IOR('t', 134, unsigned int) /* Get Pty Number */
  79. #define TIOCSPTLCK _IOW('t', 135, int) /* Lock/unlock PTY */
  80. /* Little f */
  81. #define FIOCLEX _IO('f', 1)
  82. #define FIONCLEX _IO('f', 2)
  83. #define FIOASYNC _IOW('f', 125, int)
  84. #define FIONBIO _IOW('f', 126, int)
  85. #define FIONREAD _IOR('f', 127, int)
  86. #define TIOCINQ FIONREAD
  87. #define FIOQSIZE _IOR('f', 128, loff_t)
  88. /* SCARY Rutgers local SunOS kernel hackery, perhaps I will support it
  89. * someday. This is completely bogus, I know...
  90. */
  91. #define __TCGETSTAT _IO('T', 200) /* Rutgers specific */
  92. #define __TCSETSTAT _IO('T', 201) /* Rutgers specific */
  93. /* Linux specific, no SunOS equivalent. */
  94. #define TIOCLINUX 0x541C
  95. #define TIOCGSERIAL 0x541E
  96. #define TIOCSSERIAL 0x541F
  97. #define TCSBRKP 0x5425
  98. #define TIOCSERCONFIG 0x5453
  99. #define TIOCSERGWILD 0x5454
  100. #define TIOCSERSWILD 0x5455
  101. #define TIOCGLCKTRMIOS 0x5456
  102. #define TIOCSLCKTRMIOS 0x5457
  103. #define TIOCSERGSTRUCT 0x5458 /* For debugging only */
  104. #define TIOCSERGETLSR 0x5459 /* Get line status register */
  105. #define TIOCSERGETMULTI 0x545A /* Get multiport config */
  106. #define TIOCSERSETMULTI 0x545B /* Set multiport config */
  107. #define TIOCMIWAIT 0x545C /* Wait for change on serial input line(s) */
  108. #define TIOCGICOUNT 0x545D /* Read serial port inline interrupt counts */
  109. /* Kernel definitions */
  110. #ifdef __KERNEL__
  111. #define TIOCGETC __TIOCGETC
  112. #define TIOCGETP __TIOCGETP
  113. #define TIOCGLTC __TIOCGLTC
  114. #define TIOCSLTC __TIOCSLTC
  115. #define TIOCSETP __TIOCSETP
  116. #define TIOCSETN __TIOCSETN
  117. #define TIOCSETC __TIOCSETC
  118. #endif
  119. /* Used for packet mode */
  120. #define TIOCPKT_DATA 0
  121. #define TIOCPKT_FLUSHREAD 1
  122. #define TIOCPKT_FLUSHWRITE 2
  123. #define TIOCPKT_STOP 4
  124. #define TIOCPKT_START 8
  125. #define TIOCPKT_NOSTOP 16
  126. #define TIOCPKT_DOSTOP 32
  127. #endif /* !(_ASM_SPARC_IOCTLS_H) */