xref: /onnv-gate/usr/src/lib/libbrand/common/libbrand.h (revision 3448:aaf16568054b)
12712Snn35248 /*
22712Snn35248  * CDDL HEADER START
32712Snn35248  *
42712Snn35248  * The contents of this file are subject to the terms of the
52712Snn35248  * Common Development and Distribution License (the "License").
62712Snn35248  * You may not use this file except in compliance with the License.
72712Snn35248  *
82712Snn35248  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
92712Snn35248  * or http://www.opensolaris.org/os/licensing.
102712Snn35248  * See the License for the specific language governing permissions
112712Snn35248  * and limitations under the License.
122712Snn35248  *
132712Snn35248  * When distributing Covered Code, include this CDDL HEADER in each
142712Snn35248  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
152712Snn35248  * If applicable, add the following below this CDDL HEADER, with the
162712Snn35248  * fields enclosed by brackets "[]" replaced with your own identifying
172712Snn35248  * information: Portions Copyright [yyyy] [name of copyright owner]
182712Snn35248  *
192712Snn35248  * CDDL HEADER END
202712Snn35248  */
212712Snn35248 
222712Snn35248 /*
23*3448Sdh155122  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
242712Snn35248  * Use is subject to license terms.
252712Snn35248  */
262712Snn35248 
272712Snn35248 #ifndef	_LIBBRAND_H
282712Snn35248 #define	_LIBBRAND_H
292712Snn35248 
302712Snn35248 #pragma ident	"%Z%%M%	%I%	%E% SMI"
312712Snn35248 
322712Snn35248 #ifdef	__cplusplus
332712Snn35248 extern "C" {
342712Snn35248 #endif
352712Snn35248 
362712Snn35248 #include <sys/types.h>
372712Snn35248 
382727Sedp typedef struct __brand_handle *brand_handle_t;
392712Snn35248 
402727Sedp extern brand_handle_t brand_open(const char *);
412727Sedp extern void brand_close(brand_handle_t);
422712Snn35248 
432727Sedp extern int brand_is_native(brand_handle_t);
442712Snn35248 
45*3448Sdh155122 extern boolean_t brand_allow_exclusive_ip(brand_handle_t);
46*3448Sdh155122 
472727Sedp extern int brand_get_boot(brand_handle_t, const char *, const char *,
482712Snn35248     char *, size_t, int, char **);
492727Sedp extern int brand_get_brandname(brand_handle_t, char *, size_t);
502727Sedp extern int brand_get_halt(brand_handle_t, const char *, const char *,
512712Snn35248     char *, size_t, int, char **);
522727Sedp extern int brand_get_initname(brand_handle_t, char *, size_t);
532727Sedp extern int brand_get_install(brand_handle_t, const char *, const char *,
542712Snn35248     char *, size_t, int, char **);
552727Sedp extern int brand_get_installopts(brand_handle_t, char *, size_t);
562727Sedp extern int brand_get_login_cmd(brand_handle_t, const char *, char *, size_t);
572727Sedp extern int brand_get_modname(brand_handle_t, char *, size_t);
582727Sedp extern int brand_get_postclone(brand_handle_t, const char *, const char *,
592712Snn35248     char *, size_t, int, char **);
602727Sedp extern int brand_get_verify_cfg(brand_handle_t, char *, size_t);
612727Sedp extern int brand_get_verify_adm(brand_handle_t, const char *, const char *,
622712Snn35248     char *, size_t, int, char **);
632712Snn35248 
642727Sedp extern int brand_config_iter_privilege(brand_handle_t,
652712Snn35248     int (*func)(void *, const char *, const char *), void *);
662712Snn35248 
672727Sedp extern int brand_platform_iter_devices(brand_handle_t, const char *,
68*3448Sdh155122     int (*)(void *, const char *, const char *), void *, const char *);
692727Sedp extern int brand_platform_iter_gmounts(brand_handle_t, const char *,
702712Snn35248     int (*)(void *, const char *, const char *, const char *, const char *),
712712Snn35248     void *);
722727Sedp extern int brand_platform_iter_link(brand_handle_t, int (*)(void *,
732712Snn35248     const char *, const char *), void *);
742727Sedp extern int brand_platform_iter_mounts(brand_handle_t, int (*)(void *,
752712Snn35248     const char *, const char *, const char *, const char *), void *);
762712Snn35248 
772712Snn35248 #ifdef	__cplusplus
782712Snn35248 }
792712Snn35248 #endif
802712Snn35248 
812712Snn35248 #endif	/* _LIBBRAND_H */
82