Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
n_hdlc.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <linux/ptrace.h>
#include <linux/poll.h>
#include <linux/in.h>
#include <linux/ioctl.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/signal.h>
#include <linux/if.h>
#include <linux/bitops.h>
#include <asm/termios.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Data Structures

struct  n_hdlc_buf
 
struct  n_hdlc_buf_list
 
struct  n_hdlc
 

Macros

#define HDLC_MAGIC   0x239e
 
#define VERSION(major, minor, patch)   (((((major)<<8)+(minor))<<8)+(patch))
 
#define MAX_HDLC_FRAME_SIZE   65535
 
#define DEFAULT_RX_BUF_COUNT   10
 
#define MAX_RX_BUF_COUNT   60
 
#define DEFAULT_TX_BUF_COUNT   3
 
#define N_HDLC_BUF_SIZE   (sizeof(struct n_hdlc_buf) + maxframe)
 
#define DEBUG_LEVEL_INFO   1
 
#define bset(p, b)   ((p)[(b) >> 5] |= (1 << ((b) & 0x1f)))
 
#define tty2n_hdlc(tty)   ((struct n_hdlc *) ((tty)->disc_data))
 
#define n_hdlc2tty(n_hdlc)   ((n_hdlc)->tty)
 

Functions

 module_init (n_hdlc_init)
 
 module_exit (n_hdlc_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Paul Fulghum [email protected]")
 
 module_param (debuglevel, int, 0)
 
 module_param (maxframe, int, 0)
 
 MODULE_ALIAS_LDISC (N_HDLC)
 

Macro Definition Documentation

#define bset (   p,
  b 
)    ((p)[(b) >> 5] |= (1 << ((b) & 0x1f)))

Definition at line 194 of file n_hdlc.c.

#define DEBUG_LEVEL_INFO   1

Definition at line 172 of file n_hdlc.c.

#define DEFAULT_RX_BUF_COUNT   10

Definition at line 112 of file n_hdlc.c.

#define DEFAULT_TX_BUF_COUNT   3

Definition at line 114 of file n_hdlc.c.

#define HDLC_MAGIC   0x239e

Definition at line 80 of file n_hdlc.c.

#define MAX_HDLC_FRAME_SIZE   65535

Definition at line 111 of file n_hdlc.c.

#define MAX_RX_BUF_COUNT   60

Definition at line 113 of file n_hdlc.c.

#define n_hdlc2tty (   n_hdlc)    ((n_hdlc)->tty)

Definition at line 197 of file n_hdlc.c.

#define N_HDLC_BUF_SIZE   (sizeof(struct n_hdlc_buf) + maxframe)

Definition at line 122 of file n_hdlc.c.

#define tty2n_hdlc (   tty)    ((struct n_hdlc *) ((tty)->disc_data))

Definition at line 196 of file n_hdlc.c.

#define VERSION (   major,
  minor,
  patch 
)    (((((major)<<8)+(minor))<<8)+(patch))

Definition at line 92 of file n_hdlc.c.

Function Documentation

MODULE_ALIAS_LDISC ( N_HDLC  )
MODULE_AUTHOR ( "Paul Fulghum [email protected] )
module_exit ( n_hdlc_exit  )
module_init ( n_hdlc_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( debuglevel  ,
int  ,
 
)
module_param ( maxframe  ,
int  ,
 
)