4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
37 #define BBLK_EINFO_VERSION (1)
39 #define EINFO_MAGIC "EXTINFO"
40 #define EINFO_MAGIC_SIZE (7)
43 typedef struct _extended_info
{
44 char magic
[EINFO_MAGIC_SIZE
];
56 enum bblk_hash_types_t
{
62 #define EINFO_PRINT_HEADER 0x01
63 #define EINFO_EASY_PARSE 0x02
65 typedef struct _hashing_function
{
69 void (*compute_hash
)(void *, const void *, unsigned int);
72 typedef struct _hashing_source
{
73 unsigned char *src_buf
;
74 unsigned int src_size
;
77 #define BBLK_DEFAULT_HASH BBLK_HASH_MD5
79 extern bblk_hash_t bblk_no_hash
;
80 extern bblk_hash_t bblk_md5_hash
;
81 extern bblk_hash_t
*bblk_hash_list
[BBLK_HASH_TOT
];
83 void print_einfo(uint8_t, bblk_einfo_t
*, unsigned long);
84 int prepare_and_write_einfo(unsigned char *, char *, bblk_hs_t
*,
85 uint32_t, uint32_t *);
86 boolean_t
einfo_should_update(bblk_einfo_t
*, bblk_hs_t
*, char *);
87 char *einfo_get_string(bblk_einfo_t
*);
88 char *einfo_get_hash(bblk_einfo_t
*);
94 #endif /* _BBLKEINFO_H */