xref: /illumos-gate/usr/src/lib/libscf/common/midlevel_impl.h (revision d48be21240dfd051b689384ce2b23479d757f2d8)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_MIDLEVEL_IMPL_H
28 #define	_MIDLEVEL_IMPL_H
29 
30 #include "libscf_impl.h"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 union scf_simple_prop_val {
37 	uint8_t		pv_bool;
38 	uint64_t	pv_uint;
39 	int64_t		pv_int;
40 	char 		*pv_str;
41 	struct pv_time {
42 		int64_t	t_sec;
43 		int32_t	t_nsec;
44 	} pv_time;
45 	struct pv_opaque {
46 		void 	*o_value;
47 		size_t	o_size;
48 	} pv_opaque;
49 };
50 
51 struct scf_simple_prop {
52 	uint32_t			pr_numvalues;
53 	uint32_t			pr_iter;
54 	scf_type_t			pr_type;
55 	char				*pr_propname;
56 	char				*pr_pgname;
57 	union scf_simple_prop_val	*pr_vallist;
58 	scf_simple_prop_t		*pr_next;
59 	struct scf_simple_pg		*pr_pg;
60 };
61 
62 struct scf_simple_pg {
63 	char			*pg_name;
64 	scf_simple_prop_t	*pg_proplist;
65 	struct scf_simple_pg	*pg_next;
66 };
67 
68 struct scf_simple_app_props {
69 	char 			*ap_fmri;
70 	struct scf_simple_pg	*ap_pglist;
71 };
72 
73 #ifdef	__cplusplus
74 }
75 #endif
76 
77 #endif	/* _MIDLEVEL_IMPL_H */
78