Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
isdnhdlc.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/crc-ccitt.h>
#include <linux/isdn/hdlc.h>
#include <linux/bitrev.h>

Go to the source code of this file.

Macros

#define handle_fast_flag(h)
 
#define handle_abort(h)
 

Enumerations

enum  {
  HDLC_FAST_IDLE, HDLC_GET_FLAG_B0, HDLC_GETFLAG_B1A6, HDLC_GETFLAG_B7,
  HDLC_GET_DATA, HDLC_FAST_FLAG
}
 
enum  {
  HDLC_SEND_DATA, HDLC_SEND_CRC1, HDLC_SEND_FAST_FLAG, HDLC_SEND_FIRST_FLAG,
  HDLC_SEND_CRC2, HDLC_SEND_CLOSING_FLAG, HDLC_SEND_IDLE1, HDLC_SEND_FAST_IDLE,
  HDLC_SENDFLAG_B0, HDLC_SENDFLAG_B1A6, HDLC_SENDFLAG_B7, STOPPED,
  HDLC_SENDFLAG_ONE
}
 

Functions

 MODULE_AUTHOR ("Wolfgang Mües <[email protected]>, ""Frode Isaksen <[email protected]>, ""Kai Germaschewski <[email protected]>")
 
 MODULE_DESCRIPTION ("General purpose ISDN HDLC decoder")
 
 MODULE_LICENSE ("GPL")
 
void isdnhdlc_rcv_init (struct isdnhdlc_vars *hdlc, u32 features)
 
 EXPORT_SYMBOL (isdnhdlc_out_init)
 
void isdnhdlc_out_init (struct isdnhdlc_vars *hdlc, u32 features)
 
 EXPORT_SYMBOL (isdnhdlc_rcv_init)
 
int isdnhdlc_decode (struct isdnhdlc_vars *hdlc, const u8 *src, int slen, int *count, u8 *dst, int dsize)
 
 EXPORT_SYMBOL (isdnhdlc_decode)
 
int isdnhdlc_encode (struct isdnhdlc_vars *hdlc, const u8 *src, u16 slen, int *count, u8 *dst, int dsize)
 
 EXPORT_SYMBOL (isdnhdlc_encode)
 

Macro Definition Documentation

#define handle_abort (   h)
Value:
do { \
h->shift_reg = fast_abort[h->ffbit_shift - 1]; \
h->hdlc_bits1 = h->ffbit_shift - 2; \
if (h->hdlc_bits1 < 0) \
h->hdlc_bits1 = 0; \
h->data_bits = h->ffbit_shift - 1; \
h->state = HDLC_GET_DATA; \
h->data_received = 0; \
} while (0)
#define handle_fast_flag (   h)
Value:
do { \
if (h->cbin == fast_flag[h->bit_shift]) { \
h->ffvalue = fast_flag_value[h->bit_shift]; \
h->state = HDLC_FAST_FLAG; \
h->ffbit_shift = h->bit_shift; \
h->bit_shift = 1; \
} else { \
h->state = HDLC_GET_DATA; \
h->data_received = 0; \
} \
} while (0)

Enumeration Type Documentation

anonymous enum
Enumerator:
HDLC_FAST_IDLE 
HDLC_GET_FLAG_B0 
HDLC_GETFLAG_B1A6 
HDLC_GETFLAG_B7 
HDLC_GET_DATA 
HDLC_FAST_FLAG 

Definition at line 41 of file isdnhdlc.c.

anonymous enum
Enumerator:
HDLC_SEND_DATA 
HDLC_SEND_CRC1 
HDLC_SEND_FAST_FLAG 
HDLC_SEND_FIRST_FLAG 
HDLC_SEND_CRC2 
HDLC_SEND_CLOSING_FLAG 
HDLC_SEND_IDLE1 
HDLC_SEND_FAST_IDLE 
HDLC_SENDFLAG_B0 
HDLC_SENDFLAG_B1A6 
HDLC_SENDFLAG_B7 
STOPPED 
HDLC_SENDFLAG_ONE 

Definition at line 46 of file isdnhdlc.c.

Function Documentation

EXPORT_SYMBOL ( isdnhdlc_out_init  )
EXPORT_SYMBOL ( isdnhdlc_rcv_init  )
EXPORT_SYMBOL ( isdnhdlc_decode  )
EXPORT_SYMBOL ( isdnhdlc_encode  )
int isdnhdlc_decode ( struct isdnhdlc_vars hdlc,
const u8 src,
int  slen,
int count,
u8 dst,
int  dsize 
)

Definition at line 131 of file isdnhdlc.c.

int isdnhdlc_encode ( struct isdnhdlc_vars hdlc,
const u8 src,
u16  slen,
int count,
u8 dst,
int  dsize 
)

Definition at line 354 of file isdnhdlc.c.

void isdnhdlc_out_init ( struct isdnhdlc_vars hdlc,
u32  features 
)

Definition at line 64 of file isdnhdlc.c.

void isdnhdlc_rcv_init ( struct isdnhdlc_vars hdlc,
u32  features 
)

Definition at line 53 of file isdnhdlc.c.

MODULE_AUTHOR ( "Wolfgang Mües <[email protected] ,
""Frode Isaksen< fisaksen @bewan.com >  ,
""Kai Germaschewski< kai.germaschewski @gmx.de >"   
)
MODULE_DESCRIPTION ( "General purpose ISDN HDLC decoder"  )
MODULE_LICENSE ( "GPL"  )