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]
22 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
44 #include <sys/types.h>
55 typedef struct fs_smfhandle
{
56 scf_handle_t
*fs_handle
;
57 scf_service_t
*fs_service
;
58 scf_scope_t
*fs_scope
;
59 scf_instance_t
*fs_instance
;
60 scf_propertygroup_t
*fs_pg
;
61 scf_property_t
*fs_property
;
62 scf_value_t
*fs_value
;
65 #define DEFAULT_INSTANCE "default"
68 * NFS Property Group names.
70 #define SMF_PG_NFSPROPS ((const char *)"com.oracle.nfs,props")
71 #define NFS_PROPS_PGNAME ((const char *)"nfs-props")
72 #define SVC_NFS_CLIENT "svc:/network/nfs/client"
75 * AUTOFS Property Group Names.
77 #define SMF_PG_AUTOFS ((const char *)"com.oracle.autofs,props")
78 #define AUTOFS_PROPS_PGNAME ((const char *)"autofs-props")
80 #define AUTOFS_FMRI "svc:/system/filesystem/autofs"
81 #define AUTOFS_DEFAULT_FMRI "svc:/system/filesystem/autofs:default"
88 #define SMF_SYSTEM_ERR -1
89 #define STATE_INITIALIZING 1
90 #define SMF_NO_PERMISSION 2
91 #define SMF_NO_PGTYPE 3
93 extern int nfs_smf_get_iprop(char *, int *, char *, scf_type_t
, char *);
94 extern int nfs_smf_get_prop(char *, char *, char *, scf_type_t
, char *, int *);
95 extern int fs_smf_get_prop(smf_fstype_t
, char *, char *, char *, scf_type_t
,
97 extern int nfs_smf_set_prop(char *, char *, char *, scf_type_t
, char *);
98 extern int fs_smf_set_prop(smf_fstype_t
, char *, char *,
99 char *, scf_type_t
, char *);
100 extern int autofs_smf_set_prop(char *, char *, char *, scf_type_t
, char *);
101 extern int autofs_smf_get_prop(char *, char *, char *, scf_type_t
,
103 extern void fs_smf_fini(fs_smfhandle_t
*);
104 extern boolean_t
string_to_boolean(const char *);
110 #endif /* _SMFCFG_H */