/usr/include/rados/crc32c.h is in librados-dev 10.2.11-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #ifndef CEPH_CRC32C_H
#define CEPH_CRC32C_H
#include <inttypes.h>
#include <string.h>
typedef uint32_t (*ceph_crc32c_func_t)(uint32_t crc, unsigned char const *data, unsigned length);
/*
* this is a static global with the chosen crc32c implementation for
* the given architecture.
*/
extern ceph_crc32c_func_t ceph_crc32c_func;
extern ceph_crc32c_func_t ceph_choose_crc32(void);
/**
* calculate crc32c
*
* Note: if the data pointer is NULL, we calculate a crc value as if
* it were zero-filled.
*
* @param crc initial value
* @param data pointer to data buffer
* @param length length of buffer
*/
static inline uint32_t ceph_crc32c(uint32_t crc, unsigned char const *data, unsigned length)
{
return ceph_crc32c_func(crc, data, length);
}
#endif
|