cfgetispeed

cfgetispeed is a Linux standard interface to get input baud rate.

See Library Functions on the Linux man-pages project for more information.