CFGETOSPEED(3,L) AIX Technical Reference CFGETOSPEED(3,L) ------------------------------------------------------------------------------- cfgetospeed, cfsetospeed, cfgetispeed, cfsetispeed PURPOSE Get and set the input and output baud rates. LIBRARY Standard I/O Library (libc.a) SYNTAX #include <termios.h> speed_t cfgetospeed(termios_p) struct termios *termios_p; speed_t cfsetospeed(termios_p, speed) struct termios *termios_p; speed_t speed; speed_t cfgetispeed(termios_p) struct termios *termios_p; speed_t cfsetispeed(termios_p, speed) struct termios *termios_p; speed_t speed; DESCRIPTION cfgetospeed returns the output baud rate store in the termios structure to which termios_p points. cfsetospeed sets the output baud rate stored in the termios structure to which termios_p points to speed. cfgetispeed returns the input baud rate stored in the termios structure. cfsetispeed sets the input baud rate stored in the termios structure to speed. RETURN VALUE Both cfsetispeed and cfsetospeed return 0 if successful and -1 to indicate an error. ERROR CONDITIONS The cfsetispeed and cfsetospeed subroutines will fail if the following is true: Processed November 7, 1990 CFGETOSPEED(3,L) 1
CFGETOSPEED(3,L) AIX Technical Reference CFGETOSPEED(3,L) EINVAL The speed is not a valid baud rate. RELATED INFORMATION In this book, "tcgetattr, tcsetattr," "tcsendbreak, tcdrain, tcflush, tcflow," and "tcgetpgrp, tcsetpgrp." Processed November 7, 1990 CFGETOSPEED(3,L) 2