tcflush(3) - Linux man page
The termios functions describe a general terminal interface that is provided to control asynchronous communications ports. ... Name termios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow, cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfs...