]> git.ozlabs.org Git - ppp.git/blob - linux/ppp_deflate.c
Repaired bad LCP Configure-Nak generated to request EAP instead of PAP.
[ppp.git] / linux / ppp_deflate.c
1 /*
2  *  ==FILEVERSION 980319==
3  *
4  * ppp_deflate.c - interface the zlib procedures for Deflate compression
5  * and decompression (as used by gzip) to the PPP code.
6  * This version is for use with Linux kernel 1.3.X and later.
7  *
8  * Copyright (c) 1994 Paul Mackerras. All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  *
14  * 1. Redistributions of source code must retain the above copyright
15  *    notice, this list of conditions and the following disclaimer.
16  *
17  * 2. Redistributions in binary form must reproduce the above copyright
18  *    notice, this list of conditions and the following disclaimer in
19  *    the documentation and/or other materials provided with the
20  *    distribution.
21  *
22  * 3. The name(s) of the authors of this software must not be used to
23  *    endorse or promote products derived from this software without
24  *    prior written permission.
25  *
26  * 4. Redistributions of any form whatsoever must retain the following
27  *    acknowledgment:
28  *    "This product includes software developed by Paul Mackerras
29  *     <paulus@samba.org>".
30  *
31  * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
32  * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
33  * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
34  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
35  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
36  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
37  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
38  *
39  * From: deflate.c,v 1.1 1996/01/18 03:17:48 paulus Exp
40  */
41
42 #include <linux/module.h>
43 #include <linux/version.h>
44 #include <linux/kernel.h>
45 #include <linux/sched.h>
46 #include <linux/types.h>
47 #include <linux/fcntl.h>
48 #include <linux/interrupt.h>
49 #include <linux/ptrace.h>
50 #include <linux/ioport.h>
51 #include <linux/in.h>
52 #include <linux/malloc.h>
53
54 #undef VERSION
55 /* a nice define to generate linux version numbers */
56 #define VERSION(major,minor,patch) (((((major)<<8)+(minor))<<8)+(patch))
57
58 #if LINUX_VERSION_CODE >= VERSION(2,1,4)
59 #include <linux/vmalloc.h>
60 #endif
61
62 #include <linux/errno.h>
63 #include <linux/sched.h>        /* to get the struct task_struct */
64 #include <linux/string.h>       /* used in new tty drivers */
65 #include <linux/signal.h>       /* used in new tty drivers */
66
67 #include <asm/system.h>
68
69 #include <linux/netdevice.h>
70 #include <linux/skbuff.h>
71 #include <linux/inet.h>
72 #include <linux/ioctl.h>
73
74 #include <linux/ppp_defs.h>
75 #include <linux/ppp-comp.h>
76
77 #include "zlib.c"
78
79 /*
80  * State for a Deflate (de)compressor.
81  */
82 struct ppp_deflate_state {
83     int         seqno;
84     int         w_size;
85     int         unit;
86     int         mru;
87     int         debug;
88     z_stream    strm;
89     struct compstat stats;
90 };
91
92 #define DEFLATE_OVHD    2               /* Deflate overhead/packet */
93
94 static void     *zalloc __P((void *, unsigned int items, unsigned int size));
95 static void     *zalloc_init __P((void *, unsigned int items,
96                                   unsigned int size));
97 static void     zfree __P((void *, void *ptr));
98 static void     *z_comp_alloc __P((unsigned char *options, int opt_len));
99 static void     *z_decomp_alloc __P((unsigned char *options, int opt_len));
100 static void     z_comp_free __P((void *state));
101 static void     z_decomp_free __P((void *state));
102 static int      z_comp_init __P((void *state, unsigned char *options,
103                                  int opt_len,
104                                  int unit, int hdrlen, int debug));
105 static int      z_decomp_init __P((void *state, unsigned char *options,
106                                    int opt_len,
107                                    int unit, int hdrlen, int mru, int debug));
108 static int      z_compress __P((void *state, unsigned char *rptr,
109                                 unsigned char *obuf,
110                                 int isize, int osize));
111 static void     z_incomp __P((void *state, unsigned char *ibuf, int icnt));
112 static int      z_decompress __P((void *state, unsigned char *ibuf,
113                                 int isize, unsigned char *obuf, int osize));
114 static void     z_comp_reset __P((void *state));
115 static void     z_decomp_reset __P((void *state));
116 static void     z_comp_stats __P((void *state, struct compstat *stats));
117
118 struct chunk_header {
119         int valloced;           /* allocated with valloc, not kmalloc */
120         int guard;              /* check for overwritten header */
121 };
122
123 #define GUARD_MAGIC     0x77a8011a
124 #define MIN_VMALLOC     2048    /* use kmalloc for blocks < this */
125
126 /*
127  * Space allocation and freeing routines for use by zlib routines.
128  */
129 void
130 zfree(arg, ptr)
131     void *arg;
132     void *ptr;
133 {
134         struct chunk_header *hdr = ((struct chunk_header *)ptr) - 1;
135
136         if (hdr->guard != GUARD_MAGIC) {
137                 printk(KERN_WARNING "zfree: header corrupted (%x %x) at %p\n",
138                        hdr->valloced, hdr->guard, hdr);
139                 return;
140         }
141         if (hdr->valloced)
142                 vfree(hdr);
143         else
144                 kfree(hdr);
145 }
146
147 void *
148 zalloc(arg, items, size)
149     void *arg;
150     unsigned int items, size;
151 {
152         struct chunk_header *hdr;
153         unsigned nbytes;
154
155         nbytes = items * size + sizeof(*hdr);
156         hdr = kmalloc(nbytes, GFP_ATOMIC);
157         if (hdr == 0)
158                 return 0;
159         hdr->valloced = 0;
160         hdr->guard = GUARD_MAGIC;
161         return (void *) (hdr + 1);
162 }
163
164 void *
165 zalloc_init(arg, items, size)
166     void *arg;
167     unsigned int items, size;
168 {
169         struct chunk_header *hdr;
170         unsigned nbytes;
171
172         nbytes = items * size + sizeof(*hdr);
173         if (nbytes >= MIN_VMALLOC)
174                 hdr = vmalloc(nbytes);
175         else
176                 hdr = kmalloc(nbytes, GFP_KERNEL);
177         if (hdr == 0)
178                 return 0;
179         hdr->valloced = nbytes >= MIN_VMALLOC;
180         hdr->guard = GUARD_MAGIC;
181         return (void *) (hdr + 1);
182 }
183
184 static void
185 z_comp_free(arg)
186     void *arg;
187 {
188         struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
189
190         if (state) {
191                 deflateEnd(&state->strm);
192                 kfree(state);
193                 MOD_DEC_USE_COUNT;
194         }
195 }
196
197 /*
198  * Allocate space for a compressor.
199  */
200 static void *
201 z_comp_alloc(options, opt_len)
202     unsigned char *options;
203     int opt_len;
204 {
205         struct ppp_deflate_state *state;
206         int w_size;
207
208         if (opt_len != CILEN_DEFLATE
209             || (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT)
210             || options[1] != CILEN_DEFLATE
211             || DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL
212             || options[3] != DEFLATE_CHK_SEQUENCE)
213                 return NULL;
214         w_size = DEFLATE_SIZE(options[2]);
215         if (w_size < DEFLATE_MIN_SIZE || w_size > DEFLATE_MAX_SIZE)
216                 return NULL;
217
218         state = (struct ppp_deflate_state *) kmalloc(sizeof(*state), GFP_KERNEL);
219         if (state == NULL)
220                 return NULL;
221
222         MOD_INC_USE_COUNT;
223         memset (state, 0, sizeof (struct ppp_deflate_state));
224         state->strm.next_in = NULL;
225         state->strm.zalloc  = zalloc_init;
226         state->strm.zfree   = zfree;
227         state->w_size       = w_size;
228
229         if (deflateInit2(&state->strm, Z_DEFAULT_COMPRESSION,
230                          DEFLATE_METHOD_VAL, -w_size, 8, Z_DEFAULT_STRATEGY)
231             != Z_OK)
232                 goto out_free;
233         state->strm.zalloc = zalloc;
234         return (void *) state;
235
236 out_free:
237         z_comp_free(state);
238         MOD_DEC_USE_COUNT;
239         return NULL;
240 }
241
242 static int
243 z_comp_init(arg, options, opt_len, unit, hdrlen, debug)
244     void *arg;
245     unsigned char *options;
246     int opt_len, unit, hdrlen, debug;
247 {
248         struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
249
250         if (opt_len < CILEN_DEFLATE
251             || (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT)
252             || options[1] != CILEN_DEFLATE
253             || DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL
254             || DEFLATE_SIZE(options[2]) != state->w_size
255             || options[3] != DEFLATE_CHK_SEQUENCE)
256                 return 0;
257
258         state->seqno = 0;
259         state->unit  = unit;
260         state->debug = debug;
261
262         deflateReset(&state->strm);
263
264         return 1;
265 }
266
267 static void
268 z_comp_reset(arg)
269     void *arg;
270 {
271         struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
272
273         state->seqno = 0;
274         deflateReset(&state->strm);
275 }
276
277 int
278 z_compress(arg, rptr, obuf, isize, osize)
279     void *arg;
280     unsigned char *rptr;        /* uncompressed packet (in) */
281     unsigned char *obuf;        /* compressed packet (out) */
282     int isize, osize;
283 {
284         struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
285         int r, proto, off, olen, oavail;
286         unsigned char *wptr;
287
288         /*
289          * Check that the protocol is in the range we handle.
290          */
291         proto = PPP_PROTOCOL(rptr);
292         if (proto > 0x3fff || proto == 0xfd || proto == 0xfb)
293                 return 0;
294
295         /* Don't generate compressed packets which are larger than
296            the uncompressed packet. */
297         if (osize > isize)
298                 osize = isize;
299
300         wptr = obuf;
301
302         /*
303          * Copy over the PPP header and store the 2-byte sequence number.
304          */
305         wptr[0] = PPP_ADDRESS(rptr);
306         wptr[1] = PPP_CONTROL(rptr);
307         wptr[2] = PPP_COMP >> 8;
308         wptr[3] = PPP_COMP;
309         wptr += PPP_HDRLEN;
310         wptr[0] = state->seqno >> 8;
311         wptr[1] = state->seqno;
312         wptr += DEFLATE_OVHD;
313         olen = PPP_HDRLEN + DEFLATE_OVHD;
314         state->strm.next_out = wptr;
315         state->strm.avail_out = oavail = osize - olen;
316         ++state->seqno;
317
318         off = (proto > 0xff) ? 2 : 3;   /* skip 1st proto byte if 0 */
319         rptr += off;
320         state->strm.next_in = rptr;
321         state->strm.avail_in = (isize - off);
322
323         for (;;) {
324                 r = deflate(&state->strm, Z_PACKET_FLUSH);
325                 if (r != Z_OK) {
326                         if (state->debug)
327                                 printk(KERN_ERR
328                                        "z_compress: deflate returned %d\n", r);
329                         break;
330                 }
331                 if (state->strm.avail_out == 0) {
332                         olen += oavail;
333                         state->strm.next_out = NULL;
334                         state->strm.avail_out = oavail = 1000000;
335                 } else {
336                         break;          /* all done */
337                 }
338         }
339         olen += oavail - state->strm.avail_out;
340
341         /*
342          * See if we managed to reduce the size of the packet.
343          */
344         if (olen < isize) {
345                 state->stats.comp_bytes += olen;
346                 state->stats.comp_packets++;
347         } else {
348                 state->stats.inc_bytes += isize;
349                 state->stats.inc_packets++;
350                 olen = 0;
351         }
352         state->stats.unc_bytes += isize;
353         state->stats.unc_packets++;
354
355         return olen;
356 }
357
358 static void
359 z_comp_stats(arg, stats)
360     void *arg;
361     struct compstat *stats;
362 {
363         struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
364
365         *stats = state->stats;
366 }
367
368 static void
369 z_decomp_free(arg)
370     void *arg;
371 {
372         struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
373
374         if (state) {
375                 inflateEnd(&state->strm);
376                 kfree(state);
377                 MOD_DEC_USE_COUNT;
378         }
379 }
380
381 /*
382  * Allocate space for a decompressor.
383  */
384 static void *
385 z_decomp_alloc(options, opt_len)
386     unsigned char *options;
387     int opt_len;
388 {
389         struct ppp_deflate_state *state;
390         int w_size;
391
392         if (opt_len != CILEN_DEFLATE
393             || (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT)
394             || options[1] != CILEN_DEFLATE
395             || DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL
396             || options[3] != DEFLATE_CHK_SEQUENCE)
397                 return NULL;
398         w_size = DEFLATE_SIZE(options[2]);
399         if (w_size < DEFLATE_MIN_SIZE || w_size > DEFLATE_MAX_SIZE)
400                 return NULL;
401
402         state = (struct ppp_deflate_state *) kmalloc(sizeof(*state), GFP_KERNEL);
403         if (state == NULL)
404                 return NULL;
405
406         MOD_INC_USE_COUNT;
407         memset (state, 0, sizeof (struct ppp_deflate_state));
408         state->w_size        = w_size;
409         state->strm.next_out = NULL;
410         state->strm.zalloc   = zalloc_init;
411         state->strm.zfree    = zfree;
412
413         if (inflateInit2(&state->strm, -w_size) != Z_OK)
414                 goto out_free;
415         state->strm.zalloc = zalloc;
416         return (void *) state;
417
418 out_free:
419         z_decomp_free(state);
420         MOD_DEC_USE_COUNT;
421         return NULL;
422 }
423
424 static int
425 z_decomp_init(arg, options, opt_len, unit, hdrlen, mru, debug)
426     void *arg;
427     unsigned char *options;
428     int opt_len, unit, hdrlen, mru, debug;
429 {
430         struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
431
432         if (opt_len < CILEN_DEFLATE
433             || (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT)
434             || options[1] != CILEN_DEFLATE
435             || DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL
436             || DEFLATE_SIZE(options[2]) != state->w_size
437             || options[3] != DEFLATE_CHK_SEQUENCE)
438                 return 0;
439
440         state->seqno = 0;
441         state->unit  = unit;
442         state->debug = debug;
443         state->mru   = mru;
444
445         inflateReset(&state->strm);
446
447         return 1;
448 }
449
450 static void
451 z_decomp_reset(arg)
452     void *arg;
453 {
454         struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
455
456         state->seqno = 0;
457         inflateReset(&state->strm);
458 }
459
460 /*
461  * Decompress a Deflate-compressed packet.
462  *
463  * Because of patent problems, we return DECOMP_ERROR for errors
464  * found by inspecting the input data and for system problems, but
465  * DECOMP_FATALERROR for any errors which could possibly be said to
466  * be being detected "after" decompression.  For DECOMP_ERROR,
467  * we can issue a CCP reset-request; for DECOMP_FATALERROR, we may be
468  * infringing a patent of Motorola's if we do, so we take CCP down
469  * instead.
470  *
471  * Given that the frame has the correct sequence number and a good FCS,
472  * errors such as invalid codes in the input most likely indicate a
473  * bug, so we return DECOMP_FATALERROR for them in order to turn off
474  * compression, even though they are detected by inspecting the input.
475  */
476 int
477 z_decompress(arg, ibuf, isize, obuf, osize)
478     void *arg;
479     unsigned char *ibuf;
480     int isize;
481     unsigned char *obuf;
482     int osize;
483 {
484         struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
485         int olen, seq, r;
486         int decode_proto, overflow;
487         unsigned char overflow_buf[1];
488
489         if (isize <= PPP_HDRLEN + DEFLATE_OVHD) {
490                 if (state->debug)
491                         printk(KERN_DEBUG "z_decompress%d: short pkt (%d)\n",
492                                state->unit, isize);
493                 return DECOMP_ERROR;
494         }
495
496         /* Check the sequence number. */
497         seq = (ibuf[PPP_HDRLEN] << 8) + ibuf[PPP_HDRLEN+1];
498         if (seq != state->seqno) {
499                 if (state->debug)
500                         printk(KERN_DEBUG "z_decompress%d: bad seq # %d, expected %d\n",
501                                state->unit, seq, state->seqno);
502                 return DECOMP_ERROR;
503         }
504         ++state->seqno;
505
506         /*
507          * Fill in the first part of the PPP header.  The protocol field
508          * comes from the decompressed data.
509          */
510         obuf[0] = PPP_ADDRESS(ibuf);
511         obuf[1] = PPP_CONTROL(ibuf);
512         obuf[2] = 0;
513
514         /*
515          * Set up to call inflate.  We set avail_out to 1 initially so we can
516          * look at the first byte of the output and decide whether we have
517          * a 1-byte or 2-byte protocol field.
518          */
519         state->strm.next_in = ibuf + PPP_HDRLEN + DEFLATE_OVHD;
520         state->strm.avail_in = isize - (PPP_HDRLEN + DEFLATE_OVHD);
521         state->strm.next_out = obuf + 3;
522         state->strm.avail_out = 1;
523         decode_proto = 1;
524         overflow = 0;
525
526         /*
527          * Call inflate, supplying more input or output as needed.
528          */
529         for (;;) {
530                 r = inflate(&state->strm, Z_PACKET_FLUSH);
531                 if (r != Z_OK) {
532                         if (state->debug)
533                                 printk(KERN_DEBUG "z_decompress%d: inflate returned %d (%s)\n",
534                                        state->unit, r, (state->strm.msg? state->strm.msg: ""));
535                         return DECOMP_FATALERROR;
536                 }
537                 if (state->strm.avail_out != 0)
538                         break;          /* all done */
539                 if (decode_proto) {
540                         state->strm.avail_out = osize - PPP_HDRLEN;
541                         if ((obuf[3] & 1) == 0) {
542                                 /* 2-byte protocol field */
543                                 obuf[2] = obuf[3];
544                                 --state->strm.next_out;
545                                 ++state->strm.avail_out;
546                         }
547                         decode_proto = 0;
548                 } else if (!overflow) {
549                         /*
550                          * We've filled up the output buffer; the only way to
551                          * find out whether inflate has any more characters
552                          * left is to give it another byte of output space.
553                          */
554                         state->strm.next_out = overflow_buf;
555                         state->strm.avail_out = 1;
556                         overflow = 1;
557                 } else {
558                         if (state->debug)
559                                 printk(KERN_DEBUG "z_decompress%d: ran out of mru\n",
560                                        state->unit);
561                         return DECOMP_FATALERROR;
562                 }
563         }
564
565         if (decode_proto) {
566                 if (state->debug)
567                         printk(KERN_DEBUG "z_decompress%d: didn't get proto\n",
568                                state->unit);
569                 return DECOMP_ERROR;
570         }
571
572         olen = osize + overflow - state->strm.avail_out;
573         state->stats.unc_bytes += olen;
574         state->stats.unc_packets++;
575         state->stats.comp_bytes += isize;
576         state->stats.comp_packets++;
577
578         return olen;
579 }
580
581 /*
582  * Incompressible data has arrived - add it to the history.
583  */
584 static void
585 z_incomp(arg, ibuf, icnt)
586     void *arg;
587     unsigned char *ibuf;
588     int icnt;
589 {
590         struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
591         int proto, r;
592
593         /*
594          * Check that the protocol is one we handle.
595          */
596         proto = PPP_PROTOCOL(ibuf);
597         if (proto > 0x3fff || proto == 0xfd || proto == 0xfb)
598                 return;
599
600         ++state->seqno;
601
602         /*
603          * We start at the either the 1st or 2nd byte of the protocol field,
604          * depending on whether the protocol value is compressible.
605          */
606         state->strm.next_in = ibuf + 3;
607         state->strm.avail_in = icnt - 3;
608         if (proto > 0xff) {
609                 --state->strm.next_in;
610                 ++state->strm.avail_in;
611         }
612
613         r = inflateIncomp(&state->strm);
614         if (r != Z_OK) {
615                 /* gak! */
616                 if (state->debug) {
617                         printk(KERN_DEBUG "z_incomp%d: inflateIncomp returned %d (%s)\n",
618                                state->unit, r, (state->strm.msg? state->strm.msg: ""));
619                 }
620                 return;
621         }
622
623         /*
624          * Update stats.
625          */
626         state->stats.inc_bytes += icnt;
627         state->stats.inc_packets++;
628         state->stats.unc_bytes += icnt;
629         state->stats.unc_packets++;
630 }
631
632 /*************************************************************
633  * Module interface table
634  *************************************************************/
635
636 /* These are in ppp.c */
637 extern int  ppp_register_compressor   (struct compressor *cp);
638 extern void ppp_unregister_compressor (struct compressor *cp);
639
640 /*
641  * Procedures exported to if_ppp.c.
642  */
643 struct compressor ppp_deflate = {
644         CI_DEFLATE,             /* compress_proto */
645         z_comp_alloc,           /* comp_alloc */
646         z_comp_free,            /* comp_free */
647         z_comp_init,            /* comp_init */
648         z_comp_reset,           /* comp_reset */
649         z_compress,             /* compress */
650         z_comp_stats,           /* comp_stat */
651         z_decomp_alloc,         /* decomp_alloc */
652         z_decomp_free,          /* decomp_free */
653         z_decomp_init,          /* decomp_init */
654         z_decomp_reset,         /* decomp_reset */
655         z_decompress,           /* decompress */
656         z_incomp,               /* incomp */
657         z_comp_stats,           /* decomp_stat */
658 };
659
660 struct compressor ppp_deflate_draft = {
661         CI_DEFLATE_DRAFT,       /* compress_proto */
662         z_comp_alloc,           /* comp_alloc */
663         z_comp_free,            /* comp_free */
664         z_comp_init,            /* comp_init */
665         z_comp_reset,           /* comp_reset */
666         z_compress,             /* compress */
667         z_comp_stats,           /* comp_stat */
668         z_decomp_alloc,         /* decomp_alloc */
669         z_decomp_free,          /* decomp_free */
670         z_decomp_init,          /* decomp_init */
671         z_decomp_reset,         /* decomp_reset */
672         z_decompress,           /* decompress */
673         z_incomp,               /* incomp */
674         z_comp_stats,           /* decomp_stat */
675 };
676
677 #ifdef MODULE
678 /*************************************************************
679  * Module support routines
680  *************************************************************/
681
682 int
683 init_module(void)
684 {  
685         int answer = ppp_register_compressor (&ppp_deflate);
686         if (answer == 0)
687                 printk (KERN_INFO
688                         "PPP Deflate Compression module registered\n");
689         ppp_register_compressor(&ppp_deflate_draft);
690         return answer;
691 }
692      
693 void
694 cleanup_module(void)
695 {
696         if (MOD_IN_USE)
697                 printk (KERN_INFO
698                         "Deflate Compression module busy, remove delayed\n");
699         else {
700                 ppp_unregister_compressor (&ppp_deflate);
701                 ppp_unregister_compressor (&ppp_deflate_draft);
702         }
703 }
704 #endif