]> git.ozlabs.org Git - ppp.git/commitdiff
add ccp_test
authorPaul Mackerras <paulus@samba.org>
Mon, 22 Aug 1994 00:41:00 +0000 (00:41 +0000)
committerPaul Mackerras <paulus@samba.org>
Mon, 22 Aug 1994 00:41:00 +0000 (00:41 +0000)
pppd/sys-bsd.c

index d0cd22829accd7743cdf4d3e4cd31293eae083b2..f07a3b7351b7fa8462f8d2700d3c77ff4018b56d 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-bsd.c,v 1.8 1994/08/09 06:30:38 paulus Exp $";
+static char rcsid[] = "$Id: sys-bsd.c,v 1.9 1994/08/22 00:41:00 paulus Exp $";
 #endif
 
 /*
@@ -277,6 +277,22 @@ ppp_recv_config(unit, mru, asyncmap, pcomp, accomp)
     }
 }
 
+/*
+ * ccp_test - ask kernel whether a given compression method
+ * is acceptable for use.
+ */
+ccp_test(unit, opt_ptr, opt_len, for_transmit)
+    int unit, opt_len, for_transmit;
+    u_char *opt_ptr;
+{
+    struct ppp_comp_data data;
+
+    data.ptr = opt_ptr;
+    data.length = opt_len;
+    data.transmit = for_transmit;
+    return ioctl(fd, PPPIOCSCOMPRESS, (caddr_t) &data) >= 0;
+}
+
 /*
  * ccp_flags_set - inform kernel about the current state of CCP.
  */