]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-linux.c
add data_name to struct protent
[ppp.git] / pppd / sys-linux.c
index 3cbc78afee4808e6f58706fe5f8b05380a88e464..0ed73fd81dc0ccda2a9388207ae64ae4eb22c6d2 100644 (file)
@@ -601,7 +601,7 @@ void set_up_tty(int tty_fd, int local)
 
     setdtr(tty_fd, 1);
     if (tcgetattr(tty_fd, &tios) < 0) {
-       if (!ok_errno(errno))
+       if (!ok_error(errno))
            fatal("tcgetattr: %m(%d)", errno);
        return;
     }
@@ -656,7 +656,7 @@ void set_up_tty(int tty_fd, int local)
     }
 
     if (tcsetattr(tty_fd, TCSAFLUSH, &tios) < 0)
-       if (!ok_errno(errno))
+       if (!ok_error(errno))
            fatal("tcsetattr: %m");
     
     baud_rate    = baud_rate_of(speed);
@@ -867,7 +867,7 @@ void ppp_send_config (int unit,int mtu,u_int32_t asyncmap,int pcomp,int accomp)
        
     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;
     }
@@ -921,7 +921,7 @@ void ppp_recv_config (int unit,int mru,u_int32_t asyncmap,int pcomp,int accomp)
 
     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);
     }
 
@@ -2108,8 +2108,7 @@ int cifaddr (int unit, u_int32_t our_adr, u_int32_t his_adr)
 /********************************************************************
  *
  * 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)
@@ -2167,7 +2166,7 @@ open_ppp_loopback(void)
  */
     set_kdebugflag (kdebugflag);
 
-    return ppp_fd;
+    return master_fd;
 }
 
 /********************************************************************