ttymode-list.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /*
  2. * List of SSH terminal modes, indicating whether SSH types them as
  3. * char or boolean, and if they're boolean, which POSIX flags field of
  4. * a termios structure they appear in, and what bit mask removes them
  5. * (e.g. CS7 and CS8 aren't single bits).
  6. *
  7. * Sources: RFC 4254, SSH-1 RFC-1.2.31, POSIX 2017, and the Linux
  8. * termios manpage for flags not specified by POSIX.
  9. *
  10. * This is a separate header file rather than my usual style of a
  11. * parametric list macro, because in this case I need to be able to
  12. * #ifdef out each mode in case it's not defined on a particular
  13. * target system.
  14. *
  15. * If you want only the locally defined modes, #define
  16. * TTYMODES_LOCAL_ONLY before including this header.
  17. */
  18. #if !defined TTYMODES_LOCAL_ONLY || defined VINTR
  19. TTYMODE_CHAR(INTR, 1, VINTR)
  20. #endif
  21. #if !defined TTYMODES_LOCAL_ONLY || defined VQUIT
  22. TTYMODE_CHAR(QUIT, 2, VQUIT)
  23. #endif
  24. #if !defined TTYMODES_LOCAL_ONLY || defined VERASE
  25. TTYMODE_CHAR(ERASE, 3, VERASE)
  26. #endif
  27. #if !defined TTYMODES_LOCAL_ONLY || defined VKILL
  28. TTYMODE_CHAR(KILL, 4, VKILL)
  29. #endif
  30. #if !defined TTYMODES_LOCAL_ONLY || defined VEOF
  31. TTYMODE_CHAR(EOF, 5, VEOF)
  32. #endif
  33. #if !defined TTYMODES_LOCAL_ONLY || defined VEOL
  34. TTYMODE_CHAR(EOL, 6, VEOL)
  35. #endif
  36. #if !defined TTYMODES_LOCAL_ONLY || defined VEOL2
  37. TTYMODE_CHAR(EOL2, 7, VEOL2)
  38. #endif
  39. #if !defined TTYMODES_LOCAL_ONLY || defined VSTART
  40. TTYMODE_CHAR(START, 8, VSTART)
  41. #endif
  42. #if !defined TTYMODES_LOCAL_ONLY || defined VSTOP
  43. TTYMODE_CHAR(STOP, 9, VSTOP)
  44. #endif
  45. #if !defined TTYMODES_LOCAL_ONLY || defined VSUSP
  46. TTYMODE_CHAR(SUSP, 10, VSUSP)
  47. #endif
  48. #if !defined TTYMODES_LOCAL_ONLY || defined VDSUSP
  49. TTYMODE_CHAR(DSUSP, 11, VDSUSP)
  50. #endif
  51. #if !defined TTYMODES_LOCAL_ONLY || defined VREPRINT
  52. TTYMODE_CHAR(REPRINT, 12, VREPRINT)
  53. #endif
  54. #if !defined TTYMODES_LOCAL_ONLY || defined VWERASE
  55. TTYMODE_CHAR(WERASE, 13, VWERASE)
  56. #endif
  57. #if !defined TTYMODES_LOCAL_ONLY || defined VLNEXT
  58. TTYMODE_CHAR(LNEXT, 14, VLNEXT)
  59. #endif
  60. #if !defined TTYMODES_LOCAL_ONLY || defined VFLUSH
  61. TTYMODE_CHAR(FLUSH, 15, VFLUSH)
  62. #endif
  63. #if !defined TTYMODES_LOCAL_ONLY || defined VSWTCH
  64. TTYMODE_CHAR(SWTCH, 16, VSWTCH)
  65. #endif
  66. #if !defined TTYMODES_LOCAL_ONLY || defined VSTATUS
  67. TTYMODE_CHAR(STATUS, 17, VSTATUS)
  68. #endif
  69. #if !defined TTYMODES_LOCAL_ONLY || defined VDISCARD
  70. TTYMODE_CHAR(DISCARD, 18, VDISCARD)
  71. #endif
  72. #if !defined TTYMODES_LOCAL_ONLY || defined IGNPAR
  73. TTYMODE_FLAG(IGNPAR, 30, i, IGNPAR)
  74. #endif
  75. #if !defined TTYMODES_LOCAL_ONLY || defined PARMRK
  76. TTYMODE_FLAG(PARMRK, 31, i, PARMRK)
  77. #endif
  78. #if !defined TTYMODES_LOCAL_ONLY || defined INPCK
  79. TTYMODE_FLAG(INPCK, 32, i, INPCK)
  80. #endif
  81. #if !defined TTYMODES_LOCAL_ONLY || defined ISTRIP
  82. TTYMODE_FLAG(ISTRIP, 33, i, ISTRIP)
  83. #endif
  84. #if !defined TTYMODES_LOCAL_ONLY || defined INLCR
  85. TTYMODE_FLAG(INLCR, 34, i, INLCR)
  86. #endif
  87. #if !defined TTYMODES_LOCAL_ONLY || defined IGNCR
  88. TTYMODE_FLAG(IGNCR, 35, i, IGNCR)
  89. #endif
  90. #if !defined TTYMODES_LOCAL_ONLY || defined ICRNL
  91. TTYMODE_FLAG(ICRNL, 36, i, ICRNL)
  92. #endif
  93. #if !defined TTYMODES_LOCAL_ONLY || defined IUCLC
  94. TTYMODE_FLAG(IUCLC, 37, i, IUCLC)
  95. #endif
  96. #if !defined TTYMODES_LOCAL_ONLY || defined IXON
  97. TTYMODE_FLAG(IXON, 38, i, IXON)
  98. #endif
  99. #if !defined TTYMODES_LOCAL_ONLY || defined IXANY
  100. TTYMODE_FLAG(IXANY, 39, i, IXANY)
  101. #endif
  102. #if !defined TTYMODES_LOCAL_ONLY || defined IXOFF
  103. TTYMODE_FLAG(IXOFF, 40, i, IXOFF)
  104. #endif
  105. #if !defined TTYMODES_LOCAL_ONLY || defined IMAXBEL
  106. TTYMODE_FLAG(IMAXBEL, 41, i, IMAXBEL)
  107. #endif
  108. #if !defined TTYMODES_LOCAL_ONLY || defined IUTF8
  109. TTYMODE_FLAG(IUTF8, 42, i, IUTF8)
  110. #endif
  111. #if !defined TTYMODES_LOCAL_ONLY || defined ISIG
  112. TTYMODE_FLAG(ISIG, 50, l, ISIG)
  113. #endif
  114. #if !defined TTYMODES_LOCAL_ONLY || defined ICANON
  115. TTYMODE_FLAG(ICANON, 51, l, ICANON)
  116. #endif
  117. #if !defined TTYMODES_LOCAL_ONLY || defined XCASE
  118. TTYMODE_FLAG(XCASE, 52, l, XCASE)
  119. #endif
  120. #if !defined TTYMODES_LOCAL_ONLY || defined ECHO
  121. TTYMODE_FLAG(ECHO, 53, l, ECHO)
  122. #endif
  123. #if !defined TTYMODES_LOCAL_ONLY || defined ECHOE
  124. TTYMODE_FLAG(ECHOE, 54, l, ECHOE)
  125. #endif
  126. #if !defined TTYMODES_LOCAL_ONLY || defined ECHOK
  127. TTYMODE_FLAG(ECHOK, 55, l, ECHOK)
  128. #endif
  129. #if !defined TTYMODES_LOCAL_ONLY || defined ECHONL
  130. TTYMODE_FLAG(ECHONL, 56, l, ECHONL)
  131. #endif
  132. #if !defined TTYMODES_LOCAL_ONLY || defined NOFLSH
  133. TTYMODE_FLAG(NOFLSH, 57, l, NOFLSH)
  134. #endif
  135. #if !defined TTYMODES_LOCAL_ONLY || defined TOSTOP
  136. TTYMODE_FLAG(TOSTOP, 58, l, TOSTOP)
  137. #endif
  138. #if !defined TTYMODES_LOCAL_ONLY || defined IEXTEN
  139. TTYMODE_FLAG(IEXTEN, 59, l, IEXTEN)
  140. #endif
  141. #if !defined TTYMODES_LOCAL_ONLY || defined ECHOCTL
  142. TTYMODE_FLAG(ECHOCTL, 60, l, ECHOCTL)
  143. #endif
  144. #if !defined TTYMODES_LOCAL_ONLY || defined ECHOKE
  145. TTYMODE_FLAG(ECHOKE, 61, l, ECHOKE)
  146. #endif
  147. #if !defined TTYMODES_LOCAL_ONLY || defined PENDIN
  148. TTYMODE_FLAG(PENDIN, 62, l, PENDIN)
  149. #endif
  150. #if !defined TTYMODES_LOCAL_ONLY || defined OPOST
  151. TTYMODE_FLAG(OPOST, 70, o, OPOST)
  152. #endif
  153. #if !defined TTYMODES_LOCAL_ONLY || defined OLCUC
  154. TTYMODE_FLAG(OLCUC, 71, o, OLCUC)
  155. #endif
  156. #if !defined TTYMODES_LOCAL_ONLY || defined ONLCR
  157. TTYMODE_FLAG(ONLCR, 72, o, ONLCR)
  158. #endif
  159. #if !defined TTYMODES_LOCAL_ONLY || defined OCRNL
  160. TTYMODE_FLAG(OCRNL, 73, o, OCRNL)
  161. #endif
  162. #if !defined TTYMODES_LOCAL_ONLY || defined ONOCR
  163. TTYMODE_FLAG(ONOCR, 74, o, ONOCR)
  164. #endif
  165. #if !defined TTYMODES_LOCAL_ONLY || defined ONLRET
  166. TTYMODE_FLAG(ONLRET, 75, o, ONLRET)
  167. #endif
  168. #if !defined TTYMODES_LOCAL_ONLY || defined CS7
  169. TTYMODE_FLAG(CS7, 90, c, CSIZE)
  170. #endif
  171. #if !defined TTYMODES_LOCAL_ONLY || defined CS8
  172. TTYMODE_FLAG(CS8, 91, c, CSIZE)
  173. #endif
  174. #if !defined TTYMODES_LOCAL_ONLY || defined PARENB
  175. TTYMODE_FLAG(PARENB, 92, c, PARENB)
  176. #endif
  177. #if !defined TTYMODES_LOCAL_ONLY || defined PARODD
  178. TTYMODE_FLAG(PARODD, 93, c, PARODD)
  179. #endif