xref: /titanic_50/usr/src/lib/libscf/common/midlevel_impl.h (revision 7c2fbfb345896881c631598ee3852ce9ce33fb07)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #include "libscf_impl.h"
33 
34 #ifdef	__cplusplus
35 extern "C" {
36 #endif
37 
38 union scf_simple_prop_val {
39 	uint8_t		pv_bool;
40 	uint64_t	pv_uint;
41 	int64_t		pv_int;
42 	char 		*pv_str;
43 	struct pv_time {
44 		int64_t	t_sec;
45 		int32_t	t_nsec;
46 	} pv_time;
47 	struct pv_opaque {
48 		void 	*o_value;
49 		size_t	o_size;
50 	} pv_opaque;
51 };
52 
53 struct scf_simple_prop {
54 	uint32_t			pr_numvalues;
55 	uint32_t			pr_iter;
56 	scf_type_t			pr_type;
57 	char				*pr_propname;
58 	char				*pr_pgname;
59 	union scf_simple_prop_val	*pr_vallist;
60 	scf_simple_prop_t		*pr_next;
61 	struct scf_simple_pg		*pr_pg;
62 };
63 
64 struct scf_simple_pg {
65 	char			*pg_name;
66 	scf_simple_prop_t	*pg_proplist;
67 	struct scf_simple_pg	*pg_next;
68 };
69 
70 struct scf_simple_app_props {
71 	char 			*ap_fmri;
72 	struct scf_simple_pg	*ap_pglist;
73 };
74 
75 #ifdef	__cplusplus
76 }
77 #endif
78 
79 #endif	/* _MIDLEVEL_IMPL_H */
80