xref: /titanic_44/usr/src/lib/libv12n/common/libv12n.h (revision 3c112a2b34403220c06c3e2fcac403358cfba168)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef _SYS_LIBV12N_H
27 #define	_SYS_LIBV12N_H
28 
29 #include <sys/types.h>
30 #include <uuid/uuid.h>
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /* Max length of an v12n name/uuid/serialno */
37 #define	V12N_NAME_MAX		1024
38 
39 /* Virtualization capabilities - bit mask */
40 #define	V12N_CAP_SUPPORTED	0x1	/* Virtualization supported */
41 #define	V12N_CAP_ENABLED	0x2	/* Virtualization enabled */
42 #define	V12N_CAP_IMPL_LDOMS	0x4	/* LDoms Implementation */
43 
44 /* LDoms Domain role types - bit mask */
45 #define	V12N_ROLE_CONTROL	0x1	/* LDoms Ctrl domain (zero = Guest) */
46 #define	V12N_ROLE_IO		0x2	/* I/O domain */
47 #define	V12N_ROLE_SERVICE	0x4	/* Service domain */
48 #define	V12N_ROLE_ROOT		0x8	/* Root domain */
49 
50 int v12n_capabilities(void);
51 int v12n_domain_roles(void);
52 int v12n_domain_uuid(uuid_t);
53 size_t v12n_domain_name(char *, size_t);
54 size_t v12n_ctrl_domain(char *, size_t);
55 size_t v12n_chassis_serialno(char *, size_t);
56 
57 #ifdef	__cplusplus
58 }
59 #endif
60 
61 #endif /* _SYS_LIBV12N_H */
62