| FIONREAD | Get the number of bytes in the input buffer. |
| TIOCINQ | Same as FIONREAD. |
| TIOCOUTQ | Get the number of bytes in the output buffer. |
| TCFLSH | Equivalent to tcflush(fd, arg). |
| TIOCSERGETLSR | Get line status register. Status register has TIOCSER_TEMT bit set when output buffer is empty and also hardware transmitter is physically empty. |
NAME
FIONREAD, TIOCINQ, TIOCOUTQ, TCFLSH, TIOCSERGETLSR - buffer count and flushing
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <asm/termbits.h>\n /* Definition of constants */
\n#include <sys/ioctl.h>int ioctl(int \nfd\n, FIONREAD, int *\nargp\n);\n
\nint ioctl(int \nfd\n, TIOCINQ, int *\nargp\n);\n
\nint ioctl(int \nfd\n, TIOCOUTQ, int *\nargp\n);\n
\nint ioctl(int \nfd\n, TCFLSH, int \narg\n);\n
\nint ioctl(int \nfd\n, FIONREAD, int *\nargp\n);DESCRIPTION
- FIONREAD
Get the number of bytes in the input buffer.
- TIOCINQ
Same as FIONREAD.
- TIOCOUTQ
Get the number of bytes in the output buffer.
- TCFLSH
Equivalent to tcflush(fd, arg).
See tcflush(3) for the argument values TCIFLUSH, TCOFLUSH, TCIOFLUSH.
- TIOCSERGETLSR
Get line status register. Status register has TIOCSER_TEMT bit set when output buffer is empty and also hardware transmitter is physically empty.
Does not have to be supported by all serial tty drivers.
tcdrain(3) does not wait and returns immediately when TIOCSER_TEMT bit is set.
RETURN VALUE
On success, 0 is returned. On error, -1 is returned, and errno is set to indicate the error.
SEE ALSO
ioctl(2), ioctl_tty(2), tcflush(3), termios(3)