2 * BSD compression module
4 * Patched version for ISDN syncPPP written 1997/1998 by Michael Hipp
5 * The whole module is now SKB based.
10 * Update: The Berkeley copyright was changed, and the change
11 * is retroactive to all "true" BSD software (ie everything
12 * from UCB as opposed to other peoples code that just carried
13 * the same license). The new copyright doesn't clash with the
14 * GPL, so the module-only restriction has been removed..
18 * Original copyright notice:
20 * Copyright (c) 1985, 1986 The Regents of the University of California.
21 * All rights reserved.
23 * This code is derived from software contributed to Berkeley by
24 * James A. Woods, derived from original work by Spencer Thomas
27 * Redistribution and use in source and binary forms, with or without
28 * modification, are permitted provided that the following conditions
30 * 1. Redistributions of source code must retain the above copyright
31 * notice, this list of conditions and the following disclaimer.
32 * 2. Redistributions in binary form must reproduce the above copyright
33 * notice, this list of conditions and the following disclaimer in the
34 * documentation and/or other materials provided with the distribution.
35 * 3. All advertising materials mentioning features or use of this software
36 * must display the following acknowledgement:
37 * This product includes software developed by the University of
38 * California, Berkeley and its contributors.
39 * 4. Neither the name of the University nor the names of its contributors
40 * may be used to endorse or promote products derived from this software
41 * without specific prior written permission.
43 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
44 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
45 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
46 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
47 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
56 #include <linux/module.h>
57 #include <linux/init.h>
58 #include <linux/kernel.h>
59 #include <linux/sched.h>
60 #include <linux/types.h>
61 #include <linux/fcntl.h>
62 #include <linux/interrupt.h>
63 #include <linux/ptrace.h>
64 #include <linux/ioport.h>
66 #include <linux/slab.h>
67 #include <linux/tty.h>
68 #include <linux/errno.h>
69 #include <linux/string.h> /* used in new tty drivers */
70 #include <linux/signal.h> /* used in new tty drivers */
72 #include <asm/system.h>
73 #include <asm/bitops.h>
74 #include <asm/segment.h>
75 #include <asm/byteorder.h>
76 #include <asm/types.h>
80 #include <linux/if_ether.h>
81 #include <linux/netdevice.h>
82 #include <linux/skbuff.h>
83 #include <linux/inet.h>
84 #include <linux/ioctl.h>
85 #include <linux/vmalloc.h>
87 #include <linux/ppp_defs.h>
89 #include <linux/isdn.h>
90 #include <linux/isdn_ppp.h>
92 #include <linux/tcp.h>
93 #include <linux/if_arp.h>
94 #include <linux/ppp-comp.h>
98 MODULE_DESCRIPTION("ISDN4Linux: BSD Compression for PPP over ISDN");
99 MODULE_LICENSE("Dual BSD/GPL");
101 #define BSD_VERSION(x) ((x) >> 5)
102 #define BSD_NBITS(x) ((x) & 0x1F)
104 #define BSD_CURRENT_VERSION 1
109 * A dictionary for doing BSD compress.
114 u16 codem1; /* output of hash table -1 */
115 u16 cptr; /* map code to hash table entry */
119 int totlen; /* length of this structure */
120 unsigned int hsize; /* size of the hash table */
121 unsigned char hshift; /* used in hash function */
122 unsigned char n_bits; /* current bits/code */
123 unsigned char maxbits; /* maximum bits/code */
124 unsigned char debug; /* non-zero if debug desired */
125 unsigned char unit; /* ppp unit number */
126 u16 seqno; /* sequence # of next packet */
127 unsigned int mru; /* size of receive (decompress) bufr */
128 unsigned int maxmaxcode; /* largest valid code */
129 unsigned int max_ent; /* largest code in use */
130 unsigned int in_count; /* uncompressed bytes, aged */
131 unsigned int bytes_out; /* compressed bytes, aged */
132 unsigned int ratio; /* recent compression ratio */
133 unsigned int checkpoint; /* when to next check the ratio */
134 unsigned int clear_count; /* times dictionary cleared */
135 unsigned int incomp_count; /* incompressible packets */
136 unsigned int incomp_bytes; /* incompressible bytes */
137 unsigned int uncomp_count; /* uncompressed packets */
138 unsigned int uncomp_bytes; /* uncompressed bytes */
139 unsigned int comp_count; /* compressed packets */
140 unsigned int comp_bytes; /* compressed bytes */
141 unsigned short *lens; /* array of lengths of codes */
142 struct bsd_dict *dict; /* dictionary */
146 #define BSD_OVHD 2 /* BSD compress overhead/packet */
147 #define MIN_BSD_BITS 9
148 #define BSD_INIT_BITS MIN_BSD_BITS
149 #define MAX_BSD_BITS 15
152 * the next two codes should not be changed lightly, as they must not
153 * lie within the contiguous general code space.
155 #define CLEAR 256 /* table clear output code */
156 #define FIRST 257 /* first free entry */
159 #define MAXCODE(b) ((1 << (b)) - 1)
160 #define BADCODEM1 MAXCODE(MAX_BSD_BITS);
162 #define BSD_HASH(prefix,suffix,hshift) ((((unsigned long)(suffix))<<(hshift)) \
163 ^ (unsigned long)(prefix))
164 #define BSD_KEY(prefix,suffix) ((((unsigned long)(suffix)) << 16) \
165 + (unsigned long)(prefix))
167 #define CHECK_GAP 10000 /* Ratio check interval */
169 #define RATIO_SCALE_LOG 8
170 #define RATIO_SCALE (1<<RATIO_SCALE_LOG)
171 #define RATIO_MAX (0x7fffffff>>RATIO_SCALE_LOG)
174 * clear the dictionary
177 static void bsd_clear(struct bsd_db *db)
180 db->max_ent = FIRST-1;
181 db->n_bits = BSD_INIT_BITS;
184 db->incomp_count = 0;
186 db->checkpoint = CHECK_GAP;
190 * If the dictionary is full, then see if it is time to reset it.
192 * Compute the compression ratio using fixed-point arithmetic
193 * with 8 fractional bits.
195 * Since we have an infinite stream instead of a single file,
196 * watch only the local compression ratio.
198 * Since both peers must reset the dictionary at the same time even in
199 * the absence of CLEAR codes (while packets are incompressible), they
200 * must compute the same ratio.
202 static int bsd_check (struct bsd_db *db) /* 1=output CLEAR */
204 unsigned int new_ratio;
206 if (db->in_count >= db->checkpoint)
208 /* age the ratio by limiting the size of the counts */
209 if (db->in_count >= RATIO_MAX || db->bytes_out >= RATIO_MAX)
211 db->in_count -= (db->in_count >> 2);
212 db->bytes_out -= (db->bytes_out >> 2);
215 db->checkpoint = db->in_count + CHECK_GAP;
217 if (db->max_ent >= db->maxmaxcode)
219 /* Reset the dictionary only if the ratio is worse,
220 * or if it looks as if it has been poisoned
221 * by incompressible data.
223 * This does not overflow, because
224 * db->in_count <= RATIO_MAX.
227 new_ratio = db->in_count << RATIO_SCALE_LOG;
228 if (db->bytes_out != 0)
230 new_ratio /= db->bytes_out;
233 if (new_ratio < db->ratio || new_ratio < 1 * RATIO_SCALE)
238 db->ratio = new_ratio;
248 static void bsd_stats (void *state, struct compstat *stats)
250 struct bsd_db *db = (struct bsd_db *) state;
252 stats->unc_bytes = db->uncomp_bytes;
253 stats->unc_packets = db->uncomp_count;
254 stats->comp_bytes = db->comp_bytes;
255 stats->comp_packets = db->comp_count;
256 stats->inc_bytes = db->incomp_bytes;
257 stats->inc_packets = db->incomp_count;
258 stats->in_count = db->in_count;
259 stats->bytes_out = db->bytes_out;
263 * Reset state, as on a CCP ResetReq.
265 static void bsd_reset (void *state,unsigned char code, unsigned char id,
266 unsigned char *data, unsigned len,
267 struct isdn_ppp_resetparams *rsparm)
269 struct bsd_db *db = (struct bsd_db *) state;
277 * Release the compression structure
279 static void bsd_free (void *state)
281 struct bsd_db *db = (struct bsd_db *) state;
285 * Release the dictionary
293 * Release the string buffer
301 * Finally release the structure itself.
310 * Allocate space for a (de) compressor.
312 static void *bsd_alloc (struct isdn_ppp_comp_data *data)
315 unsigned int hsize, hshift, maxmaxcode;
319 static unsigned int htab[][2] = {
320 { 5003 , 4 } , { 5003 , 4 } , { 5003 , 4 } , { 5003 , 4 } ,
321 { 9001 , 5 } , { 18013 , 6 } , { 35023 , 7 } , { 69001 , 8 }
324 if (data->optlen != 1 || data->num != CI_BSD_COMPRESS
325 || BSD_VERSION(data->options[0]) != BSD_CURRENT_VERSION)
328 bits = BSD_NBITS(data->options[0]);
330 if(bits < 9 || bits > 15)
333 hsize = htab[bits-9][0];
334 hshift = htab[bits-9][1];
337 * Allocate the main control structure for this instance.
339 maxmaxcode = MAXCODE(bits);
340 db = (struct bsd_db *) kmalloc (sizeof (struct bsd_db),GFP_KERNEL);
344 memset (db, 0, sizeof(struct bsd_db));
346 db->xmit = data->flags & IPPP_COMP_FLAG_XMIT;
347 decomp = db->xmit ? 0 : 1;
350 * Allocate space for the dictionary. This may be more than one page in
353 db->dict = (struct bsd_dict *) vmalloc (hsize * sizeof (struct bsd_dict));
362 * If this is the compression buffer then there is no length data.
363 * For decompression, the length information is needed as well.
368 db->lens = (unsigned short *) vmalloc ((maxmaxcode + 1) *
369 sizeof (db->lens[0]));
371 bsd_free (db); /* calls MOD_DEC_USE_COUNT; */
377 * Initialize the data information for the compression code
379 db->totlen = sizeof (struct bsd_db) + (sizeof (struct bsd_dict) * hsize);
382 db->maxmaxcode = maxmaxcode;
389 * Initialize the database.
391 static int bsd_init (void *state, struct isdn_ppp_comp_data *data, int unit, int debug)
393 struct bsd_db *db = state;
397 if(!state || !data) {
398 printk(KERN_ERR "isdn_bsd_init: [%d] ERR, state %lx data %lx\n",unit,(long)state,(long)data);
402 decomp = db->xmit ? 0 : 1;
404 if (data->optlen != 1 || data->num != CI_BSD_COMPRESS
405 || (BSD_VERSION(data->options[0]) != BSD_CURRENT_VERSION)
406 || (BSD_NBITS(data->options[0]) != db->maxbits)
407 || (decomp && db->lens == NULL)) {
408 printk(KERN_ERR "isdn_bsd: %d %d %d %d %lx\n",data->optlen,data->num,data->options[0],decomp,(unsigned long)db->lens);
413 for(indx=LAST;indx>=0;indx--)
417 while (indx-- != 0) {
418 db->dict[indx].codem1 = BADCODEM1;
419 db->dict[indx].cptr = 0;
427 bsd_reset(db,0,0,NULL,0,NULL);
433 * Obtain pointers to the various structures in the compression tables
436 #define dict_ptrx(p,idx) &(p->dict[idx])
437 #define lens_ptrx(p,idx) &(p->lens[idx])
440 static unsigned short *lens_ptr(struct bsd_db *db, int idx)
442 if ((unsigned int) idx > (unsigned int) db->maxmaxcode) {
443 printk (KERN_DEBUG "<9>ppp: lens_ptr(%d) > max\n", idx);
446 return lens_ptrx (db, idx);
449 static struct bsd_dict *dict_ptr(struct bsd_db *db, int idx)
451 if ((unsigned int) idx >= (unsigned int) db->hsize) {
452 printk (KERN_DEBUG "<9>ppp: dict_ptr(%d) > max\n", idx);
455 return dict_ptrx (db, idx);
459 #define lens_ptr(db,idx) lens_ptrx(db,idx)
460 #define dict_ptr(db,idx) dict_ptrx(db,idx)
466 static int bsd_compress (void *state, struct sk_buff *skb_in, struct sk_buff *skb_out,int proto)
470 unsigned int max_ent;
476 struct bsd_dict *dictp;
478 int hval,disp,ilen,mxcode;
479 unsigned char *rptr = skb_in->data;
480 int isize = skb_in->len;
482 #define OUTPUT(ent) \
485 accm |= ((ent) << bitno); \
487 if(skb_out && skb_tailroom(skb_out) > 0) \
488 *(skb_put(skb_out,1)) = (unsigned char) (accm>>24); \
491 } while (bitno <= 24); \
495 * If the protocol is not in the range we're interested in,
496 * just return without compressing the packet. If it is,
497 * the protocol becomes the first byte to compress.
499 printk(KERN_DEBUG "bsd_compress called with %x\n",proto);
502 if (proto < 0x21 || proto > 0xf9 || !(proto & 0x1) )
505 db = (struct bsd_db *) state;
507 max_ent = db->max_ent;
511 mxcode = MAXCODE (n_bits);
513 /* This is the PPP header information */
514 if(skb_out && skb_tailroom(skb_out) >= 2) {
515 char *v = skb_put(skb_out,2);
516 /* we only push our own data on the header,
517 AC,PC and protos is pushed by caller */
518 v[0] = db->seqno >> 8;
522 ilen = ++isize; /* This is off by one, but that is what is in draft! */
526 fcode = BSD_KEY (ent, c);
527 hval = BSD_HASH (ent, c, hshift);
528 dictp = dict_ptr (db, hval);
530 /* Validate and then check the entry. */
531 if (dictp->codem1 >= max_ent)
534 if (dictp->fcode == fcode) {
535 ent = dictp->codem1 + 1;
536 continue; /* found (prefix,suffix) */
539 /* continue probing until a match or invalid entry */
540 disp = (hval == 0) ? 1 : hval;
544 if (hval >= db->hsize)
546 dictp = dict_ptr (db, hval);
547 if (dictp->codem1 >= max_ent)
549 } while (dictp->fcode != fcode);
551 ent = dictp->codem1 + 1; /* finally found (prefix,suffix) */
555 OUTPUT(ent); /* output the prefix */
557 /* code -> hashtable */
558 if (max_ent < db->maxmaxcode) {
559 struct bsd_dict *dictp2;
560 struct bsd_dict *dictp3;
563 /* expand code size if needed */
564 if (max_ent >= mxcode) {
565 db->n_bits = ++n_bits;
566 mxcode = MAXCODE (n_bits);
570 * Invalidate old hash table entry using
571 * this code, and then take it over.
573 dictp2 = dict_ptr (db, max_ent + 1);
575 dictp3 = dict_ptr (db, indx);
577 if (dictp3->codem1 == max_ent)
578 dictp3->codem1 = BADCODEM1;
581 dictp->codem1 = max_ent;
582 dictp->fcode = fcode;
583 db->max_ent = ++max_ent;
586 unsigned short *len1 = lens_ptr (db, max_ent);
587 unsigned short *len2 = lens_ptr (db, ent);
594 OUTPUT(ent); /* output the last code */
597 db->bytes_out += skb_out->len; /* Do not count bytes from here */
598 db->uncomp_bytes += isize;
599 db->in_count += isize;
604 ++db->bytes_out; /* must be set before calling bsd_check */
607 * Generate the clear command if needed
614 * Pad dribble bits of last code with ones.
615 * Do not emit a completely useless byte of ones.
617 if (bitno < 32 && skb_out && skb_tailroom(skb_out) > 0)
618 *(skb_put(skb_out,1)) = (unsigned char) ((accm | (0xff << (bitno-8))) >> 24);
621 * Increase code size if we would have without the packet
622 * boundary because the decompressor will do so.
624 if (max_ent >= mxcode && max_ent < db->maxmaxcode)
627 /* If output length is too large then this is an incompressible frame. */
628 if (!skb_out || (skb_out && skb_out->len >= skb_in->len) ) {
630 db->incomp_bytes += isize;
634 /* Count the number of compressed frames */
636 db->comp_bytes += skb_out->len;
643 * Update the "BSD Compress" dictionary on the receiver for
644 * incompressible data by pretending to compress the incoming data.
646 static void bsd_incomp (void *state, struct sk_buff *skb_in,int proto)
648 bsd_compress (state, skb_in, NULL, proto);
652 * Decompress "BSD Compress".
654 static int bsd_decompress (void *state, struct sk_buff *skb_in, struct sk_buff *skb_out,
655 struct isdn_ppp_resetparams *rsparm)
658 unsigned int max_ent;
660 unsigned int bitno; /* 1st valid bit in accm */
662 unsigned int tgtbitno; /* bitno when we have a code */
663 struct bsd_dict *dictp;
666 unsigned int oldcode;
667 unsigned int finchar;
668 unsigned char *p,*ibuf;
673 db = (struct bsd_db *) state;
674 max_ent = db->max_ent;
676 bitno = 32; /* 1st valid bit in accm */
678 tgtbitno = 32 - n_bits; /* bitno when we have a code */
680 printk(KERN_DEBUG "bsd_decompress called\n");
682 if(!skb_in || !skb_out) {
683 printk(KERN_ERR "bsd_decompress called with NULL parameter\n");
688 * Get the sequence number.
690 if( (p = skb_pull(skb_in,2)) == NULL) {
694 seq = (p[0] << 8) + p[1];
699 * Check the sequence number and give up if it differs from
700 * the value we're expecting.
702 if (seq != db->seqno) {
704 printk(KERN_DEBUG "bsd_decomp%d: bad sequence # %d, expected %d\n",
705 db->unit, seq, db->seqno - 1);
711 db->bytes_out += ilen;
713 if(skb_tailroom(skb_out) > 0)
714 *(skb_put(skb_out,1)) = 0;
716 return DECOMP_ERR_NOMEM;
721 * Keep the checkpoint correctly so that incompressible packets
722 * clear the dictionary at the proper times.
727 db->in_count += (skb_out->len - 1); /* don't count the header */
732 * Accumulate bytes until we have a complete code.
733 * Then get the next code, relying on the 32-bit,
734 * unsigned accm to mask the result.
738 accm |= *ibuf++ << bitno;
739 if (tgtbitno < bitno)
742 incode = accm >> tgtbitno;
747 * The dictionary must only be cleared at the end of a packet.
750 if (incode == CLEAR) {
753 printk(KERN_DEBUG "bsd_decomp%d: bad CLEAR\n", db->unit);
754 return DECOMP_FATALERROR; /* probably a bug */
760 if ((incode > max_ent + 2) || (incode > db->maxmaxcode)
761 || (incode > max_ent && oldcode == CLEAR)) {
763 printk(KERN_DEBUG "bsd_decomp%d: bad code 0x%x oldcode=0x%x ",
764 db->unit, incode, oldcode);
765 printk(KERN_DEBUG "max_ent=0x%x skb->Len=%d seqno=%d\n",
766 max_ent, skb_out->len, db->seqno);
768 return DECOMP_FATALERROR; /* probably a bug */
771 /* Special case for KwKwK string. */
772 if (incode > max_ent) {
780 codelen = *(lens_ptr (db, finchar));
781 if( skb_tailroom(skb_out) < codelen + extra) {
783 printk(KERN_DEBUG "bsd_decomp%d: ran out of mru\n", db->unit);
785 printk(KERN_DEBUG " len=%d, finchar=0x%x, codelen=%d,skblen=%d\n",
786 ilen, finchar, codelen, skb_out->len);
789 return DECOMP_FATALERROR;
793 * Decode this code and install it in the decompressed buffer.
796 p = skb_put(skb_out,codelen);
798 while (finchar > LAST) {
799 struct bsd_dict *dictp2 = dict_ptr (db, finchar);
801 dictp = dict_ptr (db, dictp2->cptr);
804 if (--codelen <= 0 || dictp->codem1 != finchar-1) {
806 printk(KERN_ERR "bsd_decomp%d: fell off end of chain ", db->unit);
807 printk(KERN_ERR "0x%x at 0x%x by 0x%x, max_ent=0x%x\n", incode, finchar, dictp2->cptr, max_ent);
809 if (dictp->codem1 != finchar-1) {
810 printk(KERN_ERR "bsd_decomp%d: bad code chain 0x%x finchar=0x%x ",db->unit, incode, finchar);
811 printk(KERN_ERR "oldcode=0x%x cptr=0x%x codem1=0x%x\n", oldcode, dictp2->cptr, dictp->codem1);
814 return DECOMP_FATALERROR;
819 u32 fcode = dictp->fcode;
820 *--p = (fcode >> 16) & 0xff;
821 finchar = fcode & 0xffff;
828 printk(KERN_ERR "bsd_decomp%d: short by %d after code 0x%x, max_ent=0x%x\n", db->unit, codelen, incode, max_ent);
831 if (extra) /* the KwKwK case again */
832 *(skb_put(skb_out,1)) = finchar;
835 * If not first code in a packet, and
836 * if not out of code space, then allocate a new code.
838 * Keep the hash table correct so it can be used
839 * with uncompressed packets.
841 if (oldcode != CLEAR && max_ent < db->maxmaxcode) {
842 struct bsd_dict *dictp2, *dictp3;
845 int hval, disp, indx;
847 fcode = BSD_KEY(oldcode,finchar);
848 hval = BSD_HASH(oldcode,finchar,db->hshift);
849 dictp = dict_ptr (db, hval);
851 /* look for a free hash table entry */
852 if (dictp->codem1 < max_ent) {
853 disp = (hval == 0) ? 1 : hval;
856 if (hval >= db->hsize)
858 dictp = dict_ptr (db, hval);
859 } while (dictp->codem1 < max_ent);
863 * Invalidate previous hash table entry
864 * assigned this code, and then take it over
867 dictp2 = dict_ptr (db, max_ent + 1);
869 dictp3 = dict_ptr (db, indx);
871 if (dictp3->codem1 == max_ent)
872 dictp3->codem1 = BADCODEM1;
875 dictp->codem1 = max_ent;
876 dictp->fcode = fcode;
877 db->max_ent = ++max_ent;
879 /* Update the length of this string. */
880 lens1 = lens_ptr (db, max_ent);
881 lens2 = lens_ptr (db, oldcode);
884 /* Expand code size if needed. */
885 if (max_ent >= MAXCODE(n_bits) && max_ent < db->maxmaxcode) {
886 db->n_bits = ++n_bits;
887 tgtbitno = 32-n_bits;
895 db->comp_bytes += skb_in->len - BSD_OVHD;
896 db->uncomp_bytes += skb_out->len;
900 printk(KERN_DEBUG "bsd_decomp%d: peer should have cleared dictionary on %d\n",
901 db->unit, db->seqno - 1);
906 /*************************************************************
907 * Table of addresses for the BSD compression module
908 *************************************************************/
910 static struct isdn_ppp_compressor ippp_bsd_compress = {
911 NULL,NULL, /* prev,next: overwritten by isdn_ppp */
912 CI_BSD_COMPRESS, /* compress_proto */
913 bsd_alloc, /* alloc */
916 bsd_reset, /* reset */
917 bsd_compress, /* compress */
918 bsd_decompress, /* decompress */
919 bsd_incomp, /* incomp */
920 bsd_stats /* comp_stat */
923 /*************************************************************
924 * Module support routines
925 *************************************************************/
927 static int __init isdn_bsdcomp_init(void)
929 int answer = isdn_ppp_register_compressor (&ippp_bsd_compress);
931 printk (KERN_INFO "PPP BSD Compression module registered\n");
935 static void __exit isdn_bsdcomp_exit(void)
937 isdn_ppp_unregister_compressor (&ippp_bsd_compress);
940 module_init(isdn_bsdcomp_init);
941 module_exit(isdn_bsdcomp_exit);