]> git.ipfire.org Git - people/ms/u-boot.git/blame - include/zfs/zio_checksum.h
Merge tag 'xilinx-for-v2018.03' of git://git.denx.de/u-boot-microblaze
[people/ms/u-boot.git] / include / zfs / zio_checksum.h
CommitLineData
4d3c95f5
JL
1/*
2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
4 *
1a459660 5 * SPDX-License-Identifier: GPL-2.0+
4d3c95f5
JL
6 */
7/*
8 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
9 * Use is subject to license terms.
10 */
11
12#ifndef _SYS_ZIO_CHECKSUM_H
13#define _SYS_ZIO_CHECKSUM_H
14
15/*
16 * Signature for checksum functions.
17 */
18typedef void zio_checksum_t(const void *data, uint64_t size,
19 zfs_endian_t endian, zio_cksum_t *zcp);
20
21/*
22 * Information about each checksum function.
23 */
24typedef struct zio_checksum_info {
25 zio_checksum_t *ci_func; /* checksum function for each byteorder */
26 int ci_correctable; /* number of correctable bits */
27 int ci_eck; /* uses zio embedded checksum? */
28 char *ci_name; /* descriptive name */
29} zio_checksum_info_t;
30
31extern void zio_checksum_SHA256(const void *, uint64_t,
32 zfs_endian_t endian, zio_cksum_t *);
33extern void fletcher_2_endian(const void *, uint64_t, zfs_endian_t endian,
34 zio_cksum_t *);
35extern void fletcher_4_endian(const void *, uint64_t, zfs_endian_t endian,
36 zio_cksum_t *);
37
38#endif /* _SYS_ZIO_CHECKSUM_H */