HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
c
cfspeed(3C) cfspeed(3C)
NAME
cfgetospeed(), cfsetospeed(), cfgetispeed(), cfsetispeed() - tty baud rate functions
SYNOPSIS
#include <termios.h>
speed_t cfgetospeed(const struct termios *termios_p);
int cfsetospeed(struct termios *termios_p, speed_t speed);
speed_t cfgetispeed(const struct termios *termios_p);
int cfsetispeed(struct termios *termios_p, speed_t speed);
DESCRIPTION
These functions set and get the input and output speed codes in the termios structure referenced by
termios_p. The termios structure contains these speed codes representing input and output baud rates as
well as other terminal related parameters. Setting the parameters on a terminal file does not become
effective until tcsetattr() is successfully called.
cfgetospeed() returns the output speed code from the termios structure referenced by
termios_p.
cfsetospeed() sets the output speed code in the termios structure referenced by termios_p to
speed. The speed code for a baud rate of zero, B0, is used to terminate the con-
nection. If B0 is specified, the modem control lines are no longer asserted,
which normally disconnects the line.
cfgetispeed() returns the input speed code from the termios structure referenced by termios_p.
cfsetispeed() sets the input speed code in the termios structure referenced by termios_p to
speed.
APPLICATION USAGE
cfgetospeed( ), cfsetospeed( )
, cfgetispeed( ) and cfsetispeed( )
are thread-safe and
async-cancel-safe.
RETURN VALUE
cfgetospeed() returns the output speed code from the termios structure referenced by termios_p.
cfgetispeed() returns the input speed code from the termios structure referenced by termios_p.
cfsetispeed() and cfsetospeed()
return zero upon successful completion. Otherwise, they
return -1 and set
errno to indicate the error.
ERRORS
cfsetispeed() and cfsetospeed() fail when the following condition is encountered:
[EINVAL] The value of speed is outside the range of possible speed codes as specified in
<termios.h>.
WARNINGS
cfsetispeed() and cfsetospeed()
can be used to set speed codes in the termios structure that
are not supported by the terminal hardware.
SEE ALSO
tcattribute(3C), termio(7).
STANDARDS CONFORMANCE
cfgetispeed(): AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1
cfgetospeed(): AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1
cfsetispeed(): AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1
cfsetospeed(): AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1
HP-UX Release 11i: December 2000 1 Section 365
___
___