Print this page
195 Need replacement for nfs/lockd+klm
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/fs.d/nfs/lib/smfcfg.h
+++ new/usr/src/cmd/fs.d/nfs/lib/smfcfg.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
23 23 */
24 24
25 25 #ifndef _SMFCFG_H
26 26 #define _SMFCFG_H
27 27
28 28 #include <stdio.h>
29 29 #include <stdlib.h>
30 30 #include <syslog.h>
31 31 #include <stdarg.h>
32 32 #include <rpc/rpc.h>
33 33 #include <synch.h>
34 34 #include <thread.h>
35 35 #include <libintl.h>
36 36 #include <strings.h>
37 37 #include <inttypes.h>
38 38 #include <limits.h>
39 39 #include <assert.h>
40 40 #include <libscf.h>
41 41 #include <libshare.h>
42 42 #include <locale.h>
43 43 #include <errno.h>
44 44 #include <sys/types.h>
45 45
46 46 #ifdef __cplusplus
47 47 extern "C" {
48 48 #endif
49 49
50 50 typedef enum {
51 51 NFS_SMF = 1,
52 52 AUTOFS_SMF
53 53 } smf_fstype_t;
54 54
55 55 typedef struct fs_smfhandle {
56 56 scf_handle_t *fs_handle;
57 57 scf_service_t *fs_service;
58 58 scf_scope_t *fs_scope;
59 59 scf_instance_t *fs_instance;
60 60 scf_propertygroup_t *fs_pg;
61 61 scf_property_t *fs_property;
62 62 scf_value_t *fs_value;
63 63 } fs_smfhandle_t;
64 64
65 65 #define DEFAULT_INSTANCE "default"
66 66
67 67 /*
68 68 * NFS Property Group names.
69 69 */
70 70 #define SMF_PG_NFSPROPS ((const char *)"com.oracle.nfs,props")
71 71 #define NFS_PROPS_PGNAME ((const char *)"nfs-props")
72 72 #define SVC_NFS_CLIENT "svc:/network/nfs/client"
73 73
74 74 /*
75 75 * AUTOFS Property Group Names.
76 76 */
77 77 #define SMF_PG_AUTOFS ((const char *)"com.oracle.autofs,props")
78 78 #define AUTOFS_PROPS_PGNAME ((const char *)"autofs-props")
79 79
80 80 #define AUTOFS_FMRI "svc:/system/filesystem/autofs"
81 81 #define AUTOFS_DEFAULT_FMRI "svc:/system/filesystem/autofs:default"
82 82 #define MAXDIGITS 32
↓ open down ↓ |
82 lines elided |
↑ open up ↑ |
83 83
84 84 /*
85 85 * ERRORS
86 86 */
87 87 #define SMF_OK 0
88 88 #define SMF_SYSTEM_ERR -1
89 89 #define STATE_INITIALIZING 1
90 90 #define SMF_NO_PERMISSION 2
91 91 #define SMF_NO_PGTYPE 3
92 92
93 +extern int nfs_smf_get_iprop(char *, int *, char *, scf_type_t, char *);
93 94 extern int nfs_smf_get_prop(char *, char *, char *, scf_type_t, char *, int *);
94 95 extern int fs_smf_get_prop(smf_fstype_t, char *, char *, char *, scf_type_t,
95 96 char *, int *);
96 97 extern int nfs_smf_set_prop(char *, char *, char *, scf_type_t, char *);
97 98 extern int fs_smf_set_prop(smf_fstype_t, char *, char *,
98 99 char *, scf_type_t, char *);
99 100 extern int autofs_smf_set_prop(char *, char *, char *, scf_type_t, char *);
100 101 extern int autofs_smf_get_prop(char *, char *, char *, scf_type_t,
101 102 char *, int *);
102 103 extern void fs_smf_fini(fs_smfhandle_t *);
103 104 extern boolean_t string_to_boolean(const char *);
104 105
105 106 #ifdef __cplusplus
106 107 }
107 108 #endif
108 109
109 110 #endif /* _SMFCFG_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX