manifest_hash.h revision 1f1b4534d71aed709610465bceff2b8e38ddd6df
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER START
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Common Development and Distribution License (the "License").
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You may not use this file except in compliance with the License.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * or http://www.opensolaris.org/os/licensing.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/*
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Use is subject to license terms.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ifndef _MANIFEST_HASH_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define _MANIFEST_HASH_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#pragma ident "%Z%%M% %I% %E% SMI"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include <sys/types.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include <libscf.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include <md5.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ifdef __cplusplus
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern "C" {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define MHASH_SIZE (MD5_DIGEST_LENGTH * 2)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define MHASH_SIZE_OLD MD5_DIGEST_LENGTH
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define MHASH_SVC "smf/manifest"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define MHASH_PG_TYPE "framework"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define MHASH_PG_FLAGS 0
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define MHASH_PROP "md5sum"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define MHASH_FORMAT_V1 "%llx%lx%llx%lx"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define MHASH_FORMAT_V2 "%lx%lx%llx%lx"
char *mhash_filename_to_propname(const char *);
int mhash_retrieve_entry(scf_handle_t *, const char *, uchar_t *);
int mhash_store_entry(scf_handle_t *, const char *, uchar_t *, char **);
int mhash_test_file(scf_handle_t *, const char *, uint_t, char **, uchar_t *);
#ifdef __cplusplus
}
#endif
#endif /* _MANIFEST_HASH_H */