CFGETISPEED(3P) — UNIX Programmer’s Manual
NAME
cfgetispeed, cfgetospeed, cfsetispeed, cfsetospeed - (POSIX only) get and set input and output baud rates
SYNOPSIS
#include <termios.h>
speed_t cfgetispeed(const struct termios ∗termios_p);
speed_t cfgetospeed(const struct termios ∗termios_p);
int cfsetispeed(struct termios ∗termios_p, speed_t speed);
int cfsetospeed(struct termios ∗termios_p, speed_t speed);
DESCRIPTION
The information in this specification applies only to POSIX applications.
These interfaces are used for getting and setting the values of the input and output baud rates in the termios structure. The effects on the terminal device do not become effective until the tcsetattr function is successfully called.
The cfgetispeed function returns the input baud rate stored in the termios structure to which termios_p points.
The cfgetospeed function returns the output baud rate stored in the termios structure to which termios_p points.
The cfsetispeed function sets the input baud rate stored in the termios structure to which termios_p points.
The cfsetospeed function sets the output baud rate stored in the termios structure to which termios_p points.
RETURN VALUE
The cfgetispeed and cfgetospeed functions return exactly the value found in the termios data structure without interpretation.
The cfsetispeed and cfsetospeed functions return a value of zero if successful and -1 otherwise.
SEE ALSO
4th Berkeley Distribution — August 1, 1992