+/*
+ * 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_option_data data;
+
+ if ((unsigned) opt_len > MAX_PPP_OPTION)
+ opt_len = MAX_PPP_OPTION;
+ data.length = opt_len;
+ data.transmit = for_transmit;
+ BCOPY(opt_ptr, data.opt_data, opt_len);
+ return ioctl(fd, SIOCSCOMPRESS, (caddr_t) &data) >= 0;
+}
+