1b1b8ab34Slling /*
2b1b8ab34Slling  *  GRUB  --  GRand Unified Bootloader
3b1b8ab34Slling  *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
4b1b8ab34Slling  *
5b1b8ab34Slling  *  This program is free software; you can redistribute it and/or modify
6b1b8ab34Slling  *  it under the terms of the GNU General Public License as published by
7b1b8ab34Slling  *  the Free Software Foundation; either version 2 of the License, or
8b1b8ab34Slling  *  (at your option) any later version.
9b1b8ab34Slling  *
10b1b8ab34Slling  *  This program is distributed in the hope that it will be useful,
11b1b8ab34Slling  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12b1b8ab34Slling  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13b1b8ab34Slling  *  GNU General Public License for more details.
14b1b8ab34Slling  *
15b1b8ab34Slling  *  You should have received a copy of the GNU General Public License
16b1b8ab34Slling  *  along with this program; if not, write to the Free Software
17b1b8ab34Slling  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18b1b8ab34Slling  */
19b1b8ab34Slling /*
20*6e1f5caaSNeil Perrin  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
21b1b8ab34Slling  * Use is subject to license terms.
22b1b8ab34Slling  */
23b1b8ab34Slling 
24b1b8ab34Slling #ifndef _SYS_ZIO_CHECKSUM_H
25b1b8ab34Slling #define	_SYS_ZIO_CHECKSUM_H
26b1b8ab34Slling 
27b1b8ab34Slling /*
28b1b8ab34Slling  * Signature for checksum functions.
29b1b8ab34Slling  */
30b1b8ab34Slling typedef void zio_checksum_t(const void *data, uint64_t size, zio_cksum_t *zcp);
31b1b8ab34Slling 
32b1b8ab34Slling /*
33b1b8ab34Slling  * Information about each checksum function.
34b1b8ab34Slling  */
35b1b8ab34Slling typedef struct zio_checksum_info {
36b1b8ab34Slling 	zio_checksum_t	*ci_func[2]; /* checksum function for each byteorder */
37b1b8ab34Slling 	int		ci_correctable;	/* number of correctable bits	*/
38*6e1f5caaSNeil Perrin 	int		ci_eck;		/* uses zio embedded checksum? */
39b1b8ab34Slling 	char		*ci_name;	/* descriptive name */
40b1b8ab34Slling } zio_checksum_info_t;
41b1b8ab34Slling 
42b1b8ab34Slling #endif	/* _SYS_ZIO_CHECKSUM_H */
43