Initial Linux ZFS GIT Repo
[zfs.git] / zfs / lib / libsolcompat / include / zone.h
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 2007 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25
26 #ifndef _ZONE_H
27 #define _ZONE_H
28
29
30
31 #include <sys/types.h>
32 #include <sys/zone.h>
33 #include <sys/priv.h>
34 #include <tsol/label.h>
35
36 #ifdef  __cplusplus
37 extern "C" {
38 #endif
39
40 #define GLOBAL_ZONEID 0
41 #define GLOBAL_ZONEID_NAME "global"
42
43 /*
44  * Functions for mapping between id and name for active zones.
45  */
46 extern zoneid_t         getzoneid(void);
47 extern zoneid_t         getzoneidbyname(const char *);
48 extern ssize_t          getzonenamebyid(zoneid_t, char *, size_t);
49
50 #if 0
51
52 /*
53  * NOTE
54  *
55  * The remaining contents of this file are private to the implementation
56  * of Solaris and are subject to change at any time without notice,
57  * Applications using these interfaces may fail to run on future releases.
58  */
59
60 extern int zonept(int, zoneid_t);
61 extern int zone_get_id(const char *, zoneid_t *);
62
63 /* System call API */
64 extern zoneid_t zone_create(const char *, const char *,
65     const struct priv_set *, const char *, size_t, const char *, size_t, int *,
66     int, int, const bslabel_t *, int);
67 extern int      zone_boot(zoneid_t);
68 extern int      zone_destroy(zoneid_t);
69 extern ssize_t  zone_getattr(zoneid_t, int, void *, size_t);
70 extern int      zone_setattr(zoneid_t, int, void *, size_t);
71 extern int      zone_enter(zoneid_t);
72 extern int      zone_list(zoneid_t *, uint_t *);
73 extern int      zone_shutdown(zoneid_t);
74 extern int      zone_version(int *);
75 extern int      zone_add_datalink(zoneid_t, char *);
76 extern int      zone_remove_datalink(zoneid_t, char *);
77 extern int      zone_check_datalink(zoneid_t *, char *);
78 extern int      zone_list_datalink(zoneid_t, int *, char *);
79
80 #endif
81
82 #ifdef  __cplusplus
83 }
84 #endif
85
86 #endif /* _ZONE_H */