libzonecfg.h (3e9f28f0241bb7416323a7d09a20232456236287) | libzonecfg.h (ee519a1f9541a20bb76ef306dfc8e5616f8a5e26) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the | 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. | 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance 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/* | 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/* |
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. | 22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
24 * Use is subject to license terms. 25 */ 26 27#ifndef _LIBZONECFG_H 28#define _LIBZONECFG_H 29 30#pragma ident "%Z%%M% %I% %E% SMI" 31 --- 70 unchanged lines hidden (view full) --- 102 103#define ZONE_STATE_MAXSTRLEN 14 104 105#define LIBZONECFG_PATH "libzonecfg.so.1" 106 107#define ZONE_CONFIG_ROOT "/etc/zones" 108#define ZONE_INDEX_FILE ZONE_CONFIG_ROOT "/index" 109 | 23 * Use is subject to license terms. 24 */ 25 26#ifndef _LIBZONECFG_H 27#define _LIBZONECFG_H 28 29#pragma ident "%Z%%M% %I% %E% SMI" 30 --- 70 unchanged lines hidden (view full) --- 101 102#define ZONE_STATE_MAXSTRLEN 14 103 104#define LIBZONECFG_PATH "libzonecfg.so.1" 105 106#define ZONE_CONFIG_ROOT "/etc/zones" 107#define ZONE_INDEX_FILE ZONE_CONFIG_ROOT "/index" 108 |
109/* The maximum length of the VERSION string in the pkginfo(4) file. */ 110#define ZONE_PKG_VERSMAX 256 111 |
|
110/* 111 * The integer field expresses the current values on a get. 112 * On a put, it represents the new values if >= 0 or "don't change" if < 0. 113 */ 114struct zoneent { 115 char zone_name[ZONENAME_MAX]; /* name of the zone */ 116 int zone_state; /* configured | incomplete | installed */ 117 char zone_path[MAXPATHLEN]; /* path to zone storage */ --- 44 unchanged lines hidden (view full) --- 162 char zone_attr_type[MAXNAMELEN]; 163 char zone_attr_value[2 * BUFSIZ]; 164}; 165 166struct zone_dstab { 167 char zone_dataset_name[MAXNAMELEN]; 168}; 169 | 112/* 113 * The integer field expresses the current values on a get. 114 * On a put, it represents the new values if >= 0 or "don't change" if < 0. 115 */ 116struct zoneent { 117 char zone_name[ZONENAME_MAX]; /* name of the zone */ 118 int zone_state; /* configured | incomplete | installed */ 119 char zone_path[MAXPATHLEN]; /* path to zone storage */ --- 44 unchanged lines hidden (view full) --- 164 char zone_attr_type[MAXNAMELEN]; 165 char zone_attr_value[2 * BUFSIZ]; 166}; 167 168struct zone_dstab { 169 char zone_dataset_name[MAXNAMELEN]; 170}; 171 |
172struct zone_pkgtab { 173 char zone_pkg_name[MAXNAMELEN]; 174 char zone_pkg_version[ZONE_PKG_VERSMAX]; 175}; 176 177struct zone_patchtab { 178 char zone_patch_id[MAXNAMELEN]; 179}; 180 181struct zone_devpermtab { 182 char zone_devperm_name[MAXPATHLEN]; 183 uid_t zone_devperm_uid; 184 gid_t zone_devperm_gid; 185 mode_t zone_devperm_mode; 186 char *zone_devperm_acl; 187}; 188 |
|
170/* 171 * Basic configuration management routines. 172 */ 173extern zone_dochandle_t zonecfg_init_handle(void); 174extern int zonecfg_get_handle(const char *, zone_dochandle_t); 175extern int zonecfg_get_snapshot_handle(const char *, zone_dochandle_t); 176extern int zonecfg_get_template_handle(const char *, const char *, 177 zone_dochandle_t); --- 97 unchanged lines hidden (view full) --- 275 */ 276extern int zonecfg_add_ds(zone_dochandle_t, struct zone_dstab *); 277extern int zonecfg_delete_ds(zone_dochandle_t, struct zone_dstab *); 278extern int zonecfg_modify_ds(zone_dochandle_t, struct zone_dstab *, 279 struct zone_dstab *); 280extern int zonecfg_lookup_ds(zone_dochandle_t, struct zone_dstab *); 281 282/* | 189/* 190 * Basic configuration management routines. 191 */ 192extern zone_dochandle_t zonecfg_init_handle(void); 193extern int zonecfg_get_handle(const char *, zone_dochandle_t); 194extern int zonecfg_get_snapshot_handle(const char *, zone_dochandle_t); 195extern int zonecfg_get_template_handle(const char *, const char *, 196 zone_dochandle_t); --- 97 unchanged lines hidden (view full) --- 294 */ 295extern int zonecfg_add_ds(zone_dochandle_t, struct zone_dstab *); 296extern int zonecfg_delete_ds(zone_dochandle_t, struct zone_dstab *); 297extern int zonecfg_modify_ds(zone_dochandle_t, struct zone_dstab *, 298 struct zone_dstab *); 299extern int zonecfg_lookup_ds(zone_dochandle_t, struct zone_dstab *); 300 301/* |
302 * attach/detach support. 303 */ 304extern int zonecfg_get_attach_handle(const char *, const char *, 305 boolean_t, zone_dochandle_t); 306extern int zonecfg_detach_save(zone_dochandle_t); 307extern int zonecfg_get_detach_info(zone_dochandle_t, boolean_t); 308extern boolean_t zonecfg_detached(const char *); 309extern void zonecfg_rm_detached(zone_dochandle_t, boolean_t forced); 310extern int zonecfg_devwalk(zone_dochandle_t handle, 311 int (*cb)(const char *, uid_t, gid_t, mode_t, const char *, void *), 312 void *data); 313extern int zonecfg_devperms_apply(zone_dochandle_t, const char *, 314 uid_t, gid_t, mode_t, const char *); 315 316 317/* |
|
283 * '*ent' iterator routines. 284 */ 285extern int zonecfg_setfsent(zone_dochandle_t); 286extern int zonecfg_getfsent(zone_dochandle_t, struct zone_fstab *); 287extern int zonecfg_endfsent(zone_dochandle_t); 288extern int zonecfg_setipdent(zone_dochandle_t); 289extern int zonecfg_getipdent(zone_dochandle_t, struct zone_fstab *); 290extern int zonecfg_endipdent(zone_dochandle_t); --- 7 unchanged lines hidden (view full) --- 298extern int zonecfg_getattrent(zone_dochandle_t, struct zone_attrtab *); 299extern int zonecfg_endattrent(zone_dochandle_t); 300extern int zonecfg_setrctlent(zone_dochandle_t); 301extern int zonecfg_getrctlent(zone_dochandle_t, struct zone_rctltab *); 302extern int zonecfg_endrctlent(zone_dochandle_t); 303extern int zonecfg_setdsent(zone_dochandle_t); 304extern int zonecfg_getdsent(zone_dochandle_t, struct zone_dstab *); 305extern int zonecfg_enddsent(zone_dochandle_t); | 318 * '*ent' iterator routines. 319 */ 320extern int zonecfg_setfsent(zone_dochandle_t); 321extern int zonecfg_getfsent(zone_dochandle_t, struct zone_fstab *); 322extern int zonecfg_endfsent(zone_dochandle_t); 323extern int zonecfg_setipdent(zone_dochandle_t); 324extern int zonecfg_getipdent(zone_dochandle_t, struct zone_fstab *); 325extern int zonecfg_endipdent(zone_dochandle_t); --- 7 unchanged lines hidden (view full) --- 333extern int zonecfg_getattrent(zone_dochandle_t, struct zone_attrtab *); 334extern int zonecfg_endattrent(zone_dochandle_t); 335extern int zonecfg_setrctlent(zone_dochandle_t); 336extern int zonecfg_getrctlent(zone_dochandle_t, struct zone_rctltab *); 337extern int zonecfg_endrctlent(zone_dochandle_t); 338extern int zonecfg_setdsent(zone_dochandle_t); 339extern int zonecfg_getdsent(zone_dochandle_t, struct zone_dstab *); 340extern int zonecfg_enddsent(zone_dochandle_t); |
341extern int zonecfg_setpkgent(zone_dochandle_t); 342extern int zonecfg_getpkgent(zone_dochandle_t, struct zone_pkgtab *); 343extern int zonecfg_endpkgent(zone_dochandle_t); 344extern int zonecfg_setpatchent(zone_dochandle_t); 345extern int zonecfg_getpatchent(zone_dochandle_t, struct zone_patchtab *); 346extern int zonecfg_endpatchent(zone_dochandle_t); 347extern int zonecfg_setdevperment(zone_dochandle_t); 348extern int zonecfg_getdevperment(zone_dochandle_t, 349 struct zone_devpermtab *); 350extern int zonecfg_enddevperment(zone_dochandle_t); |
|
306 307/* 308 * Privilege-related functions. 309 */ 310extern int zonecfg_get_privset(priv_set_t *); 311 312/* 313 * Higher-level routines. --- 60 unchanged lines hidden --- | 351 352/* 353 * Privilege-related functions. 354 */ 355extern int zonecfg_get_privset(priv_set_t *); 356 357/* 358 * Higher-level routines. --- 60 unchanged lines hidden --- |