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