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 2005 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _ZONE_H 28 #define _ZONE_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 #include <sys/types.h> 33 #include <sys/zone.h> 34 #include <sys/priv.h> 35 36 #ifdef __cplusplus 37 extern "C" { 38 #endif 39 40 /* 41 * Functions for mapping between id and name for active zones. 42 */ 43 extern zoneid_t getzoneid(void); 44 extern zoneid_t getzoneidbyname(const char *); 45 extern ssize_t getzonenamebyid(zoneid_t, char *, size_t); 46 47 /* 48 * NOTE 49 * 50 * The remaining contents of this file are private to the implementation 51 * of Solaris and are subject to change at any time without notice, 52 * Applications using these interfaces may fail to run on future releases. 53 */ 54 55 extern int zonept(int, zoneid_t); 56 extern int zone_get_id(const char *, zoneid_t *); 57 58 /* System call API */ 59 extern zoneid_t zone_create(const char *, const char *, 60 const struct priv_set *, const char *, size_t, const char *, size_t, int *); 61 extern int zone_boot(zoneid_t, const char *); 62 extern int zone_destroy(zoneid_t); 63 extern ssize_t zone_getattr(zoneid_t, int, void *, size_t); 64 extern int zone_enter(zoneid_t); 65 extern int zone_list(zoneid_t *, uint_t *); 66 extern int zone_shutdown(zoneid_t); 67 extern int zone_version(int *); 68 69 #ifdef __cplusplus 70 } 71 #endif 72 73 #endif /* _ZONE_H */ 74