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

crc.h File Reference

Go to the source code of this file.

Functions

 SPAN_DECLARE (uint32_t) crc_itu32_calc(const uint8_t *buf
 Calculate the ITU/CCITT CRC-32 value in buffer.
 SPAN_DECLARE (int) crc_itu32_append(uint8_t *buf
 Release a V.8 context.
 SPAN_DECLARE (uint16_t) crc_itu16_calc(const uint8_t *buf
 Calculate the ITU/CCITT CRC-16 value in buffer.

Variables

int len
int uint32_t crc


Detailed Description


Function Documentation

SPAN_DECLARE uint16_t   )  const
 

Calculate the ITU/CCITT CRC-16 value in buffer.

Parameters:
buf The buffer containing the data.
len The length of the frame.
crc The initial CRC value. This is usually 0xFFFF, or 0 for a new block (it depends on the application). It is previous returned CRC value for the continuation of a block.
Returns:
The CRC value.

SPAN_DECLARE int   ) 
 

Release a V.8 context.

Parameters:
buf The buffer containing the frame. This must be at least 2 bytes longer than the frame it contains, to allow room for the CRC value.
len The length of the frame.
Returns:
The new length of the frame.

SPAN_DECLARE uint32_t   )  const
 

Calculate the ITU/CCITT CRC-32 value in buffer.

Parameters:
buf The buffer containing the data.
len The length of the frame.
crc The initial CRC value. This is usually 0xFFFFFFFF, or 0 for a new block (it depends on the application). It is previous returned CRC value for the continuation of a block.
Returns:
The CRC value.


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