From 3fc0348f0ba4f38c5aecd96b7dccef4684bd53aa Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Fri, 16 Sep 1994 02:18:01 +0000 Subject: [PATCH] added ccp_fatal_error --- pppd/sys-str.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pppd/sys-str.c b/pppd/sys-str.c index e34d547..aed7c8e 100644 --- a/pppd/sys-str.c +++ b/pppd/sys-str.c @@ -18,6 +18,10 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#ifndef lint +static char rcsid[] = "$Id: sys-str.c,v 1.12 1994/09/16 02:18:01 paulus Exp $"; +#endif + /* * TODO: */ @@ -653,6 +657,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 */ -- 2.39.2