diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-05-03 11:20:02 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-05-03 11:20:02 -0500 |
commit | 25565e8595322b04902a09ebf877d80532f22fd1 (patch) | |
tree | 9e20558a4f98bf2bb59ba288cd066d9abe98963f /include/qemu | |
parent | c9e53a4cf116dae72d779c7748153cedd2e84228 (diff) | |
parent | 86abefd61e23325162e59e5bfb8f0346eda62541 (diff) | |
download | qemu-25565e8595322b04902a09ebf877d80532f22fd1.zip qemu-25565e8595322b04902a09ebf877d80532f22fd1.tar.gz qemu-25565e8595322b04902a09ebf877d80532f22fd1.tar.bz2 |
Merge remote-tracking branch 'stefanha/block' into staging
# By Fam Zheng (8) and others
# Via Stefan Hajnoczi
* stefanha/block:
qemu-iotests: Filter out 'adapter_type'
nbd: support large NBD requests
nbd: use g_slice_new() instead of a freelist
qemu-iotests: Filter out vmdk creation options
vmdk: add bdrv_co_write_zeroes
vmdk: store fields of VmdkMetaData in cpu endian
vmdk: change magic number to macro
vmdk: Add option to create zeroed-grain image
vmdk: add support for “zeroed‐grain” GTE
vmdk: named return code.
blockdev: Replace "undefined error" in qmp_block_resize
block: add read-only support to VHDX image format.
block: initial VHDX driver support framework - supports open and probe
block: vhdx header for the QEMU support of VHDX images
qemu: add castagnoli crc32c checksum algorithm
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/crc32c.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/qemu/crc32c.h b/include/qemu/crc32c.h new file mode 100644 index 0000000..56d1c3b --- /dev/null +++ b/include/qemu/crc32c.h @@ -0,0 +1,35 @@ +/* + * Castagnoli CRC32C Checksum Algorithm + * + * Polynomial: 0x11EDC6F41 + * + * Castagnoli93: Guy Castagnoli and Stefan Braeuer and Martin Herrman + * "Optimization of Cyclic Redundancy-Check Codes with 24 + * and 32 Parity Bits",IEEE Transactions on Communication, + * Volume 41, Number 6, June 1993 + * + * Copyright (c) 2013 Red Hat, Inc., + * + * Authors: + * Jeff Cody <jcody@redhat.com> + * + * Based on the Linux kernel cryptographic crc32c module, + * + * Copyright (c) 2004 Cisco Systems, Inc. + * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + */ + +#ifndef QEMU_CRC32_H +#define QEMU_CRC32_H + +#include "qemu-common.h" + +uint32_t crc32c(uint32_t crc, const uint8_t *data, unsigned int length); + +#endif |