ioctls.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * This file is subject to the terms and conditions of the GNU General Public
  4. * License. See the file "COPYING" in the main directory of this archive
  5. * for more details.
  6. *
  7. * Copyright (C) 1995, 1996, 2001 Ralf Baechle
  8. * Copyright (C) 2001 MIPS Technologies, Inc.
  9. */
  10. #ifndef __ASM_IOCTLS_H
  11. #define __ASM_IOCTLS_H
  12. #include <asm/ioctl.h>
  13. #define TCGETA 0x5401
  14. #define TCSETA 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */
  15. #define TCSETAW 0x5403
  16. #define TCSETAF 0x5404
  17. #define TCSBRK 0x5405
  18. #define TCXONC 0x5406
  19. #define TCFLSH 0x5407
  20. #define TCGETS 0x540d
  21. #define TCSETS 0x540e
  22. #define TCSETSW 0x540f
  23. #define TCSETSF 0x5410
  24. #define TIOCEXCL 0x740d /* set exclusive use of tty */
  25. #define TIOCNXCL 0x740e /* reset exclusive use of tty */
  26. #define TIOCOUTQ 0x7472 /* output queue size */
  27. #define TIOCSTI 0x5472 /* simulate terminal input */
  28. #define TIOCMGET 0x741d /* get all modem bits */
  29. #define TIOCMBIS 0x741b /* bis modem bits */
  30. #define TIOCMBIC 0x741c /* bic modem bits */
  31. #define TIOCMSET 0x741a /* set all modem bits */
  32. #define TIOCPKT 0x5470 /* pty: set/clear packet mode */
  33. #define TIOCPKT_DATA 0x00 /* data packet */
  34. #define TIOCPKT_FLUSHREAD 0x01 /* flush packet */
  35. #define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */
  36. #define TIOCPKT_STOP 0x04 /* stop output */
  37. #define TIOCPKT_START 0x08 /* start output */
  38. #define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */
  39. #define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */
  40. #define TIOCPKT_IOCTL 0x40 /* state change of pty driver */
  41. #define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */
  42. #define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */
  43. #define TIOCNOTTY 0x5471 /* void tty association */
  44. #define TIOCSETD 0x7401
  45. #define TIOCGETD 0x7400
  46. #define FIOCLEX 0x6601
  47. #define FIONCLEX 0x6602
  48. #define FIOASYNC 0x667d
  49. #define FIONBIO 0x667e
  50. #define FIOQSIZE 0x667f
  51. #define TIOCGLTC 0x7474 /* get special local chars */
  52. #define TIOCSLTC 0x7475 /* set special local chars */
  53. #define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */
  54. #define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */
  55. #define TIOCCONS _IOW('t', 120, int) /* become virtual console */
  56. #define FIONREAD 0x467f
  57. #define TIOCINQ FIONREAD
  58. #define TIOCGETP 0x7408
  59. #define TIOCSETP 0x7409
  60. #define TIOCSETN 0x740a /* TIOCSETP wo flush */
  61. /* #define TIOCSETA _IOW('t', 20, struct termios) set termios struct */
  62. /* #define TIOCSETAW _IOW('t', 21, struct termios) drain output, set */
  63. /* #define TIOCSETAF _IOW('t', 22, struct termios) drn out, fls in, set */
  64. /* #define TIOCGETD _IOR('t', 26, int) get line discipline */
  65. /* #define TIOCSETD _IOW('t', 27, int) set line discipline */
  66. /* 127-124 compat */
  67. #define TIOCSBRK 0x5427 /* BSD compatibility */
  68. #define TIOCCBRK 0x5428 /* BSD compatibility */
  69. #define TIOCGSID 0x7416 /* Return the session ID of FD */
  70. #define TCGETS2 _IOR('T', 0x2A, struct termios2)
  71. #define TCSETS2 _IOW('T', 0x2B, struct termios2)
  72. #define TCSETSW2 _IOW('T', 0x2C, struct termios2)
  73. #define TCSETSF2 _IOW('T', 0x2D, struct termios2)
  74. #define TIOCGRS485 _IOR('T', 0x2E, struct serial_rs485)
  75. #define TIOCSRS485 _IOWR('T', 0x2F, struct serial_rs485)
  76. #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
  77. #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
  78. #define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */
  79. #define TIOCSIG _IOW('T', 0x36, int) /* Generate signal on Pty slave */
  80. #define TIOCVHANGUP 0x5437
  81. #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */
  82. #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */
  83. #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */
  84. #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */
  85. #define TIOCGISO7816 _IOR('T', 0x42, struct serial_iso7816)
  86. #define TIOCSISO7816 _IOWR('T', 0x43, struct serial_iso7816)
  87. /* I hope the range from 0x5480 on is free ... */
  88. #define TIOCSCTTY 0x5480 /* become controlling tty */
  89. #define TIOCGSOFTCAR 0x5481
  90. #define TIOCSSOFTCAR 0x5482
  91. #define TIOCLINUX 0x5483
  92. #define TIOCGSERIAL 0x5484
  93. #define TIOCSSERIAL 0x5485
  94. #define TCSBRKP 0x5486 /* Needed for POSIX tcsendbreak() */
  95. #define TIOCSERCONFIG 0x5488
  96. #define TIOCSERGWILD 0x5489
  97. #define TIOCSERSWILD 0x548a
  98. #define TIOCGLCKTRMIOS 0x548b
  99. #define TIOCSLCKTRMIOS 0x548c
  100. #define TIOCSERGSTRUCT 0x548d /* For debugging only */
  101. #define TIOCSERGETLSR 0x548e /* Get line status register */
  102. #define TIOCSERGETMULTI 0x548f /* Get multiport config */
  103. #define TIOCSERSETMULTI 0x5490 /* Set multiport config */
  104. #define TIOCMIWAIT 0x5491 /* wait for a change on serial input line(s) */
  105. #define TIOCGICOUNT 0x5492 /* read serial port inline interrupt counts */
  106. #endif /* __ASM_IOCTLS_H */