Print this page
2594 implement graceful shutdown for local zones in zoneadm


   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 /*
  23  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.

  24  */
  25 
  26 #ifndef _LIBBRAND_H
  27 #define _LIBBRAND_H
  28 
  29 #ifdef  __cplusplus
  30 extern "C" {
  31 #endif
  32 
  33 #include <sys/types.h>
  34 
  35 typedef struct __brand_handle *brand_handle_t;
  36 
  37 typedef struct priv_iter_s {
  38         char    *pi_name;
  39         char    *pi_set;
  40         char    *pi_iptype;
  41 } priv_iter_t;
  42 
  43 extern brand_handle_t brand_open(const char *);
  44 extern void brand_close(brand_handle_t);
  45 
  46 extern boolean_t brand_allow_exclusive_ip(brand_handle_t);
  47 
  48 extern int brand_get_attach(brand_handle_t, const char *, const char *,
  49     char *, size_t);
  50 extern int brand_get_boot(brand_handle_t, const char *, const char *,
  51     char *, size_t);
  52 extern int brand_get_brandname(brand_handle_t, char *, size_t);
  53 extern int brand_get_clone(brand_handle_t, const char *, const char *,
  54     char *, size_t);
  55 extern int brand_get_detach(brand_handle_t, const char *, const char *,
  56     char *, size_t);


  57 extern int brand_get_halt(brand_handle_t, const char *, const char *,
  58     char *, size_t);
  59 extern int brand_get_initname(brand_handle_t, char *, size_t);
  60 extern int brand_get_install(brand_handle_t, const char *, const char *,
  61     char *, size_t);
  62 extern int brand_get_installopts(brand_handle_t, char *, size_t);
  63 extern int brand_get_login_cmd(brand_handle_t, const char *, char *, size_t);
  64 extern int brand_get_forcedlogin_cmd(brand_handle_t, const char *,
  65     char *, size_t);
  66 extern int brand_get_modname(brand_handle_t, char *, size_t);
  67 extern int brand_get_postattach(brand_handle_t, const char *, const char *,
  68     char *, size_t);
  69 extern int brand_get_postclone(brand_handle_t, const char *, const char *,
  70     char *, size_t);
  71 extern int brand_get_postinstall(brand_handle_t, const char *, const char *,
  72     char *, size_t);
  73 extern int brand_get_postsnap(brand_handle_t, const char *, const char *,
  74     char *, size_t);
  75 extern int brand_get_poststatechange(brand_handle_t, const char *, const char *,
  76     char *, size_t);




   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 /*
  23  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  24  * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
  25  */
  26 
  27 #ifndef _LIBBRAND_H
  28 #define _LIBBRAND_H
  29 
  30 #ifdef  __cplusplus
  31 extern "C" {
  32 #endif
  33 
  34 #include <sys/types.h>
  35 
  36 typedef struct __brand_handle *brand_handle_t;
  37 
  38 typedef struct priv_iter_s {
  39         char    *pi_name;
  40         char    *pi_set;
  41         char    *pi_iptype;
  42 } priv_iter_t;
  43 
  44 extern brand_handle_t brand_open(const char *);
  45 extern void brand_close(brand_handle_t);
  46 
  47 extern boolean_t brand_allow_exclusive_ip(brand_handle_t);
  48 
  49 extern int brand_get_attach(brand_handle_t, const char *, const char *,
  50     char *, size_t);
  51 extern int brand_get_boot(brand_handle_t, const char *, const char *,
  52     char *, size_t);
  53 extern int brand_get_brandname(brand_handle_t, char *, size_t);
  54 extern int brand_get_clone(brand_handle_t, const char *, const char *,
  55     char *, size_t);
  56 extern int brand_get_detach(brand_handle_t, const char *, const char *,
  57     char *, size_t);
  58 extern int brand_get_shutdown(brand_handle_t, const char *, const char *,
  59     char *, size_t);
  60 extern int brand_get_halt(brand_handle_t, const char *, const char *,
  61     char *, size_t);
  62 extern int brand_get_initname(brand_handle_t, char *, size_t);
  63 extern int brand_get_install(brand_handle_t, const char *, const char *,
  64     char *, size_t);
  65 extern int brand_get_installopts(brand_handle_t, char *, size_t);
  66 extern int brand_get_login_cmd(brand_handle_t, const char *, char *, size_t);
  67 extern int brand_get_forcedlogin_cmd(brand_handle_t, const char *,
  68     char *, size_t);
  69 extern int brand_get_modname(brand_handle_t, char *, size_t);
  70 extern int brand_get_postattach(brand_handle_t, const char *, const char *,
  71     char *, size_t);
  72 extern int brand_get_postclone(brand_handle_t, const char *, const char *,
  73     char *, size_t);
  74 extern int brand_get_postinstall(brand_handle_t, const char *, const char *,
  75     char *, size_t);
  76 extern int brand_get_postsnap(brand_handle_t, const char *, const char *,
  77     char *, size_t);
  78 extern int brand_get_poststatechange(brand_handle_t, const char *, const char *,
  79     char *, size_t);