dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libshare / common / scfutil.h
blob626f14054df31b404dc795a93798fd4a9b294658
1 /*
2 * CDDL HEADER START
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]
19 * CDDL HEADER END
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
28 * basic API declarations for share management
31 #ifndef _SCFUTIL_H
32 #define _SCFUTIL_H
34 #pragma ident "%Z%%M% %I% %E% SMI"
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 #include <libxml/tree.h>
41 typedef struct scfutilhandle {
42 scf_handle_t *handle;
43 int scf_state;
44 scf_service_t *service;
45 scf_scope_t *scope;
46 scf_transaction_t *trans;
47 scf_transaction_entry_t *entry;
48 scf_propertygroup_t *pg;
49 scf_instance_t *instance;
50 } scfutilhandle_t;
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
77 #ifdef __cplusplus
79 #endif
81 #endif /* _SCFUTIL_H */