4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 #pragma ident "%Z%%M% %I% %E% SMI"
36 #define PICLD_DOOR_VERSION 1
37 #define PICLD_DOOR "/var/run/picld_door"
38 #define PICLD_DOOR_COOKIE ((void *)(0xdeaffeed ^ PICLD_DOOR_VERSION))
44 PICL_CNUM_INIT
= 0x1, /* initialize */
45 PICL_CNUM_FINI
, /* fini */
46 PICL_CNUM_GETROOT
, /* get root node */
47 PICL_CNUM_GETATTRVAL
, /* get attr val */
48 PICL_CNUM_GETATTRVALBYNAME
, /* get attr val by name */
49 PICL_CNUM_GETATTRINFO
, /* get attribute information */
50 PICL_CNUM_GETFIRSTATTR
, /* get first attribute */
51 PICL_CNUM_GETNEXTATTR
, /* get next attribute */
52 PICL_CNUM_GETATTRBYNAME
, /* get attr by name */
53 PICL_CNUM_GETATTRBYROW
, /* get attr by row */
54 PICL_CNUM_GETATTRBYCOL
, /* get attr by column */
55 PICL_CNUM_SETATTRVAL
, /* set attribute's value */
56 PICL_CNUM_SETATTRVALBYNAME
, /* set attr val by name */
57 PICL_CNUM_PING
, /* ping daemon */
58 PICL_CNUM_WAIT
, /* wait n seconds for refresh */
59 PICL_CNUM_ERROR
, /* error response */
60 PICL_CNUM_FINDNODE
, /* find node */
61 PICL_CNUM_NODEBYPATH
, /* get node by path */
62 PICL_CNUM_FRUTREEPARENT
/* get frutree parent */
71 #define ret_nodeh u.nodeh
72 #define ret_proph u.proph
75 * Generic picl service request argument
78 picl_callnumber_t cnum
; /* service call number */
79 char buf
[4]; /* buffer containing input arguments */
83 picl_callnumber_t cnum
; /* service call number */
84 char buf
[4]; /* buffer containing the results */
91 picl_callnumber_t cnum
; /* PICL_CNUM_INIT */
92 unsigned int clrev
; /* client's ID and revision number */
96 picl_callnumber_t cnum
; /* PICL_CNUM_INIT */
97 int rev
; /* PICL daemon's revision number */
105 picl_callnumber_t cnum
; /* PICL_CNUM_FINI */
109 picl_callnumber_t cnum
; /* PICL_CNUM_FINI */
116 picl_callnumber_t cnum
; /* PICL_CNUM_GETROOT */
120 picl_callnumber_t cnum
; /* PICL_CNUM_GETROOT */
121 picl_nodehdl_t rnode
; /* root handle */
128 picl_callnumber_t cnum
; /* PICL_CNUM_GETATTRVAL */
129 picl_prophdl_t attr
; /* attribute handle */
130 uint32_t bufsize
; /* value buffer size */
134 picl_callnumber_t cnum
; /* PICL_CNUM_GETATTRVAL */
135 picl_prophdl_t attr
; /* attribute handle */
136 uint32_t nbytes
; /* return value size */
141 * PICL get attr val by name
144 picl_callnumber_t cnum
; /* PICL_CNUM_GETATTRVALBYNAME */
145 picl_nodehdl_t nodeh
; /* node handle */
147 char propname
[PICL_PROPNAMELEN_MAX
];
148 uint32_t bufsize
; /* buffer size */
149 } picl_reqattrvalbyname_t
;
152 picl_callnumber_t cnum
; /* PICL_CNUM_GETATTRVALBYNAME */
153 picl_nodehdl_t nodeh
; /* node handle */
155 char propname
[PICL_PROPNAMELEN_MAX
];
156 uint32_t nbytes
; /* return value size */
157 propval_t u
; /* return value */
158 } picl_retattrvalbyname_t
;
164 picl_callnumber_t cnum
; /* PICL_CNUM_GETATTRINFO */
165 picl_prophdl_t attr
; /* attribute handle */
166 } picl_reqattrinfo_t
;
169 picl_callnumber_t cnum
; /* PICL_CNUM_GETATTRINFO */
170 picl_prophdl_t attr
; /* attribute handle */
171 picl_prop_type_t type
; /* attribute type */
172 unsigned int accessmode
; /* access mode */
173 uint32_t size
; /* value size */
175 char name
[PICL_PROPNAMELEN_MAX
];
176 } picl_retattrinfo_t
;
179 * PICL get first attr
182 picl_callnumber_t cnum
; /* PICL_CNUM_GETFIRSTATTR */
183 picl_nodehdl_t nodeh
; /* node handle */
184 } picl_reqfirstattr_t
;
187 picl_callnumber_t cnum
; /* PICL_CNUM_GETFIRSTATTR */
188 picl_nodehdl_t nodeh
; /* node handle */
189 picl_prophdl_t attr
; /* first attribute handle */
190 } picl_retfirstattr_t
;
196 picl_callnumber_t cnum
; /* PICL_CNUM_GETNEXTATTR */
197 picl_prophdl_t attr
; /* attribute handle */
198 } picl_reqnextattr_t
;
201 picl_callnumber_t cnum
; /* PICL_CNUM_GETNEXTATTR */
202 picl_prophdl_t attr
; /* attribute handle */
203 picl_prophdl_t nextattr
; /* next attribute handle */
204 } picl_retnextattr_t
;
207 * PICL get attr by name
210 picl_callnumber_t cnum
; /* PICL_CNUM_GETATTRBYNAME */
211 picl_nodehdl_t nodeh
; /* node handle */
213 char propname
[PICL_PROPNAMELEN_MAX
];
214 } picl_reqattrbyname_t
;
217 picl_callnumber_t cnum
; /* PICL_CNUM_GETATTRBYNAME */
218 picl_nodehdl_t nodeh
; /* node handle */
220 char propname
[PICL_PROPNAMELEN_MAX
];
221 picl_prophdl_t attr
; /* attr handle */
222 } picl_retattrbyname_t
;
225 * PICL get attr by row
228 picl_callnumber_t cnum
; /* PICL_CNUM_GETATTRBYROW */
229 picl_prophdl_t attr
; /* attr handle */
230 } picl_reqattrbyrow_t
;
233 picl_callnumber_t cnum
; /* PICL_CNUM_GETATTRBYROW */
234 picl_prophdl_t attr
; /* attr handle */
235 picl_prophdl_t rowattr
; /* attr by row handle */
236 } picl_retattrbyrow_t
;
239 * PICL get attr by column
242 picl_callnumber_t cnum
; /* PICL_CNUM_GETATTRBYCOL */
243 picl_prophdl_t attr
; /* attr handle */
244 } picl_reqattrbycol_t
;
247 picl_callnumber_t cnum
; /* PICL_CNUM_GETATTRBYCOL */
248 picl_prophdl_t attr
; /* attr handle */
249 picl_prophdl_t colattr
; /* attr by col handle */
250 } picl_retattrbycol_t
;
256 picl_callnumber_t cnum
; /* PICL_CNUM_SETATTRVAL */
257 picl_prophdl_t attr
; /* attribute handle */
258 uint32_t bufsize
; /* value buffer size */
260 } picl_reqsetattrval_t
;
263 picl_callnumber_t cnum
; /* PICL_CNUM_SETATTRVAL */
264 picl_prophdl_t attr
; /* attribute handle */
265 } picl_retsetattrval_t
;
268 * PICL set attr val by name
271 picl_callnumber_t cnum
; /* PICL_CNUM_SETATTRVALBYNAME */
272 picl_nodehdl_t nodeh
; /* node handle */
274 char propname
[PICL_PROPNAMELEN_MAX
];
275 uint32_t bufsize
; /* buffer size */
277 } picl_reqsetattrvalbyname_t
;
280 picl_callnumber_t cnum
; /* PICL_CNUM_SETATTRVALBYNAME */
281 picl_nodehdl_t nodeh
; /* node handle */
283 char propname
[PICL_PROPNAMELEN_MAX
];
284 } picl_retsetattrvalbyname_t
;
290 picl_callnumber_t cnum
; /* PICL_CNUM_PING */
294 picl_callnumber_t cnum
; /* PICL_CNUM_PING */
301 picl_callnumber_t cnum
; /* PICL_CNUM_WAIT */
302 unsigned int secs
; /* number of seconds */
306 picl_callnumber_t cnum
; /* PICL_CNUM_WAIT service */
307 unsigned int secs
; /* input seconds */
308 int retcode
; /* return code */
315 picl_callnumber_t cnum
; /* PICL_CNUM_FINDNODE */
316 picl_nodehdl_t nodeh
; /* top node handle */
318 char propname
[PICL_PROPNAMELEN_MAX
];
319 picl_prop_type_t ptype
; /* property type */
320 uint32_t valsize
; /* size of prop value */
321 char valbuf
[1]; /* prop value */
322 } picl_reqfindnode_t
;
325 picl_callnumber_t cnum
; /* PICL_CNUM_FINDNODE */
326 picl_nodehdl_t rnodeh
; /* matched node */
327 } picl_retfindnode_t
;
330 * PICL get node by path
333 picl_callnumber_t cnum
; /* PICL_CNUM_NODEBYPATH */
334 uint32_t psize
; /* size of path */
335 char pathbuf
[PATH_MAX
]; /* picl path */
336 } picl_reqnodebypath_t
;
339 picl_callnumber_t cnum
; /* PICL_CNUM_NODEBYPATH */
340 picl_nodehdl_t nodeh
; /* node handle */
341 } picl_retnodebypath_t
;
344 * PICL get frutree parent
347 picl_callnumber_t cnum
; /* PICL_CNUM_FRUTREEPARENT */
348 picl_nodehdl_t devh
; /* dev node handle */
349 } picl_reqfruparent_t
;
352 picl_callnumber_t cnum
; /* PICL_CNUM_FRUTREEPARENT */
353 picl_nodehdl_t fruh
; /* fru parent handle */
354 } picl_retfruparent_t
;
360 picl_callnumber_t cnum
; /* PICL_CNUM_ERROR */
361 picl_callnumber_t in_cnum
; /* requested service number */
362 picl_errno_t errnum
; /* return error code */
366 picl_req_t in
; /* req arguments */
367 picl_ret_t out
; /* out results */
369 picl_reqinit_t req_init
; /* req initialize */
370 picl_retinit_t ret_init
; /* ret initialize */
372 picl_reqfini_t req_fini
; /* req fini */
373 picl_retfini_t ret_fini
; /* ret fini */
375 picl_reqroot_t req_root
; /* req root node */
376 picl_retroot_t ret_root
; /* ret root node */
378 picl_reqattrval_t req_attrval
; /* req attr value */
379 picl_retattrval_t ret_attrval
; /* ret attr value */
381 /* req attr val by name */
382 picl_reqattrvalbyname_t req_attrvalbyname
;
383 /* ret attr val by name */
384 picl_retattrvalbyname_t ret_attrvalbyname
;
386 picl_reqattrinfo_t req_attrinfo
; /* req attr info */
387 picl_retattrinfo_t ret_attrinfo
; /* ret attr info */
389 picl_reqfirstattr_t req_firstattr
; /* req first attr */
390 picl_retfirstattr_t ret_firstattr
; /* ret first attr */
392 picl_reqnextattr_t req_nextattr
; /* req next attr */
393 picl_retnextattr_t ret_nextattr
; /* ret next attr */
395 picl_reqattrbyname_t req_attrbyname
; /* req attr by name */
396 picl_retattrbyname_t ret_attrbyname
; /* ret attr by name */
398 picl_reqattrbyrow_t req_attrbyrow
; /* req attr by row */
399 picl_retattrbyrow_t ret_attrbyrow
; /* ret attr by row */
401 picl_reqattrbycol_t req_attrbycol
; /* req attr by col */
402 picl_retattrbycol_t ret_attrbycol
; /* ret attr by col */
404 /* set attribute value */
405 picl_reqsetattrval_t req_setattrval
;
406 /* ret set attribute value */
407 picl_retsetattrval_t ret_setattrval
;
409 /* set attr val by name */
410 picl_reqsetattrvalbyname_t req_setattrvalbyname
;
411 /* set attr val by name */
412 picl_retsetattrvalbyname_t ret_setattrvalbyname
;
414 picl_reqping_t req_ping
; /* req ping */
415 picl_retping_t ret_ping
; /* ret ping */
417 picl_reqwait_t req_wait
; /* req wait */
418 picl_retwait_t ret_wait
; /* ret wait */
420 picl_reqfindnode_t req_findnode
; /* req find node */
421 picl_retfindnode_t ret_findnode
; /* ret find node */
423 picl_reqnodebypath_t req_nodebypath
; /* get node by path */
424 picl_retnodebypath_t ret_nodebypath
; /* ret node by path */
426 picl_reqfruparent_t req_fruparent
; /* get frutree parent */
427 picl_retfruparent_t ret_fruparent
; /* ret frutree parent */
429 picl_reterror_t ret_error
; /* return error */
436 #endif /* _PICL2DOOR_H */