This commit was generated by cvs2svn to track changes on a CVS vendor
[unix-history] / sys / net / if_ppp.c
index f198c4f..f638445 100644 (file)
@@ -70,7 +70,7 @@
  */
 
 /*
  */
 
 /*
- *     $Id: if_ppp.c,v 1.7 1993/12/20 19:31:30 wollman Exp $
+ *     $Id: if_ppp.c,v 1.11 1994/03/23 01:58:24 ache Exp $
  *     From: if_ppp.c,v 1.22 1993/08/31 23:20:40 paulus Exp
  *     From: if_ppp.c,v 1.21 1993/08/29 11:22:37 paulus Exp
  *     From: if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp 
  *     From: if_ppp.c,v 1.22 1993/08/31 23:20:40 paulus Exp
  *     From: if_ppp.c,v 1.21 1993/08/29 11:22:37 paulus Exp
  *     From: if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp 
@@ -92,6 +92,7 @@
 #include "kernel.h"
 #include "conf.h"
 #include "dkstat.h"
 #include "kernel.h"
 #include "conf.h"
 #include "dkstat.h"
+#include "pppdefs.h"
 
 #include "if.h"
 #include "if_types.h"
 
 #include "if.h"
 #include "if_types.h"
@@ -347,7 +348,7 @@ pppread(tp, uio, flag)
     register int s;
     int error = 0;
 
     register int s;
     int error = 0;
 
-    if ((tp->t_state & TS_CARR_ON)==0)
+    if (!CAN_DO_IO(tp))
        return (EIO);
     s = splimp();
     while (sc->sc_inq.ifq_head == NULL && tp->t_line == PPPDISC) {
        return (EIO);
     s = splimp();
     while (sc->sc_inq.ifq_head == NULL && tp->t_line == PPPDISC) {
@@ -393,7 +394,7 @@ pppwrite(tp, uio, flag)
     struct ppp_header *ph1, *ph2;
     int len, error;
 
     struct ppp_header *ph1, *ph2;
     int len, error;
 
-    if ((tp->t_state & TS_CARR_ON)==0)
+    if (!CAN_DO_IO(tp))
        return (EIO);
     if (tp->t_line != PPPDISC)
        return (EINVAL);
        return (EIO);
     if (tp->t_line != PPPDISC)
        return (EINVAL);
@@ -589,7 +590,7 @@ pppoutput(ifp, m0, dst, rt)
        error = ENETDOWN;       /* sort of */
        goto bad;
     }
        error = ENETDOWN;       /* sort of */
        goto bad;
     }
-    if ((sc->sc_ttyp->t_state & TS_CARR_ON) == 0) {
+    if (!CAN_DO_IO(sc->sc_ttyp)) {
        error = EHOSTUNREACH;
        goto bad;
     }
        error = EHOSTUNREACH;
        goto bad;
     }