Lines Matching refs:tty_fd
396 int tty_establish_ppp (int tty_fd) in tty_establish_ppp() argument
403 if (ioctl(tty_fd, TIOCEXCL, 0) < 0) { in tty_establish_ppp()
423 if (ioctl(tty_fd, TIOCSETD, &ppp_disc) < 0) { in tty_establish_ppp()
430 ret_fd = generic_establish_ppp(tty_fd); in tty_establish_ppp()
440 if (ioctl(tty_fd, TIOCSETD, &tty_disc) < 0 && !ok_error(errno)) in tty_establish_ppp()
548 void tty_disestablish_ppp(int tty_fd) in tty_disestablish_ppp() argument
554 if (tcflush(tty_fd, TCIOFLUSH) < 0) in tty_disestablish_ppp()
562 if (ioctl(tty_fd, TIOCSETD, &tty_disc) < 0) { in tty_disestablish_ppp()
567 if (ioctl(tty_fd, TIOCNXCL, 0) < 0) { in tty_disestablish_ppp()
573 if (initfdflags != -1 && fcntl(tty_fd, F_SETFL, initfdflags) < 0) { in tty_disestablish_ppp()
581 generic_disestablish_ppp(tty_fd); in tty_disestablish_ppp()
901 void set_up_tty(int tty_fd, int local) in set_up_tty() argument
906 setdtr(tty_fd, 1); in set_up_tty()
907 if (tcgetattr(tty_fd, &tios) < 0) { in set_up_tty()
962 while (tcsetattr(tty_fd, TCSAFLUSH, &tios) < 0 && !ok_error(errno)) in set_up_tty()
976 void setdtr (int tty_fd, int on) in setdtr() argument
980 ioctl(tty_fd, (on ? TIOCMBIS : TIOCMBIC), &modembits); in setdtr()
988 void restore_tty (int tty_fd) in restore_tty() argument
1001 if (tcsetattr(tty_fd, TCSAFLUSH, &inittermios) < 0) { in restore_tty()