xref: /illumos-gate/usr/src/lib/libpicl/picl2door.h (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #ifndef	_PICL2DOOR_H
28*7c478bd9Sstevel@tonic-gate #define	_PICL2DOOR_H
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
31*7c478bd9Sstevel@tonic-gate extern "C" {
32*7c478bd9Sstevel@tonic-gate #endif
33*7c478bd9Sstevel@tonic-gate 
34*7c478bd9Sstevel@tonic-gate #define	PICLD_DOOR_VERSION	1
35*7c478bd9Sstevel@tonic-gate #define	PICLD_DOOR	"/var/run/picld_door"
36*7c478bd9Sstevel@tonic-gate #define	PICLD_DOOR_COOKIE	((void *)(0xdeaffeed ^ PICLD_DOOR_VERSION))
37*7c478bd9Sstevel@tonic-gate 
38*7c478bd9Sstevel@tonic-gate /*
39*7c478bd9Sstevel@tonic-gate  * PICL service calls
40*7c478bd9Sstevel@tonic-gate  */
41*7c478bd9Sstevel@tonic-gate typedef enum {
42*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_INIT = 0x1,		/* initialize */
43*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_FINI,			/* fini */
44*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_GETROOT,		/* get root node */
45*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_GETATTRVAL, 		/* get attr val */
46*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_GETATTRVALBYNAME,	/* get attr val by name */
47*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_GETATTRINFO,		/* get attribute information */
48*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_GETFIRSTATTR, 	/* get first attribute */
49*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_GETNEXTATTR, 		/* get next attribute */
50*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_GETATTRBYNAME,	/* get attr by name */
51*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_GETATTRBYROW,		/* get attr by row */
52*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_GETATTRBYCOL,		/* get attr by column */
53*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_SETATTRVAL, 		/* set attribute's value */
54*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_SETATTRVALBYNAME,	/* set attr val by name */
55*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_PING,			/* ping daemon */
56*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_WAIT,			/* wait n seconds for refresh */
57*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_ERROR,		/* error response */
58*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_FINDNODE,		/* find node */
59*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_NODEBYPATH,		/* get node by path */
60*7c478bd9Sstevel@tonic-gate 	PICL_CNUM_FRUTREEPARENT		/* get frutree parent */
61*7c478bd9Sstevel@tonic-gate } picl_callnumber_t;
62*7c478bd9Sstevel@tonic-gate 
63*7c478bd9Sstevel@tonic-gate typedef	union {
64*7c478bd9Sstevel@tonic-gate 		picl_nodehdl_t	nodeh;
65*7c478bd9Sstevel@tonic-gate 		picl_prophdl_t	proph;
66*7c478bd9Sstevel@tonic-gate 		char		str[1];
67*7c478bd9Sstevel@tonic-gate } propval_t;
68*7c478bd9Sstevel@tonic-gate #define	ret_buf		u.str
69*7c478bd9Sstevel@tonic-gate #define	ret_nodeh	u.nodeh
70*7c478bd9Sstevel@tonic-gate #define	ret_proph	u.proph
71*7c478bd9Sstevel@tonic-gate 
72*7c478bd9Sstevel@tonic-gate /*
73*7c478bd9Sstevel@tonic-gate  * Generic picl service request argument
74*7c478bd9Sstevel@tonic-gate  */
75*7c478bd9Sstevel@tonic-gate typedef struct {
76*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;	/* service call number */
77*7c478bd9Sstevel@tonic-gate 	char			buf[4];	/* buffer containing input arguments */
78*7c478bd9Sstevel@tonic-gate } picl_req_t;
79*7c478bd9Sstevel@tonic-gate 
80*7c478bd9Sstevel@tonic-gate typedef struct {
81*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;	/* service call number */
82*7c478bd9Sstevel@tonic-gate 	char			buf[4];	/* buffer containing the results */
83*7c478bd9Sstevel@tonic-gate } picl_ret_t;
84*7c478bd9Sstevel@tonic-gate 
85*7c478bd9Sstevel@tonic-gate 	/*
86*7c478bd9Sstevel@tonic-gate 	 * PICL initialize
87*7c478bd9Sstevel@tonic-gate 	 */
88*7c478bd9Sstevel@tonic-gate typedef struct {
89*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;	/* PICL_CNUM_INIT */
90*7c478bd9Sstevel@tonic-gate 	unsigned int		clrev;	/* client's ID and revision number */
91*7c478bd9Sstevel@tonic-gate } picl_reqinit_t;
92*7c478bd9Sstevel@tonic-gate 
93*7c478bd9Sstevel@tonic-gate typedef struct {
94*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;	/* PICL_CNUM_INIT */
95*7c478bd9Sstevel@tonic-gate 	int			rev;	/* PICL daemon's revision number */
96*7c478bd9Sstevel@tonic-gate } picl_retinit_t;
97*7c478bd9Sstevel@tonic-gate 
98*7c478bd9Sstevel@tonic-gate 
99*7c478bd9Sstevel@tonic-gate 	/*
100*7c478bd9Sstevel@tonic-gate 	 * PICL shutdown
101*7c478bd9Sstevel@tonic-gate 	 */
102*7c478bd9Sstevel@tonic-gate typedef struct {
103*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_FINI */
104*7c478bd9Sstevel@tonic-gate } picl_reqfini_t;
105*7c478bd9Sstevel@tonic-gate 
106*7c478bd9Sstevel@tonic-gate typedef struct {
107*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_FINI */
108*7c478bd9Sstevel@tonic-gate } picl_retfini_t;
109*7c478bd9Sstevel@tonic-gate 
110*7c478bd9Sstevel@tonic-gate 	/*
111*7c478bd9Sstevel@tonic-gate 	 * PICL get root
112*7c478bd9Sstevel@tonic-gate 	 */
113*7c478bd9Sstevel@tonic-gate typedef struct {
114*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETROOT */
115*7c478bd9Sstevel@tonic-gate } picl_reqroot_t;
116*7c478bd9Sstevel@tonic-gate 
117*7c478bd9Sstevel@tonic-gate typedef struct {
118*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETROOT */
119*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		rnode;		/* root handle */
120*7c478bd9Sstevel@tonic-gate } picl_retroot_t;
121*7c478bd9Sstevel@tonic-gate 
122*7c478bd9Sstevel@tonic-gate 	/*
123*7c478bd9Sstevel@tonic-gate 	 * PICL get attr val
124*7c478bd9Sstevel@tonic-gate 	 */
125*7c478bd9Sstevel@tonic-gate typedef struct {
126*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETATTRVAL */
127*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attribute handle */
128*7c478bd9Sstevel@tonic-gate 	uint32_t		bufsize;	/* value buffer size */
129*7c478bd9Sstevel@tonic-gate } picl_reqattrval_t;
130*7c478bd9Sstevel@tonic-gate 
131*7c478bd9Sstevel@tonic-gate typedef struct {
132*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETATTRVAL */
133*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attribute handle */
134*7c478bd9Sstevel@tonic-gate 	uint32_t		nbytes;		/* return value size */
135*7c478bd9Sstevel@tonic-gate 	propval_t 		u;
136*7c478bd9Sstevel@tonic-gate } picl_retattrval_t;
137*7c478bd9Sstevel@tonic-gate 
138*7c478bd9Sstevel@tonic-gate 	/*
139*7c478bd9Sstevel@tonic-gate 	 * PICL get attr val by name
140*7c478bd9Sstevel@tonic-gate 	 */
141*7c478bd9Sstevel@tonic-gate typedef struct {
142*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETATTRVALBYNAME */
143*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		nodeh;		/* node handle */
144*7c478bd9Sstevel@tonic-gate 						/* attribute name */
145*7c478bd9Sstevel@tonic-gate 	char			propname[PICL_PROPNAMELEN_MAX];
146*7c478bd9Sstevel@tonic-gate 	uint32_t		bufsize;	/* buffer size */
147*7c478bd9Sstevel@tonic-gate } picl_reqattrvalbyname_t;
148*7c478bd9Sstevel@tonic-gate 
149*7c478bd9Sstevel@tonic-gate typedef struct {
150*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETATTRVALBYNAME */
151*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		nodeh;		/* node handle */
152*7c478bd9Sstevel@tonic-gate 						/* attribute name */
153*7c478bd9Sstevel@tonic-gate 	char			propname[PICL_PROPNAMELEN_MAX];
154*7c478bd9Sstevel@tonic-gate 	uint32_t		nbytes;		/* return value size */
155*7c478bd9Sstevel@tonic-gate 	propval_t		u;		/* return value */
156*7c478bd9Sstevel@tonic-gate } picl_retattrvalbyname_t;
157*7c478bd9Sstevel@tonic-gate 
158*7c478bd9Sstevel@tonic-gate 	/*
159*7c478bd9Sstevel@tonic-gate 	 * PICL get attr info
160*7c478bd9Sstevel@tonic-gate 	 */
161*7c478bd9Sstevel@tonic-gate typedef struct {
162*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETATTRINFO */
163*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attribute handle */
164*7c478bd9Sstevel@tonic-gate } picl_reqattrinfo_t;
165*7c478bd9Sstevel@tonic-gate 
166*7c478bd9Sstevel@tonic-gate typedef struct {
167*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETATTRINFO */
168*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attribute handle */
169*7c478bd9Sstevel@tonic-gate 	picl_prop_type_t	type;		/* attribute type */
170*7c478bd9Sstevel@tonic-gate 	unsigned int		accessmode;	/* access mode */
171*7c478bd9Sstevel@tonic-gate 	uint32_t		size;		/* value size */
172*7c478bd9Sstevel@tonic-gate 						/* attr name */
173*7c478bd9Sstevel@tonic-gate 	char			name[PICL_PROPNAMELEN_MAX];
174*7c478bd9Sstevel@tonic-gate } picl_retattrinfo_t;
175*7c478bd9Sstevel@tonic-gate 
176*7c478bd9Sstevel@tonic-gate 	/*
177*7c478bd9Sstevel@tonic-gate 	 * PICL get first attr
178*7c478bd9Sstevel@tonic-gate 	 */
179*7c478bd9Sstevel@tonic-gate typedef struct {
180*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETFIRSTATTR */
181*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		nodeh;		/* node handle */
182*7c478bd9Sstevel@tonic-gate } picl_reqfirstattr_t;
183*7c478bd9Sstevel@tonic-gate 
184*7c478bd9Sstevel@tonic-gate typedef struct {
185*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETFIRSTATTR */
186*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		nodeh;		/* node handle */
187*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* first attribute handle */
188*7c478bd9Sstevel@tonic-gate } picl_retfirstattr_t;
189*7c478bd9Sstevel@tonic-gate 
190*7c478bd9Sstevel@tonic-gate 	/*
191*7c478bd9Sstevel@tonic-gate 	 * PICL get next attr
192*7c478bd9Sstevel@tonic-gate 	 */
193*7c478bd9Sstevel@tonic-gate typedef struct {
194*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETNEXTATTR */
195*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attribute handle */
196*7c478bd9Sstevel@tonic-gate } picl_reqnextattr_t;
197*7c478bd9Sstevel@tonic-gate 
198*7c478bd9Sstevel@tonic-gate typedef struct {
199*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETNEXTATTR */
200*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attribute handle */
201*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		nextattr;	/* next attribute handle */
202*7c478bd9Sstevel@tonic-gate } picl_retnextattr_t;
203*7c478bd9Sstevel@tonic-gate 
204*7c478bd9Sstevel@tonic-gate 	/*
205*7c478bd9Sstevel@tonic-gate 	 * PICL get attr by name
206*7c478bd9Sstevel@tonic-gate 	 */
207*7c478bd9Sstevel@tonic-gate typedef struct {
208*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETATTRBYNAME */
209*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		nodeh;		/* node handle */
210*7c478bd9Sstevel@tonic-gate 						/* attr name */
211*7c478bd9Sstevel@tonic-gate 	char			propname[PICL_PROPNAMELEN_MAX];
212*7c478bd9Sstevel@tonic-gate } picl_reqattrbyname_t;
213*7c478bd9Sstevel@tonic-gate 
214*7c478bd9Sstevel@tonic-gate typedef struct {
215*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETATTRBYNAME */
216*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		nodeh;		/* node handle */
217*7c478bd9Sstevel@tonic-gate 						/* attr name */
218*7c478bd9Sstevel@tonic-gate 	char			propname[PICL_PROPNAMELEN_MAX];
219*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attr handle */
220*7c478bd9Sstevel@tonic-gate } picl_retattrbyname_t;
221*7c478bd9Sstevel@tonic-gate 
222*7c478bd9Sstevel@tonic-gate 	/*
223*7c478bd9Sstevel@tonic-gate 	 * PICL get attr by row
224*7c478bd9Sstevel@tonic-gate 	 */
225*7c478bd9Sstevel@tonic-gate typedef struct {
226*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETATTRBYROW */
227*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attr handle */
228*7c478bd9Sstevel@tonic-gate } picl_reqattrbyrow_t;
229*7c478bd9Sstevel@tonic-gate 
230*7c478bd9Sstevel@tonic-gate typedef struct {
231*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETATTRBYROW */
232*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attr handle */
233*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		rowattr;	/* attr by row handle */
234*7c478bd9Sstevel@tonic-gate } picl_retattrbyrow_t;
235*7c478bd9Sstevel@tonic-gate 
236*7c478bd9Sstevel@tonic-gate 	/*
237*7c478bd9Sstevel@tonic-gate 	 * PICL get attr by column
238*7c478bd9Sstevel@tonic-gate 	 */
239*7c478bd9Sstevel@tonic-gate typedef struct {
240*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETATTRBYCOL */
241*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attr handle */
242*7c478bd9Sstevel@tonic-gate } picl_reqattrbycol_t;
243*7c478bd9Sstevel@tonic-gate 
244*7c478bd9Sstevel@tonic-gate typedef struct {
245*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_GETATTRBYCOL */
246*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attr handle */
247*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		colattr;	/* attr by col handle */
248*7c478bd9Sstevel@tonic-gate } picl_retattrbycol_t;
249*7c478bd9Sstevel@tonic-gate 
250*7c478bd9Sstevel@tonic-gate 	/*
251*7c478bd9Sstevel@tonic-gate 	 * PICL set attr val
252*7c478bd9Sstevel@tonic-gate 	 */
253*7c478bd9Sstevel@tonic-gate typedef struct {
254*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_SETATTRVAL */
255*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attribute handle */
256*7c478bd9Sstevel@tonic-gate 	uint32_t		bufsize;	/* value buffer size */
257*7c478bd9Sstevel@tonic-gate 	char			valbuf[1];
258*7c478bd9Sstevel@tonic-gate } picl_reqsetattrval_t;
259*7c478bd9Sstevel@tonic-gate 
260*7c478bd9Sstevel@tonic-gate typedef struct {
261*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_SETATTRVAL */
262*7c478bd9Sstevel@tonic-gate 	picl_prophdl_t		attr;		/* attribute handle */
263*7c478bd9Sstevel@tonic-gate } picl_retsetattrval_t;
264*7c478bd9Sstevel@tonic-gate 
265*7c478bd9Sstevel@tonic-gate 	/*
266*7c478bd9Sstevel@tonic-gate 	 * PICL set attr val by name
267*7c478bd9Sstevel@tonic-gate 	 */
268*7c478bd9Sstevel@tonic-gate typedef struct {
269*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_SETATTRVALBYNAME */
270*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		nodeh;		/* node handle */
271*7c478bd9Sstevel@tonic-gate 						/* attr name */
272*7c478bd9Sstevel@tonic-gate 	char			propname[PICL_PROPNAMELEN_MAX];
273*7c478bd9Sstevel@tonic-gate 	uint32_t		bufsize;	/* buffer size */
274*7c478bd9Sstevel@tonic-gate 	char			valbuf[1];
275*7c478bd9Sstevel@tonic-gate } picl_reqsetattrvalbyname_t;
276*7c478bd9Sstevel@tonic-gate 
277*7c478bd9Sstevel@tonic-gate typedef struct {
278*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_SETATTRVALBYNAME */
279*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		nodeh;		/* node handle */
280*7c478bd9Sstevel@tonic-gate 						/* attr name */
281*7c478bd9Sstevel@tonic-gate 	char			propname[PICL_PROPNAMELEN_MAX];
282*7c478bd9Sstevel@tonic-gate } picl_retsetattrvalbyname_t;
283*7c478bd9Sstevel@tonic-gate 
284*7c478bd9Sstevel@tonic-gate 	/*
285*7c478bd9Sstevel@tonic-gate 	 * PICL ping
286*7c478bd9Sstevel@tonic-gate 	 */
287*7c478bd9Sstevel@tonic-gate typedef struct {
288*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_PING */
289*7c478bd9Sstevel@tonic-gate } picl_reqping_t;
290*7c478bd9Sstevel@tonic-gate 
291*7c478bd9Sstevel@tonic-gate typedef struct {
292*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_PING */
293*7c478bd9Sstevel@tonic-gate } picl_retping_t;
294*7c478bd9Sstevel@tonic-gate 
295*7c478bd9Sstevel@tonic-gate 	/*
296*7c478bd9Sstevel@tonic-gate 	 * PICL wait
297*7c478bd9Sstevel@tonic-gate 	 */
298*7c478bd9Sstevel@tonic-gate typedef struct {
299*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_WAIT */
300*7c478bd9Sstevel@tonic-gate 	unsigned int		secs;		/* number of seconds */
301*7c478bd9Sstevel@tonic-gate } picl_reqwait_t;
302*7c478bd9Sstevel@tonic-gate 
303*7c478bd9Sstevel@tonic-gate typedef struct {
304*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_WAIT service */
305*7c478bd9Sstevel@tonic-gate 	unsigned int		secs;		/* input seconds */
306*7c478bd9Sstevel@tonic-gate 	int			retcode;	/* return code */
307*7c478bd9Sstevel@tonic-gate } picl_retwait_t;
308*7c478bd9Sstevel@tonic-gate 
309*7c478bd9Sstevel@tonic-gate 	/*
310*7c478bd9Sstevel@tonic-gate 	 * PICL find node
311*7c478bd9Sstevel@tonic-gate 	 */
312*7c478bd9Sstevel@tonic-gate typedef struct {
313*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_FINDNODE */
314*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		nodeh;		/* top node handle */
315*7c478bd9Sstevel@tonic-gate 						/* property name */
316*7c478bd9Sstevel@tonic-gate 	char			propname[PICL_PROPNAMELEN_MAX];
317*7c478bd9Sstevel@tonic-gate 	picl_prop_type_t	ptype;		/* property type */
318*7c478bd9Sstevel@tonic-gate 	uint32_t		valsize;	/* size of prop value */
319*7c478bd9Sstevel@tonic-gate 	char			valbuf[1];	/* prop value */
320*7c478bd9Sstevel@tonic-gate } picl_reqfindnode_t;
321*7c478bd9Sstevel@tonic-gate 
322*7c478bd9Sstevel@tonic-gate typedef struct {
323*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_FINDNODE */
324*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		rnodeh;		/* matched node */
325*7c478bd9Sstevel@tonic-gate } picl_retfindnode_t;
326*7c478bd9Sstevel@tonic-gate 
327*7c478bd9Sstevel@tonic-gate 	/*
328*7c478bd9Sstevel@tonic-gate 	 * PICL get node by path
329*7c478bd9Sstevel@tonic-gate 	 */
330*7c478bd9Sstevel@tonic-gate typedef struct {
331*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_NODEBYPATH */
332*7c478bd9Sstevel@tonic-gate 	uint32_t		psize;		/* size of path */
333*7c478bd9Sstevel@tonic-gate 	char			pathbuf[PATH_MAX];	/* picl path */
334*7c478bd9Sstevel@tonic-gate } picl_reqnodebypath_t;
335*7c478bd9Sstevel@tonic-gate 
336*7c478bd9Sstevel@tonic-gate typedef struct {
337*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_NODEBYPATH */
338*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		nodeh;		/* node handle */
339*7c478bd9Sstevel@tonic-gate } picl_retnodebypath_t;
340*7c478bd9Sstevel@tonic-gate 
341*7c478bd9Sstevel@tonic-gate 	/*
342*7c478bd9Sstevel@tonic-gate 	 * PICL get frutree parent
343*7c478bd9Sstevel@tonic-gate 	 */
344*7c478bd9Sstevel@tonic-gate typedef struct {
345*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_FRUTREEPARENT */
346*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		devh;		/* dev node handle */
347*7c478bd9Sstevel@tonic-gate } picl_reqfruparent_t;
348*7c478bd9Sstevel@tonic-gate 
349*7c478bd9Sstevel@tonic-gate typedef struct {
350*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_FRUTREEPARENT */
351*7c478bd9Sstevel@tonic-gate 	picl_nodehdl_t		fruh;		/* fru parent handle */
352*7c478bd9Sstevel@tonic-gate } picl_retfruparent_t;
353*7c478bd9Sstevel@tonic-gate 
354*7c478bd9Sstevel@tonic-gate 	/*
355*7c478bd9Sstevel@tonic-gate 	 * PICL error return
356*7c478bd9Sstevel@tonic-gate 	 */
357*7c478bd9Sstevel@tonic-gate typedef struct {
358*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	cnum;		/* PICL_CNUM_ERROR */
359*7c478bd9Sstevel@tonic-gate 	picl_callnumber_t	in_cnum;	/* requested service number */
360*7c478bd9Sstevel@tonic-gate 	picl_errno_t		errnum;		/* return error code */
361*7c478bd9Sstevel@tonic-gate } picl_reterror_t;
362*7c478bd9Sstevel@tonic-gate 
363*7c478bd9Sstevel@tonic-gate typedef union {
364*7c478bd9Sstevel@tonic-gate 	picl_req_t		in;			/* req arguments */
365*7c478bd9Sstevel@tonic-gate 	picl_ret_t		out;			/* out results */
366*7c478bd9Sstevel@tonic-gate 
367*7c478bd9Sstevel@tonic-gate 	picl_reqinit_t		req_init;		/* req initialize */
368*7c478bd9Sstevel@tonic-gate 	picl_retinit_t		ret_init;		/* ret initialize */
369*7c478bd9Sstevel@tonic-gate 
370*7c478bd9Sstevel@tonic-gate 	picl_reqfini_t		req_fini;		/* req fini */
371*7c478bd9Sstevel@tonic-gate 	picl_retfini_t		ret_fini;		/* ret fini */
372*7c478bd9Sstevel@tonic-gate 
373*7c478bd9Sstevel@tonic-gate 	picl_reqroot_t		req_root;		/* req root node */
374*7c478bd9Sstevel@tonic-gate 	picl_retroot_t		ret_root;		/* ret root node */
375*7c478bd9Sstevel@tonic-gate 
376*7c478bd9Sstevel@tonic-gate 	picl_reqattrval_t	req_attrval;		/* req attr value */
377*7c478bd9Sstevel@tonic-gate 	picl_retattrval_t	ret_attrval;		/* ret attr value */
378*7c478bd9Sstevel@tonic-gate 
379*7c478bd9Sstevel@tonic-gate 						/* req attr val by name */
380*7c478bd9Sstevel@tonic-gate 	picl_reqattrvalbyname_t	req_attrvalbyname;
381*7c478bd9Sstevel@tonic-gate 						/* ret attr val by name */
382*7c478bd9Sstevel@tonic-gate 	picl_retattrvalbyname_t	ret_attrvalbyname;
383*7c478bd9Sstevel@tonic-gate 
384*7c478bd9Sstevel@tonic-gate 	picl_reqattrinfo_t    	req_attrinfo;		/* req attr info */
385*7c478bd9Sstevel@tonic-gate 	picl_retattrinfo_t    	ret_attrinfo;		/* ret attr info */
386*7c478bd9Sstevel@tonic-gate 
387*7c478bd9Sstevel@tonic-gate 	picl_reqfirstattr_t	req_firstattr;		/* req first attr */
388*7c478bd9Sstevel@tonic-gate 	picl_retfirstattr_t	ret_firstattr;		/* ret first attr */
389*7c478bd9Sstevel@tonic-gate 
390*7c478bd9Sstevel@tonic-gate 	picl_reqnextattr_t	req_nextattr;		/* req next attr */
391*7c478bd9Sstevel@tonic-gate 	picl_retnextattr_t	ret_nextattr;		/* ret next attr */
392*7c478bd9Sstevel@tonic-gate 
393*7c478bd9Sstevel@tonic-gate 	picl_reqattrbyname_t	req_attrbyname;		/* req attr by name */
394*7c478bd9Sstevel@tonic-gate 	picl_retattrbyname_t	ret_attrbyname;		/* ret attr by name */
395*7c478bd9Sstevel@tonic-gate 
396*7c478bd9Sstevel@tonic-gate 	picl_reqattrbyrow_t	req_attrbyrow;		/* req attr by row */
397*7c478bd9Sstevel@tonic-gate 	picl_retattrbyrow_t	ret_attrbyrow;		/* ret attr by row */
398*7c478bd9Sstevel@tonic-gate 
399*7c478bd9Sstevel@tonic-gate 	picl_reqattrbycol_t	req_attrbycol;		/* req attr by col */
400*7c478bd9Sstevel@tonic-gate 	picl_retattrbycol_t	ret_attrbycol;		/* ret attr by col */
401*7c478bd9Sstevel@tonic-gate 
402*7c478bd9Sstevel@tonic-gate 						/* set attribute value */
403*7c478bd9Sstevel@tonic-gate 	picl_reqsetattrval_t	req_setattrval;
404*7c478bd9Sstevel@tonic-gate 						/* ret set attribute value */
405*7c478bd9Sstevel@tonic-gate 	picl_retsetattrval_t	ret_setattrval;
406*7c478bd9Sstevel@tonic-gate 
407*7c478bd9Sstevel@tonic-gate 						/* set attr val by name */
408*7c478bd9Sstevel@tonic-gate 	picl_reqsetattrvalbyname_t	req_setattrvalbyname;
409*7c478bd9Sstevel@tonic-gate 						/* set attr val by name */
410*7c478bd9Sstevel@tonic-gate 	picl_retsetattrvalbyname_t	ret_setattrvalbyname;
411*7c478bd9Sstevel@tonic-gate 
412*7c478bd9Sstevel@tonic-gate 	picl_reqping_t		req_ping;		/* req ping */
413*7c478bd9Sstevel@tonic-gate 	picl_retping_t		ret_ping;		/* ret ping */
414*7c478bd9Sstevel@tonic-gate 
415*7c478bd9Sstevel@tonic-gate 	picl_reqwait_t		req_wait;		/* req wait */
416*7c478bd9Sstevel@tonic-gate 	picl_retwait_t		ret_wait;		/* ret wait */
417*7c478bd9Sstevel@tonic-gate 
418*7c478bd9Sstevel@tonic-gate 	picl_reqfindnode_t	req_findnode;	/* req find node */
419*7c478bd9Sstevel@tonic-gate 	picl_retfindnode_t	ret_findnode;	/* ret find node */
420*7c478bd9Sstevel@tonic-gate 
421*7c478bd9Sstevel@tonic-gate 	picl_reqnodebypath_t	req_nodebypath;	/* get node by path */
422*7c478bd9Sstevel@tonic-gate 	picl_retnodebypath_t	ret_nodebypath;	/* ret node by path */
423*7c478bd9Sstevel@tonic-gate 
424*7c478bd9Sstevel@tonic-gate 	picl_reqfruparent_t	req_fruparent;	/* get frutree parent */
425*7c478bd9Sstevel@tonic-gate 	picl_retfruparent_t	ret_fruparent;	/* ret frutree parent */
426*7c478bd9Sstevel@tonic-gate 
427*7c478bd9Sstevel@tonic-gate 	picl_reterror_t		ret_error;		/* return error */
428*7c478bd9Sstevel@tonic-gate } picl_service_t;
429*7c478bd9Sstevel@tonic-gate 
430*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
431*7c478bd9Sstevel@tonic-gate }
432*7c478bd9Sstevel@tonic-gate #endif
433*7c478bd9Sstevel@tonic-gate 
434*7c478bd9Sstevel@tonic-gate #endif	/* _PICL2DOOR_H */
435