X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fsys-bsd.c;h=f07a3b7351b7fa8462f8d2700d3c77ff4018b56d;hb=31e531a04e1f20c89aef30b0744bed4eb0c1806a;hp=d0cd22829accd7743cdf4d3e4cd31293eae083b2;hpb=eff1bf74317aeed1a98d141f8cf0aec6c8756162;p=ppp.git diff --git a/pppd/sys-bsd.c b/pppd/sys-bsd.c index d0cd228..f07a3b7 100644 --- a/pppd/sys-bsd.c +++ b/pppd/sys-bsd.c @@ -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. */