/*
* 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
*/
/*
*/
#ifndef _ZONECFG_H
#define _ZONECFG_H
/*
* header file for zonecfg command
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <unistd.h>
#define CMD_ADD 0
/* resource types: increment RT_MAX when expanding this list */
#define RT_UNKNOWN 0
/* property types: increment PT_MAX when expanding this list */
#define PT_UNKNOWN 0
#define PROP_VAL_SIMPLE 0
/*
* If any subcommand is ever modified to take more than three arguments,
* this will need to be incremented.
*/
typedef struct complex_property {
char *cp_value;
typedef struct list_property {
char *lp_simple;
typedef struct property_value {
char *pv_simple;
typedef struct cmd {
char *cmd_name;
int cmd_res_type;
int cmd_prop_nv_pairs;
int cmd_argc;
} cmd_t;
extern void cancel_func(cmd_t *);
extern void commit_func(cmd_t *);
extern void create_func(cmd_t *);
extern void delete_func(cmd_t *);
extern void export_func(cmd_t *);
extern void remove_func(cmd_t *);
extern void revert_func(cmd_t *);
extern void select_func(cmd_t *);
extern void verify_func(cmd_t *);
extern void clear_func(cmd_t *);
extern complex_property_ptr_t alloc_complex(void);
extern list_property_ptr_t alloc_list(void);
extern char *res_types[];
extern char *prop_types[];
/*
* NOTE: Only Lex and YACC should use the following functions.
*/
extern void assert_no_unclaimed_tokens(void);
extern char *claim_token(char *);
#ifdef __cplusplus
}
#endif
#endif /* _ZONECFG_H */