]> git.ozlabs.org Git - ccan/blobdiff - ccan/crcsync/crcsync.h
cast: fix compilation with GCC's -Wcast-qual
[ccan] / ccan / crcsync / crcsync.h
index 4b25562bbb793d6f1bd9b193d785a963eca5aaf6..db64b0f662ae809a4a9c388e38c1fba3ede3f7ec 100644 (file)
@@ -8,28 +8,28 @@
  * @data: pointer to the buffer to CRC
  * @len: length of the buffer
  * @blocksize: CRC of each block (final block may be shorter)
  * @data: pointer to the buffer to CRC
  * @len: length of the buffer
  * @blocksize: CRC of each block (final block may be shorter)
- * @crcbits: the number of bits of crc you want (currently 32 maximum)
+ * @crcbits: the number of bits of crc you want (currently 64 maximum)
  * @crc: the crcs (array will have (len + blocksize-1)/blocksize entries).
  *
  * Calculates the CRC of each block, and output the lower @crcbits to
  * @crc array.
  */
 void crc_of_blocks(const void *data, size_t len, unsigned int blocksize,
  * @crc: the crcs (array will have (len + blocksize-1)/blocksize entries).
  *
  * Calculates the CRC of each block, and output the lower @crcbits to
  * @crc array.
  */
 void crc_of_blocks(const void *data, size_t len, unsigned int blocksize,
-                  unsigned int crcbits, uint32_t crc[]);
+                  unsigned int crcbits, uint64_t crc[]);
 
 /**
  * crc_context_new - allocate and initialize state for crc_find_block
 
 /**
  * crc_context_new - allocate and initialize state for crc_find_block
- * @blocksize: the sie of each block
- * @crcbits: the bits valid in the CRCs (<= 32)
- * @crc: array of block crcs
+ * @blocksize: the size of each block
+ * @crcbits: the bits valid in the CRCs (<= 64)
+ * @crc: array of block crcs (including final block, if any)
  * @num_crcs: number of block crcs
  * @num_crcs: number of block crcs
- * @final_size: the final block size (<= blocksize).
+ * @tail_size: the size of final partial block, if any (< blocksize).
  *
  * Returns an allocated pointer to the structure for crc_find_block,
  *
  * Returns an allocated pointer to the structure for crc_find_block,
- * or NULL.  Makes a copy of @crc and @num_crcs.
+ * or NULL.  Makes a copy of @crc.
  */
 struct crc_context *crc_context_new(size_t blocksize, unsigned crcbits,
  */
 struct crc_context *crc_context_new(size_t blocksize, unsigned crcbits,
-                                   const uint32_t crc[], unsigned num_crcs,
+                                   const uint64_t crc[], unsigned num_crcs,
                                    size_t final_size);
 
 /**
                                    size_t final_size);
 
 /**