termios(M)
termios --
POSIX.1 general terminal interface
Syntax
#include <sys/termios.h>
Description
This entry discusses the POSIX.1 termios
extensions to the
termio(M)
interface.
See
termio(M)
for a discussion of the general terminal interface supported in the
current release.
The following library functions (defined on the
termios(S)
manual page) should be used instead of
ioctl(S):
tcgetattr-
Get attributes using a struct termios.
tcsetattr-
Set attributes using a struct termios.
cfgetispeed-
Get input line speed.
cfsetispeed-
Set input line speed.
cfgetospeed-
Get output line speed.
cfsetospeed-
Set output line speed.
tcdrain-
Wait for completion of output transmission.
tcflow-
Suspend transmit or receive.
tcflush-
Discard pending input and/or output.
tcsendbreak-
Send a BREAK character.
tcgetpgrp-
Get the ID of the foreground process group.
tcsetpgrp-
Set the ID of the foreground process group.
The functions tcgetattr and tcsetattr
use the termios structure, defined in the file
<sys/termio.h> (included by <sys/termios.h>):
#define NCCS 21
struct termios {
tcflag_t c_iflag; / input modes /
tcflag_t c_oflag; / output modes /
tcflag_t c_cflag; / control modes /
tcflag_t c_lflag; / local (line discipline) modes /
char c_line; / line discipline /
cc_t c_cc[NCCS]; / control chars /
};
For backward compatibility when the -a ods30 option is used with
cc(CP),
the following alternative version of the termios structure is
also defined:
#define NCCS 13
struct termios {
tcflag_t c_iflag; / input modes /
tcflag_t c_oflag; / output modes /
tcflag_t c_cflag; / control modes /
tcflag_t c_lflag; / local (line discipline) modes /
char c_line; / line discipline /
cc_t c_cc[NCCS]; / control chars /
char __c_xxx; / used for input baud rate for iBCS2 /
char __c_yyy; / used for output baud rate for iBCS2 /
};
Files
/usr/include/sys/termios.h-
/usr/include/sys/termio.h-
definitions for struct termios and
ioctl
commands
See also
cfgetispeed(S),
cfgetospeed(S),
cfsetispeed(S),
cfsetospeed(S),
ioctl(S),
signal(S),
stty(C),
tcdrain(S),
tcflow(S),
tcflush(S),
tcgetattr(S),
tcgetpgrp(S),
tcsendbreak(S),
tcsetattr(S),
tcsetpgrp(S),
termio(M),
termios(S),
tty(M)
Standards conformance
termios is conformant with:
ISO/IEC 99451:1990, Information technology Portable Operating System Interface (POSIX) Part 1: System Application Program Interface (API) [C Language] (IEEE Std 1003.11990);
X/Open CAE Specification, System Interfaces and Headers, Issue 4, 1992.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005