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 (c) 2011, Joyent, Inc. All rights reserved.
25 * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
26 */
27
28 #ifndef _LIBBRAND_H
29 #define _LIBBRAND_H
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 #include <sys/types.h>
36
37 typedef struct __brand_handle *brand_handle_t;
38
39 typedef struct priv_iter_s {
40 char *pi_name;
41 char *pi_set;
42 char *pi_iptype;
43 } priv_iter_t;
44
45 extern brand_handle_t brand_open(const char *);
46 extern void brand_close(brand_handle_t);
47
48 extern boolean_t brand_allow_exclusive_ip(brand_handle_t);
49
50 extern int brand_get_attach(brand_handle_t, const char *, const char *,
51 char *, size_t);
52 extern int brand_get_boot(brand_handle_t, const char *, const char *,
53 char *, size_t);
54 extern int brand_get_brandname(brand_handle_t, char *, size_t);
55 extern int brand_get_clone(brand_handle_t, const char *, const char *,
56 char *, size_t);
57 extern int brand_get_detach(brand_handle_t, const char *, const char *,
58 char *, size_t);
59 extern int brand_get_shutdown(brand_handle_t, const char *, const char *,
60 char *, size_t);
61 extern int brand_get_halt(brand_handle_t, const char *, const char *,
62 char *, size_t);
63 extern int brand_get_initname(brand_handle_t, char *, size_t);
64 extern boolean_t brand_restartinit(brand_handle_t);
65 extern int brand_get_install(brand_handle_t, const char *, const char *,
66 char *, size_t);
67 extern int brand_get_installopts(brand_handle_t, char *, size_t);
68 extern int brand_get_login_cmd(brand_handle_t, const char *, char *, size_t);
|
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 (c) 2011, Joyent, Inc. All rights reserved.
25 * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
26 * Copyright 2015 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
27 */
28
29 #ifndef _LIBBRAND_H
30 #define _LIBBRAND_H
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 #include <sys/types.h>
37
38 typedef struct __brand_handle *brand_handle_t;
39
40 typedef struct priv_iter_s {
41 char *pi_name;
42 char *pi_set;
43 char *pi_iptype;
44 } priv_iter_t;
45
46 extern brand_handle_t brand_open(const char *);
47 extern void brand_close(brand_handle_t);
48
49 extern boolean_t brand_allow_exclusive_ip(brand_handle_t);
50 extern boolean_t brand_auto_create_be(brand_handle_t);
51
52 extern int brand_get_attach(brand_handle_t, const char *, const char *,
53 char *, size_t);
54 extern int brand_get_boot(brand_handle_t, const char *, const char *,
55 char *, size_t);
56 extern int brand_get_brandname(brand_handle_t, char *, size_t);
57 extern int brand_get_clone(brand_handle_t, const char *, const char *,
58 char *, size_t);
59 extern int brand_get_detach(brand_handle_t, const char *, const char *,
60 char *, size_t);
61 extern int brand_get_shutdown(brand_handle_t, const char *, const char *,
62 char *, size_t);
63 extern int brand_get_halt(brand_handle_t, const char *, const char *,
64 char *, size_t);
65 extern int brand_get_initname(brand_handle_t, char *, size_t);
66 extern boolean_t brand_restartinit(brand_handle_t);
67 extern int brand_get_install(brand_handle_t, const char *, const char *,
68 char *, size_t);
69 extern int brand_get_installopts(brand_handle_t, char *, size_t);
70 extern int brand_get_login_cmd(brand_handle_t, const char *, char *, size_t);
|