]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-str.c
don't need to be group kmem any more
[ppp.git] / pppd / sys-str.c
index e34d54779c6c5e361334e2b75251534e59bb1996..2dc7e968928f1571a216a2867d58c92ecfd03281 100644 (file)
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#ifndef lint
+static char rcsid[] = "$Id: sys-str.c,v 1.13 1994/09/16 02:35:42 paulus Exp $";
+#endif
+
 /*
  * TODO:
  */
@@ -383,9 +387,11 @@ set_up_tty(fd, local)
     if (!restore_term)
        inittermios = tios;
 
-    tios.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CLOCAL | CRTSCTS);
-    if (crtscts == 1)
+    tios.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CLOCAL);
+    if (crtscts > 0)
        tios.c_cflag |= CRTSCTS;
+    else if (crtscts < 0)
+       tios.c_cflag &= ~CRTSCTS;
 
     tios.c_cflag |= CS8 | CREAD | HUPCL;
     if (local || !modem)
@@ -653,6 +659,24 @@ ccp_flags_set(unit, isopen, isup)
        syslog(LOG_ERR, "ioctl (SIOCSIFCOMP): %m");
 }
 
+/*
+ * ccp_fatal_error - returns 1 if decompression was disabled as a
+ * result of an error detected after decompression of a packet,
+ * 0 otherwise.  This is necessary because of patent nonsense.
+ */
+int
+ccp_fatal_error(unit)
+    int unit;
+{
+    int x;
+
+    if (ioctl(fd, SIOCGIFCOMP, (caddr_t) &x) < 0) {
+       syslog(LOG_ERR, "ioctl(SIOCGIFCOMP): %m");
+       return 0;
+    }
+    return x & CCP_FATALERROR;
+}
+
 /*
  * sifvjcomp - config tcp header compression
  */