Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
isdn_bsdcomp.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/in.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/signal.h>
#include <linux/bitops.h>
#include <asm/byteorder.h>
#include <asm/types.h>
#include <linux/if.h>
#include <linux/if_ether.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/inet.h>
#include <linux/ioctl.h>
#include <linux/vmalloc.h>
#include <linux/ppp_defs.h>
#include <linux/isdn.h>
#include <linux/isdn_ppp.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/if_arp.h>
#include <linux/ppp-comp.h>
#include "isdn_ppp.h"

Go to the source code of this file.

Data Structures

struct  bsd_dict
 
struct  bsd_db
 

Macros

#define BSD_VERSION(x)   ((x) >> 5)
 
#define BSD_NBITS(x)   ((x) & 0x1F)
 
#define BSD_CURRENT_VERSION   1
 
#define DEBUG   1
 
#define BSD_OVHD   2 /* BSD compress overhead/packet */
 
#define MIN_BSD_BITS   9
 
#define BSD_INIT_BITS   MIN_BSD_BITS
 
#define MAX_BSD_BITS   15
 
#define CLEAR   256 /* table clear output code */
 
#define FIRST   257 /* first free entry */
 
#define LAST   255
 
#define MAXCODE(b)   ((1 << (b)) - 1)
 
#define BADCODEM1   MAXCODE(MAX_BSD_BITS)
 
#define BSD_HASH(prefix, suffix, hshift)
 
#define BSD_KEY(prefix, suffix)
 
#define CHECK_GAP   10000 /* Ratio check interval */
 
#define RATIO_SCALE_LOG   8
 
#define RATIO_SCALE   (1 << RATIO_SCALE_LOG)
 
#define RATIO_MAX   (0x7fffffff >> RATIO_SCALE_LOG)
 
#define dict_ptrx(p, idx)   &(p->dict[idx])
 
#define lens_ptrx(p, idx)   &(p->lens[idx])
 
#define OUTPUT(ent)
 

Functions

 MODULE_DESCRIPTION ("ISDN4Linux: BSD Compression for PPP over ISDN")
 
 MODULE_LICENSE ("Dual BSD/GPL")
 
 module_init (isdn_bsdcomp_init)
 
 module_exit (isdn_bsdcomp_exit)
 

Macro Definition Documentation

#define BADCODEM1   MAXCODE(MAX_BSD_BITS)

Definition at line 157 of file isdn_bsdcomp.c.

#define BSD_CURRENT_VERSION   1

Definition at line 101 of file isdn_bsdcomp.c.

#define BSD_HASH (   prefix,
  suffix,
  hshift 
)
Value:
((((unsigned long)(suffix)) << (hshift)) \
^ (unsigned long)(prefix))

Definition at line 159 of file isdn_bsdcomp.c.

#define BSD_INIT_BITS   MIN_BSD_BITS

Definition at line 145 of file isdn_bsdcomp.c.

#define BSD_KEY (   prefix,
  suffix 
)
Value:
((((unsigned long)(suffix)) << 16) \
+ (unsigned long)(prefix))

Definition at line 161 of file isdn_bsdcomp.c.

#define BSD_NBITS (   x)    ((x) & 0x1F)

Definition at line 99 of file isdn_bsdcomp.c.

#define BSD_OVHD   2 /* BSD compress overhead/packet */

Definition at line 143 of file isdn_bsdcomp.c.

#define BSD_VERSION (   x)    ((x) >> 5)

Definition at line 98 of file isdn_bsdcomp.c.

#define CHECK_GAP   10000 /* Ratio check interval */

Definition at line 164 of file isdn_bsdcomp.c.

#define CLEAR   256 /* table clear output code */

Definition at line 152 of file isdn_bsdcomp.c.

#define DEBUG   1

Definition at line 103 of file isdn_bsdcomp.c.

#define dict_ptrx (   p,
  idx 
)    &(p->dict[idx])

Definition at line 423 of file isdn_bsdcomp.c.

#define FIRST   257 /* first free entry */

Definition at line 153 of file isdn_bsdcomp.c.

#define LAST   255

Definition at line 154 of file isdn_bsdcomp.c.

#define lens_ptrx (   p,
  idx 
)    &(p->lens[idx])

Definition at line 424 of file isdn_bsdcomp.c.

#define MAX_BSD_BITS   15

Definition at line 146 of file isdn_bsdcomp.c.

#define MAXCODE (   b)    ((1 << (b)) - 1)

Definition at line 156 of file isdn_bsdcomp.c.

#define MIN_BSD_BITS   9

Definition at line 144 of file isdn_bsdcomp.c.

#define OUTPUT (   ent)
Value:
{ \
bitno -= n_bits; \
accm |= ((ent) << bitno); \
do { \
if (skb_out && skb_tailroom(skb_out) > 0) \
*(skb_put(skb_out, 1)) = (unsigned char)(accm >> 24); \
accm <<= 8; \
bitno += 8; \
} while (bitno <= 24); \
}
#define RATIO_MAX   (0x7fffffff >> RATIO_SCALE_LOG)

Definition at line 168 of file isdn_bsdcomp.c.

#define RATIO_SCALE   (1 << RATIO_SCALE_LOG)

Definition at line 167 of file isdn_bsdcomp.c.

#define RATIO_SCALE_LOG   8

Definition at line 166 of file isdn_bsdcomp.c.

Function Documentation

MODULE_DESCRIPTION ( "ISDN4Linux: BSD Compression for PPP over ISDN"  )
module_exit ( isdn_bsdcomp_exit  )
module_init ( isdn_bsdcomp_init  )
MODULE_LICENSE ( "Dual BSD/GPL"  )