ioctls.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #ifndef __ASM_GENERIC_IOCTLS_H
  2. #define __ASM_GENERIC_IOCTLS_H
  3. #include <linux/ioctl.h>
  4. /*
  5. * These are the most common definitions for tty ioctl numbers.
  6. * Most of them do not use the recommended _IOC(), but there is
  7. * probably some source code out there hardcoding the number,
  8. * so we might as well use them for all new platforms.
  9. *
  10. * The architectures that use different values here typically
  11. * try to be compatible with some Unix variants for the same
  12. * architecture.
  13. */
  14. /* 0x54 is just a magic number to make these relatively unique ('T') */
  15. #define TCGETS 0x5401
  16. #define TCSETS 0x5402
  17. #define TCSETSW 0x5403
  18. #define TCSETSF 0x5404
  19. #define TCGETA 0x5405
  20. #define TCSETA 0x5406
  21. #define TCSETAW 0x5407
  22. #define TCSETAF 0x5408
  23. #define TCSBRK 0x5409
  24. #define TCXONC 0x540A
  25. #define TCFLSH 0x540B
  26. #define TIOCEXCL 0x540C
  27. #define TIOCNXCL 0x540D
  28. #define TIOCSCTTY 0x540E
  29. #define TIOCGPGRP 0x540F
  30. #define TIOCSPGRP 0x5410
  31. #define TIOCOUTQ 0x5411
  32. #define TIOCSTI 0x5412
  33. #define TIOCGWINSZ 0x5413
  34. #define TIOCSWINSZ 0x5414
  35. #define TIOCMGET 0x5415
  36. #define TIOCMBIS 0x5416
  37. #define TIOCMBIC 0x5417
  38. #define TIOCMSET 0x5418
  39. #define TIOCGSOFTCAR 0x5419
  40. #define TIOCSSOFTCAR 0x541A
  41. #define FIONREAD 0x541B
  42. #define TIOCINQ FIONREAD
  43. #define TIOCLINUX 0x541C
  44. #define TIOCCONS 0x541D
  45. #define TIOCGSERIAL 0x541E
  46. #define TIOCSSERIAL 0x541F
  47. #define TIOCPKT 0x5420
  48. #define FIONBIO 0x5421
  49. #define TIOCNOTTY 0x5422
  50. #define TIOCSETD 0x5423
  51. #define TIOCGETD 0x5424
  52. #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
  53. #define TIOCSBRK 0x5427 /* BSD compatibility */
  54. #define TIOCCBRK 0x5428 /* BSD compatibility */
  55. #define TIOCGSID 0x5429 /* Return the session ID of FD */
  56. #define TCGETS2 _IOR('T', 0x2A, struct termios2)
  57. #define TCSETS2 _IOW('T', 0x2B, struct termios2)
  58. #define TCSETSW2 _IOW('T', 0x2C, struct termios2)
  59. #define TCSETSF2 _IOW('T', 0x2D, struct termios2)
  60. #define TIOCGRS485 0x542E
  61. #ifndef TIOCSRS485
  62. #define TIOCSRS485 0x542F
  63. #endif
  64. #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
  65. #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
  66. #define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */
  67. #define TCGETX 0x5432 /* SYS5 TCGETX compatibility */
  68. #define TCSETX 0x5433
  69. #define TCSETXF 0x5434
  70. #define TCSETXW 0x5435
  71. #define TIOCSIG _IOW('T', 0x36, int) /* pty: generate signal */
  72. #define TIOCVHANGUP 0x5437
  73. #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */
  74. #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */
  75. #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */
  76. #define FIONCLEX 0x5450
  77. #define FIOCLEX 0x5451
  78. #define FIOASYNC 0x5452
  79. #define TIOCSERCONFIG 0x5453
  80. #define TIOCSERGWILD 0x5454
  81. #define TIOCSERSWILD 0x5455
  82. #define TIOCGLCKTRMIOS 0x5456
  83. #define TIOCSLCKTRMIOS 0x5457
  84. #define TIOCSERGSTRUCT 0x5458 /* For debugging only */
  85. #define TIOCSERGETLSR 0x5459 /* Get line status register */
  86. #define TIOCSERGETMULTI 0x545A /* Get multiport config */
  87. #define TIOCSERSETMULTI 0x545B /* Set multiport config */
  88. #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
  89. #define TIOCGICOUNT 0x545D /* read serial port __inline__ interrupt counts */
  90. /*
  91. * Some arches already define FIOQSIZE due to a historical
  92. * conflict with a Hayes modem-specific ioctl value.
  93. */
  94. #ifndef FIOQSIZE
  95. # define FIOQSIZE 0x5460
  96. #endif
  97. /* Used for packet mode */
  98. #define TIOCPKT_DATA 0
  99. #define TIOCPKT_FLUSHREAD 1
  100. #define TIOCPKT_FLUSHWRITE 2
  101. #define TIOCPKT_STOP 4
  102. #define TIOCPKT_START 8
  103. #define TIOCPKT_NOSTOP 16
  104. #define TIOCPKT_DOSTOP 32
  105. #define TIOCPKT_IOCTL 64
  106. #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
  107. #endif /* __ASM_GENERIC_IOCTLS_H */