xref: /titanic_52/usr/src/common/zfs/zfs_fletcher.h (revision 45818ee124adeaaf947698996b4f4c722afc6d1f)
1495db6fbSLori Alt /*
2495db6fbSLori Alt  * CDDL HEADER START
3495db6fbSLori Alt  *
4495db6fbSLori Alt  * The contents of this file are subject to the terms of the
5495db6fbSLori Alt  * Common Development and Distribution License (the "License").
6495db6fbSLori Alt  * You may not use this file except in compliance with the License.
7495db6fbSLori Alt  *
8495db6fbSLori Alt  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9495db6fbSLori Alt  * or http://www.opensolaris.org/os/licensing.
10495db6fbSLori Alt  * See the License for the specific language governing permissions
11495db6fbSLori Alt  * and limitations under the License.
12495db6fbSLori Alt  *
13495db6fbSLori Alt  * When distributing Covered Code, include this CDDL HEADER in each
14495db6fbSLori Alt  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15495db6fbSLori Alt  * If applicable, add the following below this CDDL HEADER, with the
16495db6fbSLori Alt  * fields enclosed by brackets "[]" replaced with your own identifying
17495db6fbSLori Alt  * information: Portions Copyright [yyyy] [name of copyright owner]
18495db6fbSLori Alt  *
19495db6fbSLori Alt  * CDDL HEADER END
20495db6fbSLori Alt  */
21495db6fbSLori Alt /*
22495db6fbSLori Alt  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23495db6fbSLori Alt  * Use is subject to license terms.
24495db6fbSLori Alt  */
25*45818ee1SMatthew Ahrens /*
26*45818ee1SMatthew Ahrens  * Copyright 2013 Saso Kiselkov. All rights reserved.
27*45818ee1SMatthew Ahrens  */
28495db6fbSLori Alt 
29495db6fbSLori Alt #ifndef	_ZFS_FLETCHER_H
30495db6fbSLori Alt #define	_ZFS_FLETCHER_H
31495db6fbSLori Alt 
32495db6fbSLori Alt #include <sys/types.h>
33495db6fbSLori Alt #include <sys/spa.h>
34495db6fbSLori Alt 
35495db6fbSLori Alt #ifdef	__cplusplus
36495db6fbSLori Alt extern "C" {
37495db6fbSLori Alt #endif
38495db6fbSLori Alt 
39495db6fbSLori Alt /*
40495db6fbSLori Alt  * fletcher checksum functions
41495db6fbSLori Alt  */
42495db6fbSLori Alt 
43*45818ee1SMatthew Ahrens void fletcher_2_native(const void *, uint64_t, const void *, zio_cksum_t *);
44*45818ee1SMatthew Ahrens void fletcher_2_byteswap(const void *, uint64_t, const void *, zio_cksum_t *);
45*45818ee1SMatthew Ahrens void fletcher_4_native(const void *, uint64_t, const void *, zio_cksum_t *);
46*45818ee1SMatthew Ahrens void fletcher_4_byteswap(const void *, uint64_t, const void *, zio_cksum_t *);
47*45818ee1SMatthew Ahrens void fletcher_4_incremental_native(const void *, uint64_t, zio_cksum_t *);
48*45818ee1SMatthew Ahrens void fletcher_4_incremental_byteswap(const void *, uint64_t, zio_cksum_t *);
49495db6fbSLori Alt 
50495db6fbSLori Alt #ifdef	__cplusplus
51495db6fbSLori Alt }
52495db6fbSLori Alt #endif
53495db6fbSLori Alt 
54495db6fbSLori Alt #endif	/* _ZFS_FLETCHER_H */
55