Motr  M0
crc.c File Reference
#include "lib/misc.h"
Include dependency graph for crc.c:

Go to the source code of this file.

Macros

#define CRC_POLY   0x04C11DB7
 
#define CRC_WIDTH   32
 
#define CRC_SLICE_SIZE   8
 
#define CRC_TABLE_SIZE   256
 

Functions

static uint64_t md_crc32_cksum (void *data, uint64_t len, uint64_t *cksum)
 
static void crc_mktable (void)
 
static uint32_t crc32 (uint32_t crc, unsigned char const *data, m0_bcount_t len)
 
M0_INTERNAL void m0_crc32 (const void *data, uint64_t len, uint64_t *cksum)
 
M0_INTERNAL bool m0_crc32_chk (const void *data, uint64_t len, const uint64_t *cksum)
 
static void md_crc32_cksum_set (void *data, uint64_t len, uint64_t *cksum)
 
static bool md_crc32_cksum_check (void *data, uint64_t len, uint64_t *cksum)
 

Variables

uint32_t crc_table [CRC_TABLE_SIZE]
 
static bool is_table = false