Print this page
12743 man page spelling mistakes
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3picltree/libpicltree.3picltree.man.txt
+++ new/usr/src/man/man3picltree/libpicltree.3picltree.man.txt
1 1 LIBPICLTREE(3PICLTREE) PICL Plug-In Library Functions LIBPICLTREE(3PICLTREE)
2 2
3 3
4 4
5 5 NAME
6 6 libpicltree - PTree and Plug-in Registration interface library
7 7
8 8 SYNOPSIS
9 9 cc [flag ...] file ... -lpicltree [library ...]
10 10 #include <picltree.h>
11 11
12 12
13 13 DESCRIPTION
14 14 The PTree interface is the set of functions and data structures to
15 15 access and manipulate the PICL tree. The daemon and the plug-in modules
16 16 use the PTree interface.
17 17
18 18
19 19 The Plug-in Registration interface is used by the plug-in modules to
20 20 register themselves with the daemon.
21 21
22 22
23 23 The plug-in modules create the nodes and properties of the tree. At the
24 24 time of creating a property, the plug-ins specify the property
25 25 information in the ptree_propinfo_t structure defined as:
26 26
27 27 typedef struct {
28 28 int version; /* version */
29 29 picl_propinfo_t piclinfo; /* info to clients */
30 30 int (*read)(ptree_rarg_t *arg, void *buf);
31 31 /* read access function for */
32 32 /* volatile prop */
33 33 int (*write)(ptree_warg_t *arg, const void *buf);
34 34 /* write access function for */
35 35 /* volatile prop */
36 36 } ptree_propinfo_t;
37 37
38 38
39 39
40 40 See libpicl(3PICL) for more information on PICL tree nodes and
41 41 properties.
42 42
43 43
44 44 The maximum size of a property value cannot exceed PICL_PROPSIZE_MAX.
45 45 It is currently set to 512KB.
46 46
47 47 Volatile Properties
48 48 In addition to PICL_READ and PICL_WRITE property access modes, the
49 49 plug-in modules specify whether a property is volatile or not by
50 50 setting the bit PICL_VOLATILE.
51 51
52 52 #define PICL_VOLATILE 0x4
53 53
54 54
55 55
56 56 For a volatile property, the plug-in module provides the access
57 57 functions to read and/or write the property in the ptree_propinfo_t
58 58 argument passed when creating the property.
59 59
60 60
61 61 The daemon invokes the access functions of volatile properties when
62 62 clients access their values. Two arguments are passed to the read
63 63 access functions. The first argument is a pointer to ptree_rarg_t,
64 64 which contains the handle of the node, the handle of the accessed
65 65 property and the credentials of the caller. The second argument is a
66 66 pointer to the buffer where the value is to be copied.
67 67
68 68 typedef struct {
69 69 picl_nodehdl_t nodeh;
70 70 picl_prophdl_t proph;
71 71 door_cred_t cred;
72 72 } ptree_rarg_t;
73 73
74 74
75 75
76 76 The prototype of the read access function for volatile property is:
77 77
78 78 int read(ptree_rarg_t *rarg, void *buf);
79 79
80 80
81 81
82 82 The read function returns PICL_SUCCESS to indicate successful
83 83 completion.
84 84
85 85
86 86 Similarly, when a write access is performed on a volatile property, the
87 87 daemon invokes the write access function provided by the plug-in for
88 88 that property and passes it two arguments. The first argument is a
89 89 pointer to ptree_warg_t, which contains the handle to the node, the
90 90 handle of the accessed property and the credentials of the caller. The
91 91 second argument is a pointer to the buffer containing the value to be
92 92 written.
93 93
94 94 typedef struct {
95 95 picl_nodehdl_t nodeh;
96 96 picl_prophdl_t proph;
97 97 door_cred_t cred;
98 98 } ptree_warg_t;
99 99
100 100
101 101
102 102 The prototype of the write access function for volatile property is:
103 103
104 104 int write(ptree_warg_t *warg, const void *buf);
105 105
106 106
107 107
108 108 The write function returns PICL_SUCCESS to indicate successful
109 109 completion.
↓ open down ↓ |
109 lines elided |
↑ open up ↑ |
110 110
111 111
112 112 For all volatile properties, the 'size' of the property must be
113 113 specified to be the maximum possible size of the value. The maximum
114 114 size of the value cannot exceed PICL_PROPSIZE_MAX. This allows a client
115 115 to allocate a sufficiently large buffer before retrieving a volatile
116 116 property's value
117 117
118 118 Plug-in Modules
119 119 Plug-in modules are shared objects that are located in well-known
120 - directories for the daemon to locate and load them. Plug-in module's
121 - are located in the one of the following plug-in directories depending
122 - on the plaform-specific nature of the data they collect and publish.
120 + directories for the daemon to locate and load them. Plug-in modules are
121 + located in the one of the following plug-in directories depending on
122 + the platform-specific nature of the data they collect and publish.
123 123
124 124 /usr/platform/picl/plugins/`uname -i`/
125 125 /usr/platform/picl/plugins/`uname -m`/
126 126 /usr/lib/picl/plugins/
127 127
128 128
129 129
130 130 A plug-in module may specify its dependency on another plug-in module
131 131 using the -l linker option. The plug-ins are loaded by the PICL daemon
132 132 using dlopen(3C) according to the specified dependencies. Each plug-in
133 133 module must define a .init section, which is executed when the plug-in
134 134 module is loaded, to register themselves with the daemon. See
135 135 picld_plugin_register(3PICLTREE) for more information on plug-in
136 136 registration.
137 137
138 138
139 139 The plug-in modules may use the picld_log(3PICLTREE) function to log
140 140 their messages to the system log file.
141 141
142 142 ATTRIBUTES
143 143 See attributes(5) for descriptions of the following attributes:
144 144
145 145
146 146
147 147
148 148 +---------------+-----------------+
149 149 |ATTRIBUTE TYPE | ATTRIBUTE VALUE |
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
150 150 +---------------+-----------------+
151 151 |MT-Level | MT-Safe |
152 152 +---------------+-----------------+
153 153
154 154 SEE ALSO
155 155 libpicl(3PICL), libpicltree(3LIB), picld_log(3PICLTREE),
156 156 picld_plugin_register(3PICLTREE), attributes(5)
157 157
158 158
159 159
160 - March 1, 2004 LIBPICLTREE(3PICLTREE)
160 + May 16, 2020 LIBPICLTREE(3PICLTREE)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX