Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef __ASM_GENERIC_IOCTLS_H
0003 #define __ASM_GENERIC_IOCTLS_H
0004 
0005 #include <linux/ioctl.h>
0006 
0007 /*
0008  * These are the most common definitions for tty ioctl numbers.
0009  * Most of them do not use the recommended _IOC(), but there is
0010  * probably some source code out there hardcoding the number,
0011  * so we might as well use them for all new platforms.
0012  *
0013  * The architectures that use different values here typically
0014  * try to be compatible with some Unix variants for the same
0015  * architecture.
0016  */
0017 
0018 /* 0x54 is just a magic number to make these relatively unique ('T') */
0019 
0020 #define TCGETS      0x5401
0021 #define TCSETS      0x5402
0022 #define TCSETSW     0x5403
0023 #define TCSETSF     0x5404
0024 #define TCGETA      0x5405
0025 #define TCSETA      0x5406
0026 #define TCSETAW     0x5407
0027 #define TCSETAF     0x5408
0028 #define TCSBRK      0x5409
0029 #define TCXONC      0x540A
0030 #define TCFLSH      0x540B
0031 #define TIOCEXCL    0x540C
0032 #define TIOCNXCL    0x540D
0033 #define TIOCSCTTY   0x540E
0034 #define TIOCGPGRP   0x540F
0035 #define TIOCSPGRP   0x5410
0036 #define TIOCOUTQ    0x5411
0037 #define TIOCSTI     0x5412
0038 #define TIOCGWINSZ  0x5413
0039 #define TIOCSWINSZ  0x5414
0040 #define TIOCMGET    0x5415
0041 #define TIOCMBIS    0x5416
0042 #define TIOCMBIC    0x5417
0043 #define TIOCMSET    0x5418
0044 #define TIOCGSOFTCAR    0x5419
0045 #define TIOCSSOFTCAR    0x541A
0046 #define FIONREAD    0x541B
0047 #define TIOCINQ     FIONREAD
0048 #define TIOCLINUX   0x541C
0049 #define TIOCCONS    0x541D
0050 #define TIOCGSERIAL 0x541E
0051 #define TIOCSSERIAL 0x541F
0052 #define TIOCPKT     0x5420
0053 #define FIONBIO     0x5421
0054 #define TIOCNOTTY   0x5422
0055 #define TIOCSETD    0x5423
0056 #define TIOCGETD    0x5424
0057 #define TCSBRKP     0x5425  /* Needed for POSIX tcsendbreak() */
0058 #define TIOCSBRK    0x5427  /* BSD compatibility */
0059 #define TIOCCBRK    0x5428  /* BSD compatibility */
0060 #define TIOCGSID    0x5429  /* Return the session ID of FD */
0061 #define TCGETS2     _IOR('T', 0x2A, struct termios2)
0062 #define TCSETS2     _IOW('T', 0x2B, struct termios2)
0063 #define TCSETSW2    _IOW('T', 0x2C, struct termios2)
0064 #define TCSETSF2    _IOW('T', 0x2D, struct termios2)
0065 #define TIOCGRS485  0x542E
0066 #ifndef TIOCSRS485
0067 #define TIOCSRS485  0x542F
0068 #endif
0069 #define TIOCGPTN    _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
0070 #define TIOCSPTLCK  _IOW('T', 0x31, int)  /* Lock/unlock Pty */
0071 #define TIOCGDEV    _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */
0072 #define TCGETX      0x5432 /* SYS5 TCGETX compatibility */
0073 #define TCSETX      0x5433
0074 #define TCSETXF     0x5434
0075 #define TCSETXW     0x5435
0076 #define TIOCSIG     _IOW('T', 0x36, int)  /* pty: generate signal */
0077 #define TIOCVHANGUP 0x5437
0078 #define TIOCGPKT    _IOR('T', 0x38, int) /* Get packet mode state */
0079 #define TIOCGPTLCK  _IOR('T', 0x39, int) /* Get Pty lock state */
0080 #define TIOCGEXCL   _IOR('T', 0x40, int) /* Get exclusive mode state */
0081 #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */
0082 #define TIOCGISO7816    _IOR('T', 0x42, struct serial_iso7816)
0083 #define TIOCSISO7816    _IOWR('T', 0x43, struct serial_iso7816)
0084 
0085 #define FIONCLEX    0x5450
0086 #define FIOCLEX     0x5451
0087 #define FIOASYNC    0x5452
0088 #define TIOCSERCONFIG   0x5453
0089 #define TIOCSERGWILD    0x5454
0090 #define TIOCSERSWILD    0x5455
0091 #define TIOCGLCKTRMIOS  0x5456
0092 #define TIOCSLCKTRMIOS  0x5457
0093 #define TIOCSERGSTRUCT  0x5458 /* For debugging only */
0094 #define TIOCSERGETLSR   0x5459 /* Get line status register */
0095 #define TIOCSERGETMULTI 0x545A /* Get multiport config  */
0096 #define TIOCSERSETMULTI 0x545B /* Set multiport config */
0097 
0098 #define TIOCMIWAIT  0x545C  /* wait for a change on serial input line(s) */
0099 #define TIOCGICOUNT 0x545D  /* read serial port inline interrupt counts */
0100 
0101 /*
0102  * Some arches already define FIOQSIZE due to a historical
0103  * conflict with a Hayes modem-specific ioctl value.
0104  */
0105 #ifndef FIOQSIZE
0106 # define FIOQSIZE   0x5460
0107 #endif
0108 
0109 /* Used for packet mode */
0110 #define TIOCPKT_DATA         0
0111 #define TIOCPKT_FLUSHREAD    1
0112 #define TIOCPKT_FLUSHWRITE   2
0113 #define TIOCPKT_STOP         4
0114 #define TIOCPKT_START        8
0115 #define TIOCPKT_NOSTOP      16
0116 #define TIOCPKT_DOSTOP      32
0117 #define TIOCPKT_IOCTL       64
0118 
0119 #define TIOCSER_TEMT    0x01    /* Transmitter physically empty */
0120 
0121 #endif /* __ASM_GENERIC_IOCTLS_H */