Print this page
12743 man page spelling mistakes
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3picltree/libpicltree.3picltree
+++ new/usr/src/man/man3picltree/libpicltree.3picltree
1 1 '\" te
2 2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 -.TH LIBPICLTREE 3PICLTREE "Mar 1, 2004"
6 +.TH LIBPICLTREE 3PICLTREE "May 16, 2020"
7 7 .SH NAME
8 8 libpicltree \- PTree and Plug-in Registration interface library
9 9 .SH SYNOPSIS
10 -.LP
11 10 .nf
12 11 \fBcc\fR [\fIflag \&.\|.\|.\fR] \fIfile \fR\&.\|.\|. \fB-lpicltree\fR [\fIlibrary \&.\|.\|.\fR]
13 12 #include <picltree.h>
14 13 .fi
15 14
16 15 .SH DESCRIPTION
17 -.sp
18 -.LP
19 16 The PTree interface is the set of functions and data structures to access and
20 17 manipulate the PICL tree. The daemon and the plug-in modules use the PTree
21 18 interface.
22 19 .sp
23 20 .LP
24 21 The Plug-in Registration interface is used by the plug-in modules to register
25 22 themselves with the daemon.
26 23 .sp
27 24 .LP
28 25 The plug-in modules create the nodes and properties of the tree. At the time of
29 26 creating a property, the plug-ins specify the property information in the
30 27 \fBptree_propinfo_t\fR structure defined as:
31 28 .sp
32 29 .in +2
33 30 .nf
34 31 typedef struct {
35 32 int version; /* version */
36 33 picl_propinfo_t piclinfo; /* info to clients */
37 34 int (*read)(ptree_rarg_t *arg, void *buf);
38 35 /* read access function for */
39 36 /* volatile prop */
40 37 int (*write)(ptree_warg_t *arg, const void *buf);
41 38 /* write access function for */
42 39 /* volatile prop */
43 40 } ptree_propinfo_t;
44 41 .fi
45 42 .in -2
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
46 43
47 44 .sp
48 45 .LP
49 46 See \fBlibpicl\fR(3PICL) for more information on PICL tree nodes and
50 47 properties.
51 48 .sp
52 49 .LP
53 50 The maximum size of a property value cannot exceed \fBPICL_PROPSIZE_MAX\fR. It
54 51 is currently set to 512KB.
55 52 .SS "Volatile Properties"
56 -.sp
57 -.LP
58 53 In addition to \fBPICL_READ\fR and \fBPICL_WRITE\fR property access modes, the
59 54 plug-in modules specify whether a property is volatile or not by setting the
60 55 bit \fBPICL_VOLATILE\fR.
61 56 .sp
62 57 .in +2
63 58 .nf
64 59 #define PICL_VOLATILE 0x4
65 60 .fi
66 61 .in -2
67 62
68 63 .sp
69 64 .LP
70 65 For a volatile property, the plug-in module provides the access functions to
71 66 read and/or write the property in the \fBptree_propinfo_t\fR argument passed
72 67 when creating the property.
73 68 .sp
74 69 .LP
75 70 The daemon invokes the access functions of volatile properties when clients
76 71 access their values. Two arguments are passed to the read access functions. The
77 72 first argument is a pointer to \fBptree_rarg_t\fR, which contains the handle of
78 73 the node, the handle of the accessed property and the credentials of the
79 74 caller. The second argument is a pointer to the buffer where the value is to
80 75 be copied.
81 76 .sp
82 77 .in +2
83 78 .nf
84 79 typedef struct {
85 80 picl_nodehdl_t nodeh;
86 81 picl_prophdl_t proph;
87 82 door_cred_t cred;
88 83 } ptree_rarg_t;
89 84 .fi
90 85 .in -2
91 86
92 87 .sp
93 88 .LP
94 89 The prototype of the read access function for volatile property is:
95 90 .sp
96 91 .in +2
97 92 .nf
98 93 int read(ptree_rarg_t *rarg, void *buf);
99 94 .fi
100 95 .in -2
101 96
102 97 .sp
103 98 .LP
104 99 The read function returns \fBPICL_SUCCESS\fR to indicate successful completion.
105 100 .sp
106 101 .LP
107 102 Similarly, when a write access is performed on a volatile property, the daemon
108 103 invokes the write access function provided by the plug-in for that property and
109 104 passes it two arguments. The first argument is a pointer to \fBptree_warg_t\fR,
110 105 which contains the handle to the node, the handle of the accessed property and
111 106 the credentials of the caller. The second argument is a pointer to the buffer
112 107 containing the value to be written.
113 108 .sp
114 109 .in +2
115 110 .nf
116 111 typedef struct {
117 112 picl_nodehdl_t nodeh;
118 113 picl_prophdl_t proph;
119 114 door_cred_t cred;
120 115 } ptree_warg_t;
121 116 .fi
122 117 .in -2
123 118
124 119 .sp
125 120 .LP
126 121 The prototype of the write access function for volatile property is:
127 122 .sp
128 123 .in +2
129 124 .nf
130 125 int write(ptree_warg_t *warg, const void *buf);
131 126 .fi
132 127 .in -2
133 128
134 129 .sp
↓ open down ↓ |
67 lines elided |
↑ open up ↑ |
135 130 .LP
136 131 The write function returns \fBPICL_SUCCESS\fR to indicate successful
137 132 completion.
138 133 .sp
139 134 .LP
140 135 For all volatile properties, the 'size' of the property must be specified to be
141 136 the maximum possible size of the value. The maximum size of the value cannot
142 137 exceed \fBPICL_PROPSIZE_MAX\fR. This allows a client to allocate a sufficiently
143 138 large buffer before retrieving a volatile property's value
144 139 .SS "Plug-in Modules"
145 -.sp
146 -.LP
147 140 Plug-in modules are shared objects that are located in well-known directories
148 -for the daemon to locate and load them. Plug-in module's are located in the one
149 -of the following plug-in directories depending on the plaform-specific nature
141 +for the daemon to locate and load them. Plug-in modules are located in the one
142 +of the following plug-in directories depending on the platform-specific nature
150 143 of the data they collect and publish.
151 144 .sp
152 145 .in +2
153 146 .nf
154 147 /usr/platform/picl/plugins/`uname -i`/
155 148 /usr/platform/picl/plugins/`uname -m`/
156 149 /usr/lib/picl/plugins/
157 150 .fi
158 151 .in -2
159 152
160 153 .sp
161 154 .LP
162 155 A plug-in module may specify its dependency on another plug-in module using the
163 156 \fB-l\fR linker option. The plug-ins are loaded by the PICL daemon using
↓ open down ↓ |
4 lines elided |
↑ open up ↑ |
164 157 \fBdlopen\fR(3C) according to the specified dependencies. Each plug-in module
165 158 must define a \fB\&.init\fR section, which is executed when the plug-in module
166 159 is loaded, to register themselves with the daemon. See
167 160 \fBpicld_plugin_register\fR(3PICLTREE) for more information on plug-in
168 161 registration.
169 162 .sp
170 163 .LP
171 164 The plug-in modules may use the \fBpicld_log\fR(3PICLTREE) function to log
172 165 their messages to the system log file.
173 166 .SH ATTRIBUTES
174 -.sp
175 -.LP
176 167 See \fBattributes\fR(5) for descriptions of the following attributes:
177 168 .sp
178 169
179 170 .sp
180 171 .TS
181 172 box;
182 173 c | c
183 174 l | l .
184 175 ATTRIBUTE TYPE ATTRIBUTE VALUE
185 176 _
186 177 MT-Level MT-Safe
187 178 .TE
188 179
189 180 .SH SEE ALSO
190 -.sp
191 -.LP
192 181 \fBlibpicl\fR(3PICL), \fBlibpicltree\fR(3LIB), \fBpicld_log\fR(3PICLTREE),
193 182 \fBpicld_plugin_register\fR(3PICLTREE), \fBattributes\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX