Main Page | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

hdlc.h File Reference

Go to the source code of this file.

Classes

struct  hdlc_rx_stats_t

Defines

#define _SPANDSP_HDLC_H_
#define HDLC_MAXFRAME_LEN   400

Typedefs

typedef void(* hdlc_frame_handler_t )(void *user_data, const uint8_t *pkt, int len, int ok)
typedef void(* hdlc_underflow_handler_t )(void *user_data)
typedef hdlc_rx_state_s hdlc_rx_state_t
typedef hdlc_tx_state_s hdlc_tx_state_t

Functions

 SPAN_DECLARE (hdlc_rx_state_t *) hdlc_rx_init(hdlc_rx_state_t *s
 Initialise an HDLC receiver context.
 SPAN_DECLARE (void) hdlc_rx_set_frame_handler(hdlc_rx_state_t *s
 Cleanup a T.30 context if the call terminates.
 SPAN_DECLARE (int) hdlc_rx_release(hdlc_rx_state_t *s)
 Release an HDLC receiver context.
 SPAN_DECLARE (hdlc_tx_state_t *) hdlc_tx_init(hdlc_tx_state_t *s
 Initialise an HDLC transmitter context.

Variables

int crc32
int int report_bad_frames
int int int framing_ok_threshold
int int int hdlc_frame_handler_t handler
int int int hdlc_frame_handler_t
void * 
user_data
size_t max_len
int interval
hdlc_rx_stats_tt
int new_bit
int new_byte
const uint8_t buf []
const uint8_t int len
int int inter_frame_flags
int int int progressive
const uint8_t * frame


Detailed Description


Define Documentation

#define HDLC_MAXFRAME_LEN   400
 

HDLC_MAXFRAME_LEN is the maximum length of a stuffed HDLC frame, excluding the CRC.


Typedef Documentation

typedef struct hdlc_rx_state_s hdlc_rx_state_t
 

HDLC receive descriptor. This contains all the state information for an HDLC receiver.

typedef struct hdlc_tx_state_s hdlc_tx_state_t
 

HDLC transmit descriptor. This contains all the state information for an HDLC transmitter.


Function Documentation

SPAN_DECLARE hdlc_tx_state_t  ) 
 

Initialise an HDLC transmitter context.

Parameters:
s A pointer to an HDLC transmitter context.
crc32 TRUE to use ITU CRC32. FALSE to use ITU CRC16.
inter_frame_flags The minimum flag octets to insert between frames (usually one).
progressive TRUE if frame creation works in progressive mode.
handler The callback function called when the HDLC transmitter underflows.
user_data An opaque parameter for the callback routine.
Returns:
A pointer to the HDLC transmitter context.

SPAN_DECLARE int32_t   ) 
 

Release an HDLC receiver context.

Compress a block of octets.

Parameters:
s The V.42bis context.
buf The data to be compressed.
len The length of the data buffer.
Returns:
0

SPAN_DECLARE void   ) 
 

Cleanup a T.30 context if the call terminates.

Change the put_bit function associated with an HDLC receiver context.

Parameters:
s A pointer to an HDLC receiver context.
handler The function to be called when a good HDLC frame is received.
user_data An opaque parameter for the callback routine.

SPAN_DECLARE hdlc_rx_state_t  ) 
 

Initialise an HDLC receiver context.

Parameters:
s A pointer to an HDLC receiver context.
crc32 TRUE to use ITU CRC32. FALSE to use ITU CRC16.
report_bad_frames TRUE to request the reporting of bad frames.
framing_ok_threshold The number of back-to-back flags needed to start the framing OK condition. This may be used where a series of flag octets is used as a preamble, such as in the T.30 protocol.
handler The function to be called when a good HDLC frame is received.
user_data An opaque parameter for the callback routine.
Returns:
A pointer to the HDLC receiver context.


Generated on Fri Aug 28 20:12:28 2009 for spandsp by  doxygen 1.3.9.1