xref: /titanic_50/usr/src/cmd/svc/common/manifest_find.h (revision 6a634c9dca3093f3922e4b7ab826d7bdf17bf78e)
19444c26fSTom Whitten /*
29444c26fSTom Whitten  * CDDL HEADER START
39444c26fSTom Whitten  *
49444c26fSTom Whitten  * The contents of this file are subject to the terms of the
59444c26fSTom Whitten  * Common Development and Distribution License (the "License").
69444c26fSTom Whitten  * You may not use this file except in compliance with the License.
79444c26fSTom Whitten  *
89444c26fSTom Whitten  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
99444c26fSTom Whitten  * or http://www.opensolaris.org/os/licensing.
109444c26fSTom Whitten  * See the License for the specific language governing permissions
119444c26fSTom Whitten  * and limitations under the License.
129444c26fSTom Whitten  *
139444c26fSTom Whitten  * When distributing Covered Code, include this CDDL HEADER in each
149444c26fSTom Whitten  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
159444c26fSTom Whitten  * If applicable, add the following below this CDDL HEADER, with the
169444c26fSTom Whitten  * fields enclosed by brackets "[]" replaced with your own identifying
179444c26fSTom Whitten  * information: Portions Copyright [yyyy] [name of copyright owner]
189444c26fSTom Whitten  *
199444c26fSTom Whitten  * CDDL HEADER END
209444c26fSTom Whitten  */
219444c26fSTom Whitten 
229444c26fSTom Whitten /*
23adfc3118STruong Nguyen  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
249444c26fSTom Whitten  */
259444c26fSTom Whitten 
269444c26fSTom Whitten #ifndef _MANIFEST_FIND_H
279444c26fSTom Whitten #define	_MANIFEST_FIND_H
289444c26fSTom Whitten 
299444c26fSTom Whitten #ifdef __cplusplus
309444c26fSTom Whitten extern "C" {
319444c26fSTom Whitten #endif
329444c26fSTom Whitten 
339444c26fSTom Whitten #include <sys/types.h>
34*293e3ab3STruong Q. Nguyen #include <libscf.h>
359444c26fSTom Whitten #include "manifest_hash.h"
369444c26fSTom Whitten 
379444c26fSTom Whitten #define	CHECKHASH	0x1
389444c26fSTom Whitten #define	CHECKEXT	0x2
39adfc3118STruong Nguyen #define	BUNDLE_PROF	0x4
40adfc3118STruong Nguyen #define	BUNDLE_MFST	0x8
419444c26fSTom Whitten 
429444c26fSTom Whitten typedef struct manifest_info {
439444c26fSTom Whitten 	const char	*mi_path;	/* Path of manifest file */
449444c26fSTom Whitten 	const char	*mi_prop;	/* Property that holds manifest hash */
459444c26fSTom Whitten 	uchar_t		mi_hash[MHASH_SIZE]; /* Manifest hash */
469444c26fSTom Whitten } manifest_info_t;
479444c26fSTom Whitten 
489444c26fSTom Whitten /*
49adfc3118STruong Nguyen  * Declare functions that are used for finding service bundle files in a
509444c26fSTom Whitten  * directory.
519444c26fSTom Whitten  */
529444c26fSTom Whitten 
539444c26fSTom Whitten 
54*293e3ab3STruong Q. Nguyen int find_manifests(scf_handle_t *, const char *, manifest_info_t ***, int);
559444c26fSTom Whitten void free_manifest_array(manifest_info_t **);
569444c26fSTom Whitten 
579444c26fSTom Whitten #ifdef __cplusplus
589444c26fSTom Whitten }
599444c26fSTom Whitten #endif
609444c26fSTom Whitten 
619444c26fSTom Whitten #endif /* _MANIFEST_FIND_H */
62