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.
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.
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]
23 * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright (c) 2015, Joyent, Inc.
25 * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
35 #include <sys/types.h>
37 typedef struct __brand_handle
*brand_handle_t
;
39 typedef struct priv_iter_s
{
45 extern brand_handle_t
brand_open(const char *);
46 extern void brand_close(brand_handle_t
);
48 extern boolean_t
brand_allow_exclusive_ip(brand_handle_t
);
50 extern int brand_get_attach(brand_handle_t
, const char *, const char *,
52 extern int brand_get_boot(brand_handle_t
, const char *, const char *,
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 *,
57 extern int brand_get_detach(brand_handle_t
, const char *, const char *,
59 extern int brand_get_shutdown(brand_handle_t
, const char *, const char *,
61 extern int brand_get_halt(brand_handle_t
, const char *, const char *,
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 *,
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);
69 extern int brand_get_forcedlogin_cmd(brand_handle_t
, const char *,
71 extern int brand_get_modname(brand_handle_t
, char *, size_t);
72 extern int brand_get_postattach(brand_handle_t
, const char *, const char *,
74 extern int brand_get_postclone(brand_handle_t
, const char *, const char *,
76 extern int brand_get_postinstall(brand_handle_t
, const char *, const char *,
78 extern int brand_get_postsnap(brand_handle_t
, const char *, const char *,
80 extern int brand_get_poststatechange(brand_handle_t
, const char *, const char *,
82 extern int brand_get_predetach(brand_handle_t
, const char *, const char *,
84 extern int brand_get_presnap(brand_handle_t
, const char *, const char *,
86 extern int brand_get_prestatechange(brand_handle_t
, const char *, const char *,
88 extern int brand_get_preuninstall(brand_handle_t
, const char *, const char *,
90 extern int brand_get_query(brand_handle_t
, const char *, const char *,
92 extern int brand_get_uninstall(brand_handle_t
, const char *, const char *,
94 extern int brand_get_validatesnap(brand_handle_t
, const char *, const char *,
96 extern int brand_get_user_cmd(brand_handle_t
, const char *, char *, size_t);
97 extern int brand_get_verify_cfg(brand_handle_t
, char *, size_t);
98 extern int brand_get_verify_adm(brand_handle_t
, const char *, const char *,
100 extern int brand_get_sysboot(brand_handle_t
, const char *, const char *, char *,
103 extern int brand_config_iter_privilege(brand_handle_t
,
104 int (*func
)(void *, priv_iter_t
*), void *);
106 extern int brand_platform_iter_devices(brand_handle_t
, const char *,
107 int (*)(void *, const char *, const char *), void *, const char *);
108 extern int brand_platform_iter_gmounts(brand_handle_t
, const char *,
109 const char *, int (*)(void *, const char *, const char *, const char *,
110 const char *), void *);
111 extern int brand_platform_iter_link(brand_handle_t
, int (*)(void *,
112 const char *, const char *), void *);
113 extern int brand_platform_iter_mounts(brand_handle_t
, int (*)(void *,
114 const char *, const char *, const char *, const char *), void *);
120 #endif /* _LIBBRAND_H */