setdtr(tty_fd, 1);
if (tcgetattr(tty_fd, &tios) < 0) {
- if (!ok_errno(errno))
+ if (!ok_error(errno))
fatal("tcgetattr: %m(%d)", errno);
return;
}
}
if (tcsetattr(tty_fd, TCSAFLUSH, &tios) < 0)
- if (!ok_errno(errno))
+ if (!ok_error(errno))
fatal("tcsetattr: %m");
baud_rate = baud_rate_of(speed);
SYSDEBUG ((LOG_DEBUG, "send_config: asyncmap = %lx\n", asyncmap));
if (ioctl(ppp_fd, PPPIOCSASYNCMAP, (caddr_t) &asyncmap) < 0) {
- if (!ok_errno(errno))
+ if (!ok_error(errno))
fatal("ioctl(PPPIOCSASYNCMAP): %m(%d)", errno);
return;
}
SYSDEBUG ((LOG_DEBUG, "recv_config: asyncmap = %lx\n", asyncmap));
if (ioctl(ppp_fd, PPPIOCSRASYNCMAP, (caddr_t) &asyncmap) < 0) {
- if (!ok_errno(errno))
+ if (!ok_error(errno))
error("ioctl(PPPIOCSRASYNCMAP): %m(%d)", errno);
}
/********************************************************************
*
* open_loopback - open the device we use for getting packets
- * in demand mode. Under Linux, we use our existing fd
- * to the ppp driver.
+ * in demand mode. Under Linux, we use a pty master/slave pair.
*/
int
open_ppp_loopback(void)
*/
set_kdebugflag (kdebugflag);
- return ppp_fd;
+ return master_fd;
}
/********************************************************************