crc.h File Reference

CRC - 32 + 16 BIT ANSI X3.66 + CCITT CRC checksum files More...

#include "str.h"

Include dependency graph for crc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define CRC16_LEN   4

Functions

void crc32_uint (str *source_string, unsigned int *hash_ret)
 CRC32 value from source string.
unsigned short crcitt_string (char *s, int len)
 Return CCITT value from string.
void crcitt_string_array (char *dst, str src[], int size)
 CCITT value from array.

Variables

unsigned short int ccitt_tab []
unsigned short int crc_16_tab []
unsigned long int crc_32_tab []


Detailed Description

CRC - 32 + 16 BIT ANSI X3.66 + CCITT CRC checksum files

Definition in file crc.h.


Define Documentation

#define CRC16_LEN   4

Definition at line 37 of file crc.h.

Referenced by crcitt_string_array().


Function Documentation

void crc32_uint ( str source_string,
unsigned int *  hash_ret 
)

CRC32 value from source string.

Parameters:
source_string source string
hash_ret calulated CRC32

Definition at line 270 of file crc.c.

References crc_32_tab, hash, _str::len, len, and _str::s.

Referenced by hash_func().

unsigned short crcitt_string ( char *  s,
int  len 
)

Return CCITT value from string.

Parameters:
s intput char
len input length
Returns:
CCITT string

Definition at line 213 of file crc.c.

References UPDCIT.

void crcitt_string_array ( char *  dst,
str  src[],
int  size 
)

CCITT value from array.

Parameters:
dst destination
src source array
size array size

Definition at line 233 of file crc.c.

References CRC16_LEN, int2reverse_hex(), _str::len, len, LM_CRIT, _str::s, and UPDCIT.

Referenced by calc_crc_suffix(), and generate_fromtag().


Variable Documentation

unsigned short int ccitt_tab[]

CRC polynomial 0x8408

Definition at line 134 of file crc.c.

unsigned short int crc_16_tab[]

CRC polynomial 0xA001

Definition at line 171 of file crc.c.

unsigned long int crc_32_tab[]

CRC polynomial 0xedb88320

Definition at line 86 of file crc.c.

Referenced by crc32_uint().


Generated on Mon May 21 18:00:38 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6