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 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
28 * basic API declarations for share management
34 #pragma ident "%Z%%M% %I% %E% SMI"
39 #include <libxml/tree.h>
41 typedef struct scfutilhandle
{
44 scf_service_t
*service
;
46 scf_transaction_t
*trans
;
47 scf_transaction_entry_t
*entry
;
48 scf_propertygroup_t
*pg
;
49 scf_instance_t
*instance
;
52 #define SCH_STATE_UNINIT 0
53 #define SCH_STATE_INITIALIZING 1
54 #define SCH_STATE_INIT 2
56 extern void sa_scf_fini(scfutilhandle_t
*);
57 extern scfutilhandle_t
*sa_scf_init();
58 extern int sa_get_config(scfutilhandle_t
*, xmlNodePtr
, sa_handle_t
);
59 extern int sa_get_instance(scfutilhandle_t
*, char *);
60 extern int sa_create_instance(scfutilhandle_t
*, char *);
63 * Shares are held in a property group with name of the form
64 * S-<GUID>. The total length of the name is 38 characters.
66 #define SA_SHARE_PG_PREFIX "S-"
67 #define SA_SHARE_PG_PREFIXLEN 2
68 #define SA_SHARE_PG_LEN 38
69 #define SA_SHARE_UUID_BUFLEN 64
72 * service instance related defines
74 #define SA_GROUP_SVC_NAME "network/shares/group"
75 #define SA_GROUP_INST_LEN 256
81 #endif /* _SCFUTIL_H */