af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * CDDL HEADER START
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * The contents of this file are subject to the terms of the
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * Common Development and Distribution License (the "License").
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * You may not use this file except in compliance with the License.
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * or http://www.opensolaris.org/os/licensing.
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * See the License for the specific language governing permissions
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * and limitations under the License.
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * When distributing Covered Code, include this CDDL HEADER in each
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * If applicable, add the following below this CDDL HEADER, with the
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * fields enclosed by brackets "[]" replaced with your own identifying
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * information: Portions Copyright [yyyy] [name of copyright owner]
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * CDDL HEADER END
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems#define BBLK_EINFO_VERSION (1)
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems#define EINFO_MAGIC "EXTINFO"
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystemstypedef struct _extended_info {
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems char magic[EINFO_MAGIC_SIZE];
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems#define EINFO_PRINT_HEADER 0x01
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems#define EINFO_EASY_PARSE 0x02
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystemstypedef struct _hashing_function {
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems void (*compute_hash)(void *, const void *, unsigned int);
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystemstypedef struct _hashing_source {
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems#define BBLK_DEFAULT_HASH BBLK_HASH_MD5
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystemsextern bblk_hash_t bblk_no_hash;
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystemsextern bblk_hash_t bblk_md5_hash;
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystemsextern bblk_hash_t *bblk_hash_list[BBLK_HASH_TOT];
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystemsvoid print_einfo(uint8_t, bblk_einfo_t *, unsigned long);
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystemsint prepare_and_write_einfo(unsigned char *, char *, bblk_hs_t *,
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystemsboolean_t einfo_should_update(bblk_einfo_t *, bblk_hs_t *, char *);
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystemschar *einfo_get_string(bblk_einfo_t *);
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystemschar *einfo_get_hash(bblk_einfo_t *);
af28f636873b7156cfd73ceffa927658cca33fd0Enrico Perla - Sun Microsystems#endif /* _BBLKEINFO_H */