instzones_api.h revision 22fb2eeb50dd2ffd3aefea05536263203fae0600
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _INSTZONES_API_H
#define _INSTZONES_API_H
/*
* Module: instzones_api.h
* Group: libinstzones
* Description: This module contains the libinstzones API data structures,
* constants, and function prototypes.
*/
/*
* required includes
*/
/* System includes */
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <termios.h>
#include <libzonecfg.h>
/*
* C++ prefix
*/
#ifdef __cplusplus
extern "C" {
#endif
/* function prototypes */
/* PRINTFLIKE1 */
typedef void (*_z_printf_fcn_t)(char *a_format, ...);
/* zone list structure */
typedef struct _zoneListElement_t *zoneList_t;
/* zone brand list structure */
typedef struct _zoneBrandList zoneBrandList_t;
/* flag for zone locking functions */
typedef unsigned long ZLOCKS_T;
/* flags for zone locking */
/*
* external function definitions
*/
/* zones.c */
extern boolean_t z_zones_are_implemented(void);
extern void z_set_zone_root(const char *zroot);
int a_zoneIndex);
int a_zoneIndex);
extern char *z_get_zonename(void);
int a_zoneIndex);
int a_zoneIndex);
int a_zoneIndex);
const char *a_zoneName, int *a_fds);
char *argv[], char *a_stdoutPath,
char *a_stderrPath, int *a_fds);
char *a_userAdminFilename);
extern zoneList_t z_get_nonglobal_zone_list(void);
const char *delim);
extern boolean_t z_non_global_zones_exist(void);
extern boolean_t z_running_in_global_zone(void);
extern int z_set_zone_spec(const char *zlist);
extern int z_verify_zone_spec(void);
extern boolean_t z_global_only(void);
int a_zoneId);
int a_zoneId);
int a_zoneId);
char **r_lzRootPath,
char *a_zoneName, char *a_gzPath,
char *a_mountPointPrefix);
extern boolean_t z_zones_are_implemented(void);
/* zones_exec.c */
/*VARARGS*/
char *a_inputFile, char *a_cmd, ...);
/* zones_paths.c */
extern boolean_t z_add_inherited_file_system(
char *a_inheritedFileSystem);
char *a_rootDir);
extern char ** z_get_inherited_file_systems(void);
extern char *z_make_zone_root(char *);
extern void z_path_canonize(char *file);
extern void z_canoninplace(char *file);
extern void z_free_inherited_file_systems(void);
/* zones_lofs.c */
extern void z_destroyMountTable(void);
extern int z_createMountTable(void);
extern int z_isPathWritable(const char *);
/* zones_states.c */
extern int UmountAllZones(char *mntpnt);
/*
* C++ postfix
*/
#ifdef __cplusplus
}
#endif
#endif /* _INSTZONES_API_H */