19#ifndef __OSMO_CRC64GEN_H__
20#define __OSMO_CRC64GEN_H__
32#include <osmocom/core/bits.h>
44 const ubit_t *in,
int len);
46 const ubit_t *in,
int len,
const ubit_t *crc_bits);
48 const ubit_t *in,
int len, ubit_t *crc_bits);
void osmo_crc64gen_set_bits(const struct osmo_crc64gen_code *code, const ubit_t *in, int len, ubit_t *crc_bits)
Computes and writes the CRC value of a given array of bits.
Definition: crc64gen.c:102
int osmo_crc64gen_check_bits(const struct osmo_crc64gen_code *code, const ubit_t *in, int len, const ubit_t *crc_bits)
Checks the CRC value of a given array of hard-bits.
Definition: crc64gen.c:77
uint64_t osmo_crc64gen_compute_bits(const struct osmo_crc64gen_code *code, const ubit_t *in, int len)
Compute the CRC value of a given array of hard-bits.
Definition: crc64gen.c:42
structure describing a given CRC code of max 64 bits
Definition: crc64gen.h:36
uint64_t remainder
Remainder of the CRC (final XOR)
Definition: crc64gen.h:40
int bits
Actual number of bits of the CRC.
Definition: crc64gen.h:37
uint64_t init
Initialization value of the CRC state.
Definition: crc64gen.h:39
uint64_t poly
Polynom (normal representation, MSB omitted.
Definition: crc64gen.h:38