xref: /titanic_44/usr/src/uts/common/avs/ns/contract.h (revision fcf3ce441efd61da9bb2884968af01cb7c1452cc)
1*fcf3ce44SJohn Forte /*
2*fcf3ce44SJohn Forte  * CDDL HEADER START
3*fcf3ce44SJohn Forte  *
4*fcf3ce44SJohn Forte  * The contents of this file are subject to the terms of the
5*fcf3ce44SJohn Forte  * Common Development and Distribution License (the "License").
6*fcf3ce44SJohn Forte  * You may not use this file except in compliance with the License.
7*fcf3ce44SJohn Forte  *
8*fcf3ce44SJohn Forte  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*fcf3ce44SJohn Forte  * or http://www.opensolaris.org/os/licensing.
10*fcf3ce44SJohn Forte  * See the License for the specific language governing permissions
11*fcf3ce44SJohn Forte  * and limitations under the License.
12*fcf3ce44SJohn Forte  *
13*fcf3ce44SJohn Forte  * When distributing Covered Code, include this CDDL HEADER in each
14*fcf3ce44SJohn Forte  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*fcf3ce44SJohn Forte  * If applicable, add the following below this CDDL HEADER, with the
16*fcf3ce44SJohn Forte  * fields enclosed by brackets "[]" replaced with your own identifying
17*fcf3ce44SJohn Forte  * information: Portions Copyright [yyyy] [name of copyright owner]
18*fcf3ce44SJohn Forte  *
19*fcf3ce44SJohn Forte  * CDDL HEADER END
20*fcf3ce44SJohn Forte  */
21*fcf3ce44SJohn Forte /*
22*fcf3ce44SJohn Forte  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23*fcf3ce44SJohn Forte  * Use is subject to license terms.
24*fcf3ce44SJohn Forte  */
25*fcf3ce44SJohn Forte 
26*fcf3ce44SJohn Forte /*
27*fcf3ce44SJohn Forte  * The sole purpose of this file is to document our violations of the DDI
28*fcf3ce44SJohn Forte  * in Solaris and to get ddict to run on the data services stack.
29*fcf3ce44SJohn Forte  * Definitions and declarations contained in this file are never compiled
30*fcf3ce44SJohn Forte  * into the code.  It is only included if we are running ddict on our src.
31*fcf3ce44SJohn Forte  *
32*fcf3ce44SJohn Forte  * IMPORTANT NOTE:
33*fcf3ce44SJohn Forte  * Many of the declarations are not correct. It does not matter.
34*fcf3ce44SJohn Forte  * Structure declarations only define the fields we require.
35*fcf3ce44SJohn Forte  * Structures which we use in an opaque manner are defined as void *
36*fcf3ce44SJohn Forte  */
37*fcf3ce44SJohn Forte 
38*fcf3ce44SJohn Forte #ifndef	_SYS_CONTRACT_H
39*fcf3ce44SJohn Forte #define	_SYS_CONTRACT_H
40*fcf3ce44SJohn Forte 
41*fcf3ce44SJohn Forte #ifdef	__cplusplus
42*fcf3ce44SJohn Forte extern "C" {
43*fcf3ce44SJohn Forte #endif
44*fcf3ce44SJohn Forte 
45*fcf3ce44SJohn Forte /*
46*fcf3ce44SJohn Forte  * Define our interfaces for nsctl because ddict is stupid
47*fcf3ce44SJohn Forte  * about intermodule dependencies
48*fcf3ce44SJohn Forte  */
49*fcf3ce44SJohn Forte #include <sys/nsctl/nsctl_inter.h>
50*fcf3ce44SJohn Forte 
51*fcf3ce44SJohn Forte /*
52*fcf3ce44SJohn Forte  * Define our ncall interfaces
53*fcf3ce44SJohn Forte  */
54*fcf3ce44SJohn Forte #include <sys/nsctl/ncall_inter.h>
55*fcf3ce44SJohn Forte 
56*fcf3ce44SJohn Forte /*
57*fcf3ce44SJohn Forte  * The STRUCT_DECL definitions in the ddict headers are fouled up
58*fcf3ce44SJohn Forte  * we include our own model.h here to redefine it to avoid errors.
59*fcf3ce44SJohn Forte  */
60*fcf3ce44SJohn Forte #if !defined(_SunOS_5_6)
61*fcf3ce44SJohn Forte #include <sys/nsctl/model.h>
62*fcf3ce44SJohn Forte #endif
63*fcf3ce44SJohn Forte 
64*fcf3ce44SJohn Forte /*
65*fcf3ce44SJohn Forte  * General violations
66*fcf3ce44SJohn Forte  * Everybody violates these
67*fcf3ce44SJohn Forte  * Why are they called ddi if it is not part of it?
68*fcf3ce44SJohn Forte  */
69*fcf3ce44SJohn Forte 
70*fcf3ce44SJohn Forte #define	DDI_PROP_NOTPROM 0
71*fcf3ce44SJohn Forte 
ddi_rele_driver(void)72*fcf3ce44SJohn Forte int ddi_rele_driver(void) { }
ddi_hold_installed_driver(void)73*fcf3ce44SJohn Forte int ddi_hold_installed_driver(void) { }
74*fcf3ce44SJohn Forte 
75*fcf3ce44SJohn Forte /*
76*fcf3ce44SJohn Forte  * SV module violations
77*fcf3ce44SJohn Forte  */
78*fcf3ce44SJohn Forte void *curthread;
79*fcf3ce44SJohn Forte int devcnt;
80*fcf3ce44SJohn Forte 
81*fcf3ce44SJohn Forte /*
82*fcf3ce44SJohn Forte  * The following from vnode.h
83*fcf3ce44SJohn Forte  */
84*fcf3ce44SJohn Forte typedef struct  vode {
85*fcf3ce44SJohn Forte 	int v_lock;	/* SDBC uses this too */
86*fcf3ce44SJohn Forte 	int v_type;	/* nskern too */
87*fcf3ce44SJohn Forte 	int v_rdev;	/* nskern too */
88*fcf3ce44SJohn Forte } vnode_t;
89*fcf3ce44SJohn Forte 
90*fcf3ce44SJohn Forte #define	FOLLOW 0
91*fcf3ce44SJohn Forte #define	NULLVPP NULL
92*fcf3ce44SJohn Forte #define	AT_RDEV 0
93*fcf3ce44SJohn Forte #define	VOP_GETATTR(vp, vap, f, cr) ((void)0)
94*fcf3ce44SJohn Forte #define	VN_RELE(vp) ((void)0)
95*fcf3ce44SJohn Forte 
96*fcf3ce44SJohn Forte /*
97*fcf3ce44SJohn Forte  *  The fields we use from vattr_t
98*fcf3ce44SJohn Forte  */
99*fcf3ce44SJohn Forte typedef struct vattr {
100*fcf3ce44SJohn Forte 	uint_t	va_mask;
101*fcf3ce44SJohn Forte 	dev_t	va_rdev;
102*fcf3ce44SJohn Forte 	int	va_size;	/* nskern */
103*fcf3ce44SJohn Forte } vattr_t;
104*fcf3ce44SJohn Forte 
lookupname(void,void,void,void,void)105*fcf3ce44SJohn Forte int lookupname(void, void, void, void, void) { }
106*fcf3ce44SJohn Forte 
107*fcf3ce44SJohn Forte /*
108*fcf3ce44SJohn Forte  * End of SV module violations
109*fcf3ce44SJohn Forte  */
110*fcf3ce44SJohn Forte 
111*fcf3ce44SJohn Forte /*
112*fcf3ce44SJohn Forte  * DSW/II module violations
113*fcf3ce44SJohn Forte  */
114*fcf3ce44SJohn Forte 
115*fcf3ce44SJohn Forte /*
116*fcf3ce44SJohn Forte  * This is really bogus that ddict does not understand sys/inttypes.h
117*fcf3ce44SJohn Forte  */
118*fcf3ce44SJohn Forte #define	INT32_MIN	0
119*fcf3ce44SJohn Forte #define	INT32_MAX	0
120*fcf3ce44SJohn Forte #define	INT64_MAX	0
121*fcf3ce44SJohn Forte 
122*fcf3ce44SJohn Forte /*
123*fcf3ce44SJohn Forte  * End of DSW/II module violations
124*fcf3ce44SJohn Forte  */
125*fcf3ce44SJohn Forte 
126*fcf3ce44SJohn Forte /*
127*fcf3ce44SJohn Forte  * UNISTAT module violations
128*fcf3ce44SJohn Forte  */
129*fcf3ce44SJohn Forte 
130*fcf3ce44SJohn Forte void mod_miscops;
131*fcf3ce44SJohn Forte typedef enum { B_FALSE, B_TRUE } boolean_t;
132*fcf3ce44SJohn Forte 
133*fcf3ce44SJohn Forte /*
134*fcf3ce44SJohn Forte  * End of UNISTAT module violations
135*fcf3ce44SJohn Forte  */
136*fcf3ce44SJohn Forte 
137*fcf3ce44SJohn Forte /*
138*fcf3ce44SJohn Forte  * NSCTL module violations
139*fcf3ce44SJohn Forte  */
140*fcf3ce44SJohn Forte #define	ERESTART 0
141*fcf3ce44SJohn Forte #define	EUSERS 0
142*fcf3ce44SJohn Forte #define	ENAMETOOLONG 0
143*fcf3ce44SJohn Forte #define	ENOSYS	0
144*fcf3ce44SJohn Forte #define	FOPEN	0
ddi_name_to_major()145*fcf3ce44SJohn Forte int ddi_name_to_major() { }
146*fcf3ce44SJohn Forte /*
147*fcf3ce44SJohn Forte  * End of NSCTL module violations
148*fcf3ce44SJohn Forte  */
149*fcf3ce44SJohn Forte 
150*fcf3ce44SJohn Forte /*
151*fcf3ce44SJohn Forte  * NSKERN module violations
152*fcf3ce44SJohn Forte  */
153*fcf3ce44SJohn Forte #define	UL_GETFSIZE	0
154*fcf3ce44SJohn Forte #define	USHRT_MAX	0
155*fcf3ce44SJohn Forte 
156*fcf3ce44SJohn Forte typedef	u_longlong_t	rlim64_t;
ulimit()157*fcf3ce44SJohn Forte int ulimit() { }
158*fcf3ce44SJohn Forte int maxphys;
159*fcf3ce44SJohn Forte 
160*fcf3ce44SJohn Forte #define	AT_SIZE	0
161*fcf3ce44SJohn Forte #define	VBLK	0
162*fcf3ce44SJohn Forte #define	VCHR	0
163*fcf3ce44SJohn Forte #define	VREG	0
164*fcf3ce44SJohn Forte #define	VLNK	0
165*fcf3ce44SJohn Forte 
166*fcf3ce44SJohn Forte #define	VOP_CLOSE(vp, f, c, o, cr)	((void)0)
167*fcf3ce44SJohn Forte #define	VOP_RWLOCK(vp, w)	((void)0)
168*fcf3ce44SJohn Forte #define	VOP_RWUNLOCK(vp, w)	((void)0)
169*fcf3ce44SJohn Forte #define	VOP_READ(vp, uiop, iof, cr)	((void)0)
170*fcf3ce44SJohn Forte #define	VOP_WRITE(vp, uiop, iof, cr)	((void)0)
171*fcf3ce44SJohn Forte 
vn_open(char * pnamep,void seg,int filemode,int createmode,struct vnode ** vpp,void crwhy,mode_t umask)172*fcf3ce44SJohn Forte int vn_open(char *pnamep, void seg, int filemode, int createmode,
173*fcf3ce44SJohn Forte 		struct vnode **vpp, void crwhy, mode_t umask) { }
174*fcf3ce44SJohn Forte 
175*fcf3ce44SJohn Forte /*
176*fcf3ce44SJohn Forte  * End of NSKERN module violations
177*fcf3ce44SJohn Forte  */
178*fcf3ce44SJohn Forte 
179*fcf3ce44SJohn Forte /*
180*fcf3ce44SJohn Forte  * NVRAM module violations
181*fcf3ce44SJohn Forte  */
182*fcf3ce44SJohn Forte #define	MMU_PAGESIZE	0
183*fcf3ce44SJohn Forte 
184*fcf3ce44SJohn Forte #ifndef MAXNAMELEN
185*fcf3ce44SJohn Forte #define	MAXNAMELEN	1
186*fcf3ce44SJohn Forte #endif
187*fcf3ce44SJohn Forte 
188*fcf3ce44SJohn Forte #define	DEVMAP_DEFAULTS 0
189*fcf3ce44SJohn Forte #define	PFN_INVALID	-1
190*fcf3ce44SJohn Forte 
191*fcf3ce44SJohn Forte char hw_serial[1];
mmu_ptob(void arg)192*fcf3ce44SJohn Forte int mmu_ptob(void arg) { }
roundup(void arg)193*fcf3ce44SJohn Forte int roundup(void arg) { }
194*fcf3ce44SJohn Forte 
195*fcf3ce44SJohn Forte /*
196*fcf3ce44SJohn Forte  * End of NVRAM module violations
197*fcf3ce44SJohn Forte  */
198*fcf3ce44SJohn Forte 
199*fcf3ce44SJohn Forte /*
200*fcf3ce44SJohn Forte  * RDCSVR (SNDR) module
201*fcf3ce44SJohn Forte  * Contract PSARC 2001/699
202*fcf3ce44SJohn Forte  */
203*fcf3ce44SJohn Forte #define	DUP_DONE	0
204*fcf3ce44SJohn Forte #define	DUP_ERROR	0
205*fcf3ce44SJohn Forte #define	DUP_INPROGRESS	0
206*fcf3ce44SJohn Forte #define	DUP_NEW		0
207*fcf3ce44SJohn Forte #define	DUP_DROP	0
208*fcf3ce44SJohn Forte 
209*fcf3ce44SJohn Forte #define	RPC_MAXDATASIZE	0
210*fcf3ce44SJohn Forte 
211*fcf3ce44SJohn Forte 
212*fcf3ce44SJohn Forte typedef void * file_t;		/* opaque */
213*fcf3ce44SJohn Forte typedef	void SVCXPRT;		/* opaque */
214*fcf3ce44SJohn Forte typedef	void SVCMASTERXPRT;	/* opaque */
215*fcf3ce44SJohn Forte typedef void xdrproc_t;		/* opaque */
216*fcf3ce44SJohn Forte typedef int enum_t;
217*fcf3ce44SJohn Forte 
218*fcf3ce44SJohn Forte typedef struct svc_req {	/* required fields */
219*fcf3ce44SJohn Forte 	int rq_vers;
220*fcf3ce44SJohn Forte 	int rq_proc;
221*fcf3ce44SJohn Forte } svc_req_t;
222*fcf3ce44SJohn Forte 
SVC_FREEARGS(void xprt,void a,void * b)223*fcf3ce44SJohn Forte void SVC_FREEARGS(void xprt, void a, void *b) { }
SVC_DUP(void xprt,void req,void i,void j,void * dr)224*fcf3ce44SJohn Forte void SVC_DUP(void xprt, void req, void i, void j, void *dr) { }
svcerr_systemerr(void xprt)225*fcf3ce44SJohn Forte void svcerr_systemerr(void xprt) { }
svcerr_noproc(void xprt)226*fcf3ce44SJohn Forte void svcerr_noproc(void xprt) { }
SVC_DUPDONE(void xprt,void dr,void a,void b,void c)227*fcf3ce44SJohn Forte void SVC_DUPDONE(void xprt, void dr, void a, void b, void c) { }
228*fcf3ce44SJohn Forte 
svc_tli_kcreate(void * f,void * n,void * b,void ** x,void * t,uint_t c,uint_t d)229*fcf3ce44SJohn Forte SVCXPRT *svc_tli_kcreate(void *f, void *n, void *b, void **x, void *t,
230*fcf3ce44SJohn Forte 	uint_t c, uint_t d) { }
231*fcf3ce44SJohn Forte 
232*fcf3ce44SJohn Forte /*
233*fcf3ce44SJohn Forte  * non-ddi not under contracts
234*fcf3ce44SJohn Forte  */
235*fcf3ce44SJohn Forte struct netbuf {
236*fcf3ce44SJohn Forte 	int	maxlen;
237*fcf3ce44SJohn Forte 	int	len;
238*fcf3ce44SJohn Forte 	char	*buf;
239*fcf3ce44SJohn Forte }
240*fcf3ce44SJohn Forte 
241*fcf3ce44SJohn Forte /*
242*fcf3ce44SJohn Forte  * End of RDCSRV module Contracts
243*fcf3ce44SJohn Forte  */
244*fcf3ce44SJohn Forte 
245*fcf3ce44SJohn Forte /*
246*fcf3ce44SJohn Forte  * RDC (SNDR) module
247*fcf3ce44SJohn Forte  * Contract PSARC 2001/699
248*fcf3ce44SJohn Forte  */
249*fcf3ce44SJohn Forte 
250*fcf3ce44SJohn Forte typedef	u_longlong_t	rpcproc_t;
251*fcf3ce44SJohn Forte typedef	u_longlong_t	xdrproc_t;
252*fcf3ce44SJohn Forte typedef	u_longlong_t	rpcvers_t;
253*fcf3ce44SJohn Forte #define	__dontcare__    -1
254*fcf3ce44SJohn Forte #define	RPC_INTR 0
255*fcf3ce44SJohn Forte #define	RPC_SUCCESS	0
256*fcf3ce44SJohn Forte #define	RPC_TLIERROR	0
257*fcf3ce44SJohn Forte #define	RPC_XPRTFAILED	0
258*fcf3ce44SJohn Forte #define	RPC_VERSMISMATCH	0
259*fcf3ce44SJohn Forte #define	RPC_PROGVERSMISMATCH 0
260*fcf3ce44SJohn Forte #define	RPC_INPROGRESS	0
261*fcf3ce44SJohn Forte 
262*fcf3ce44SJohn Forte #define	ENOEXEC	0
263*fcf3ce44SJohn Forte #define	EBADF	0
264*fcf3ce44SJohn Forte 
265*fcf3ce44SJohn Forte /*
266*fcf3ce44SJohn Forte  * XDR routines
267*fcf3ce44SJohn Forte  * from rpc/xdr.h
268*fcf3ce44SJohn Forte  */
269*fcf3ce44SJohn Forte typedef	void * XDR;	/* opaque */
xdr_void()270*fcf3ce44SJohn Forte int xdr_void() { }
xdr_int()271*fcf3ce44SJohn Forte int xdr_int() { }
xdr_union()272*fcf3ce44SJohn Forte int xdr_union() { }
xdr_enum()273*fcf3ce44SJohn Forte int xdr_enum() { }
xdr_u_int()274*fcf3ce44SJohn Forte int xdr_u_int() { }
xdr_u_longlong_t()275*fcf3ce44SJohn Forte int xdr_u_longlong_t() { }
xdr_opaque()276*fcf3ce44SJohn Forte int xdr_opaque() { }
xdr_bytes()277*fcf3ce44SJohn Forte int xdr_bytes() { }
xdr_array()278*fcf3ce44SJohn Forte int xdr_array() { }
279*fcf3ce44SJohn Forte #define	NULL_xdrproc_t ((xdrproc_t)0)
280*fcf3ce44SJohn Forte 
281*fcf3ce44SJohn Forte /*
282*fcf3ce44SJohn Forte  * The following imported rpc/clnt.h
283*fcf3ce44SJohn Forte  */
284*fcf3ce44SJohn Forte 
285*fcf3ce44SJohn Forte /* Client is mostly opaque exccept for the following */
286*fcf3ce44SJohn Forte 
287*fcf3ce44SJohn Forte typedef struct __client {	/* required fields */
288*fcf3ce44SJohn Forte 	void *cl_auth;
289*fcf3ce44SJohn Forte 	bool_t cl_nosignal;
290*fcf3ce44SJohn Forte } CLIENT;
291*fcf3ce44SJohn Forte 
292*fcf3ce44SJohn Forte #define	CLSET_PROGRESS	0
293*fcf3ce44SJohn Forte #define	KNC_STRSIZE	128
294*fcf3ce44SJohn Forte struct knetconfig {
295*fcf3ce44SJohn Forte 	unsigned int	knc_semantics;
296*fcf3ce44SJohn Forte 	caddr_t		knc_protofmly;
297*fcf3ce44SJohn Forte 	caddr_t		knc_proto;
298*fcf3ce44SJohn Forte 	dev_t		knc_rdev;
299*fcf3ce44SJohn Forte };
300*fcf3ce44SJohn Forte 
clnt_sperrno()301*fcf3ce44SJohn Forte void *clnt_sperrno() { }
IS_UNRECOVERABLE_RPC(a)302*fcf3ce44SJohn Forte void IS_UNRECOVERABLE_RPC(a) { }
CLNT_CONTROL(cl,request,info)303*fcf3ce44SJohn Forte void CLNT_CONTROL(cl, request, info) { }
AUTH_DESTROY(void * a)304*fcf3ce44SJohn Forte void AUTH_DESTROY(void *a) { }
CLNT_DESTROY(void * a)305*fcf3ce44SJohn Forte void CLNT_DESTROY(void *a) { }
306*fcf3ce44SJohn Forte 
clnt_tli_kcreate(void * a,void * b,void c,void d,void e,void f,void * g,void ** h)307*fcf3ce44SJohn Forte int clnt_tli_kcreate(void *a, void *b, void c, void d, void e, void f,
308*fcf3ce44SJohn Forte 	void *g, void **h) { }
309*fcf3ce44SJohn Forte 
clnt_tli_kinit(void * h,void * config,void * addr,uint_t a,int b,void * c)310*fcf3ce44SJohn Forte int clnt_tli_kinit(void *h, void *config, void *addr, uint_t a, int b,
311*fcf3ce44SJohn Forte 	void *c) { }
312*fcf3ce44SJohn Forte 
CLNT_CALL(void,void,void,void,void,void,void)313*fcf3ce44SJohn Forte void	 CLNT_CALL(void, void, void, void, void, void, void) { }
314*fcf3ce44SJohn Forte 
315*fcf3ce44SJohn Forte /*
316*fcf3ce44SJohn Forte  * The following imported from rpc/svc.h
317*fcf3ce44SJohn Forte  */
svc_sendreply()318*fcf3ce44SJohn Forte void svc_sendreply() { }
svcerr_decode()319*fcf3ce44SJohn Forte void svcerr_decode() { }
SVC_GETARGS()320*fcf3ce44SJohn Forte void SVC_GETARGS() { }
321*fcf3ce44SJohn Forte 
322*fcf3ce44SJohn Forte /*
323*fcf3ce44SJohn Forte  * The following imported from sys/file.h
324*fcf3ce44SJohn Forte  */
325*fcf3ce44SJohn Forte 
getf(void)326*fcf3ce44SJohn Forte void getf(void) { }
releasef(void)327*fcf3ce44SJohn Forte void releasef(void) { }
328*fcf3ce44SJohn Forte 
329*fcf3ce44SJohn Forte /*
330*fcf3ce44SJohn Forte  * Not under contract
331*fcf3ce44SJohn Forte  */
sigintr(void)332*fcf3ce44SJohn Forte void sigintr(void) { }
sigunintr(void)333*fcf3ce44SJohn Forte void sigunintr(void) { }
expldev()334*fcf3ce44SJohn Forte dev_t expldev() { }
335*fcf3ce44SJohn Forte 
336*fcf3ce44SJohn Forte /*
337*fcf3ce44SJohn Forte  * End of RDC module
338*fcf3ce44SJohn Forte  */
339*fcf3ce44SJohn Forte 
340*fcf3ce44SJohn Forte /*
341*fcf3ce44SJohn Forte  * SDBC module violations
342*fcf3ce44SJohn Forte  */
343*fcf3ce44SJohn Forte 
344*fcf3ce44SJohn Forte /*
345*fcf3ce44SJohn Forte  *  devid uses internal structure
346*fcf3ce44SJohn Forte  *  from sys/ddi_impldefs.h
347*fcf3ce44SJohn Forte  */
348*fcf3ce44SJohn Forte typedef struct impl_devid {
349*fcf3ce44SJohn Forte 	uchar_t did_type_hi;
350*fcf3ce44SJohn Forte 	uchar_t did_type_lo;
351*fcf3ce44SJohn Forte } impl_devid_t;
352*fcf3ce44SJohn Forte 
353*fcf3ce44SJohn Forte #define	DEVID_GETTYPE(devid)  0
354*fcf3ce44SJohn Forte #define	DEVID_SCSI_SERIAL 0
355*fcf3ce44SJohn Forte 
356*fcf3ce44SJohn Forte #define	ENOLINK	0	/* NCALL too */
357*fcf3ce44SJohn Forte #define	E2BIG	0
358*fcf3ce44SJohn Forte #define	ENOENT 0
359*fcf3ce44SJohn Forte #define	EIDRM 0
360*fcf3ce44SJohn Forte 
361*fcf3ce44SJohn Forte #define	B_KERNBUF 0
362*fcf3ce44SJohn Forte #define	KSTAT_TYPE_RAW 0
363*fcf3ce44SJohn Forte #define	MAXPATHLEN 0
364*fcf3ce44SJohn Forte 
365*fcf3ce44SJohn Forte #define	VN_HOLD(bp) ((void)0)
366*fcf3ce44SJohn Forte 
367*fcf3ce44SJohn Forte /* Page list IO stuff */
368*fcf3ce44SJohn Forte typedef struct page {
369*fcf3ce44SJohn Forte 	int v_count;	/* sdbc */
370*fcf3ce44SJohn Forte } page_t;
371*fcf3ce44SJohn Forte page_t kvp;		/* We use the kernel segment */
page_add(void)372*fcf3ce44SJohn Forte int page_add(void) { }
page_find(void)373*fcf3ce44SJohn Forte int page_find(void) { }
page_list_concat(void)374*fcf3ce44SJohn Forte int page_list_concat(void) { }
pageio_setup(void)375*fcf3ce44SJohn Forte int pageio_setup(void) { }
pageio_done(void)376*fcf3ce44SJohn Forte int pageio_done(void) { }
377*fcf3ce44SJohn Forte 
kobj_getsymvalue(void)378*fcf3ce44SJohn Forte void kobj_getsymvalue(void) { }
ddi_dev_pathname(void)379*fcf3ce44SJohn Forte int ddi_dev_pathname(void) { }
380*fcf3ce44SJohn Forte 
381*fcf3ce44SJohn Forte /*
382*fcf3ce44SJohn Forte  * HACK ALERT
383*fcf3ce44SJohn Forte  * struct buf hack for ddict.
384*fcf3ce44SJohn Forte  * SDBC currently violates in struct buf
385*fcf3ce44SJohn Forte  * 	b_pages
386*fcf3ce44SJohn Forte  *	b_proc
387*fcf3ce44SJohn Forte  * which we will define as the pad fields for ddict since
388*fcf3ce44SJohn Forte  * we can not overload the definition of struct buf with our own stuff.
389*fcf3ce44SJohn Forte  */
390*fcf3ce44SJohn Forte 
391*fcf3ce44SJohn Forte #define	b_pages	b_pad7	/* b_pages in struct buf */
392*fcf3ce44SJohn Forte #define	b_proc	b_pad8	/* b_proc in struct buf */
393*fcf3ce44SJohn Forte #define	b_forw	b_pad1	/* b_forw in struct buf */
394*fcf3ce44SJohn Forte #define	b_back	b_pad2	/* b_back in struct buf */
395*fcf3ce44SJohn Forte 
396*fcf3ce44SJohn Forte /*
397*fcf3ce44SJohn Forte  * End of SDBC moduel violations
398*fcf3ce44SJohn Forte  */
399*fcf3ce44SJohn Forte 
400*fcf3ce44SJohn Forte /*
401*fcf3ce44SJohn Forte  * SCMTEST module violations
402*fcf3ce44SJohn Forte  */
403*fcf3ce44SJohn Forte 
404*fcf3ce44SJohn Forte #define	ESRCH	0	/* NCALL too */
405*fcf3ce44SJohn Forte 
406*fcf3ce44SJohn Forte /*
407*fcf3ce44SJohn Forte  * End of SCMTEST module violations
408*fcf3ce44SJohn Forte  */
409*fcf3ce44SJohn Forte /*
410*fcf3ce44SJohn Forte  * SFTM module violations
411*fcf3ce44SJohn Forte  * Note: XXX This list is currently incomplete
412*fcf3ce44SJohn Forte  */
413*fcf3ce44SJohn Forte 
414*fcf3ce44SJohn Forte typedef void * cqe_t;			/* opaque */
415*fcf3ce44SJohn Forte typedef void * fcal_packet_t;		/* opaque */
416*fcf3ce44SJohn Forte typedef void * soc_response_t;		/* opaque */
417*fcf3ce44SJohn Forte typedef void * la_els_logi_t;		/* opaque */
418*fcf3ce44SJohn Forte typedef void * la_els_adisc_t;		/* opaque */
419*fcf3ce44SJohn Forte typedef void * fcp_rsp_t;		/* opaque */
420*fcf3ce44SJohn Forte typedef void * soc_request_t;		/* opaque */
421*fcf3ce44SJohn Forte typedef void * els_payload_t;		/* opaque */
422*fcf3ce44SJohn Forte typedef void * la_els_logo_t;		/* opaque */
423*fcf3ce44SJohn Forte typedef void * fc_frame_header_t;	/* opaque */
424*fcf3ce44SJohn Forte 
425*fcf3ce44SJohn Forte typedef struct la_els_prli_s {
426*fcf3ce44SJohn Forte 	uchar_t		ls_code;
427*fcf3ce44SJohn Forte 	uchar_t		page_length;
428*fcf3ce44SJohn Forte 	ushort_t	payload_length;
429*fcf3ce44SJohn Forte 	uchar_t		service_params[1];
430*fcf3ce44SJohn Forte } la_els_prli_t;
431*fcf3ce44SJohn Forte 
432*fcf3ce44SJohn Forte typedef	la_els_prli_t la_els_prli_reply_t;
433*fcf3ce44SJohn Forte typedef la_els_prli_t la_els_prlo_t;
434*fcf3ce44SJohn Forte typedef	la_els_prli_t la_els_prlo_reply_t;
435*fcf3ce44SJohn Forte 
436*fcf3ce44SJohn Forte /*
437*fcf3ce44SJohn Forte  * The following from /usr/include/sys/fc4/fcp.h
438*fcf3ce44SJohn Forte  */
439*fcf3ce44SJohn Forte typedef struct fcp_cntl {
440*fcf3ce44SJohn Forte 	uchar_t	cntl_reserved_1	: 5,
441*fcf3ce44SJohn Forte 		cntl_qtype	: 3;
442*fcf3ce44SJohn Forte 	uchar_t	cntl_kill_tsk	: 1,
443*fcf3ce44SJohn Forte 		cntl_clr_aca	: 1,
444*fcf3ce44SJohn Forte 		cntl_reset	: 1,
445*fcf3ce44SJohn Forte 		cntl_reserved_2	: 2,
446*fcf3ce44SJohn Forte 		cntl_clr_tsk	: 1,
447*fcf3ce44SJohn Forte 		cntl_abort_tsk	: 1,
448*fcf3ce44SJohn Forte 		cntl_reserved_3	: 1;
449*fcf3ce44SJohn Forte 	uchar_t	cntl_reserved_4	: 6,
450*fcf3ce44SJohn Forte 		cntl_read_data	: 1,
451*fcf3ce44SJohn Forte 		cntl_write_data	: 1;
452*fcf3ce44SJohn Forte } fcp_cntl_t;
453*fcf3ce44SJohn Forte 
454*fcf3ce44SJohn Forte typedef struct fcp_ent_addr {
455*fcf3ce44SJohn Forte 	ushort_t ent_addr_0;
456*fcf3ce44SJohn Forte 	ushort_t ent_addr_1;
457*fcf3ce44SJohn Forte 	ushort_t ent_addr_2;
458*fcf3ce44SJohn Forte 	ushort_t ent_addr_3;
459*fcf3ce44SJohn Forte } fcp_ent_addr_t;
460*fcf3ce44SJohn Forte 
461*fcf3ce44SJohn Forte typedef struct fcp_cmd_s {
462*fcf3ce44SJohn Forte 	fcp_ent_addr_t	fcp_ent_addr;
463*fcf3ce44SJohn Forte 	fcp_cntl_t	fcp_cntl;
464*fcf3ce44SJohn Forte 	uchar_t		fcp_cdb[1];
465*fcf3ce44SJohn Forte 	int		fcp_data_len;
466*fcf3ce44SJohn Forte } fcp_cmd_t;
467*fcf3ce44SJohn Forte 
468*fcf3ce44SJohn Forte typedef struct fcal_transport {
469*fcf3ce44SJohn Forte 	uchar_t dummy1;
470*fcf3ce44SJohn Forte 	uchar_t dummy2;
471*fcf3ce44SJohn Forte } fcal_transport_t;
472*fcf3ce44SJohn Forte 
473*fcf3ce44SJohn Forte /*
474*fcf3ce44SJohn Forte  * End of SFTM module violations
475*fcf3ce44SJohn Forte  */
476*fcf3ce44SJohn Forte 
477*fcf3ce44SJohn Forte /*
478*fcf3ce44SJohn Forte  * STE module violations
479*fcf3ce44SJohn Forte  */
480*fcf3ce44SJohn Forte 
481*fcf3ce44SJohn Forte typedef void  la_wwn_t;		/* opaque */
482*fcf3ce44SJohn Forte /* WWN formats from sys/fcal/fcal_linkapp.h */
483*fcf3ce44SJohn Forte typedef union la_wwn {
484*fcf3ce44SJohn Forte 	uchar_t		raw_wwn[8];
485*fcf3ce44SJohn Forte 	struct {
486*fcf3ce44SJohn Forte 		uint_t	naa_id : 4;
487*fcf3ce44SJohn Forte 		uint_t	nport_id : 12;
488*fcf3ce44SJohn Forte 		uint_t	wwn_hi : 16;
489*fcf3ce44SJohn Forte 		uint_t	wwn_lo;
490*fcf3ce44SJohn Forte 	} w;
491*fcf3ce44SJohn Forte } la_wwn_t;
492*fcf3ce44SJohn Forte 
insque(void)493*fcf3ce44SJohn Forte insque(void) { }
remque(void)494*fcf3ce44SJohn Forte remque(void) { }
snprintf(void)495*fcf3ce44SJohn Forte snprintf(void) { }
496*fcf3ce44SJohn Forte 
497*fcf3ce44SJohn Forte /*
498*fcf3ce44SJohn Forte  * STE uses inq_serial and inq_ackqreqq from struct scsi_inquiry
499*fcf3ce44SJohn Forte  */
500*fcf3ce44SJohn Forte #define	inq_serial	inq_pid
501*fcf3ce44SJohn Forte #define	inq_ackqreqq	inq_pid
502*fcf3ce44SJohn Forte /*
503*fcf3ce44SJohn Forte  * End of STE module violations
504*fcf3ce44SJohn Forte  */
505*fcf3ce44SJohn Forte 
506*fcf3ce44SJohn Forte /*
507*fcf3ce44SJohn Forte  * NCALL module violations
508*fcf3ce44SJohn Forte  */
509*fcf3ce44SJohn Forte #define	ENONET	0
510*fcf3ce44SJohn Forte 
511*fcf3ce44SJohn Forte /* NCALLSRV */
512*fcf3ce44SJohn Forte typedef int bool_t;
513*fcf3ce44SJohn Forte 
514*fcf3ce44SJohn Forte /* NCALLIP */
515*fcf3ce44SJohn Forte #ifndef TRUE
516*fcf3ce44SJohn Forte #define	TRUE	1
517*fcf3ce44SJohn Forte #endif
518*fcf3ce44SJohn Forte 
519*fcf3ce44SJohn Forte #ifndef FALSE
520*fcf3ce44SJohn Forte #define	FALSE	0
521*fcf3ce44SJohn Forte #endif
522*fcf3ce44SJohn Forte 
523*fcf3ce44SJohn Forte #define	ERANGE	0
524*fcf3ce44SJohn Forte #define	ENODATA	0
525*fcf3ce44SJohn Forte 
526*fcf3ce44SJohn Forte #define	RPC_TIMEDOUT 0
527*fcf3ce44SJohn Forte 
528*fcf3ce44SJohn Forte /*
529*fcf3ce44SJohn Forte  * End of NCALL violations
530*fcf3ce44SJohn Forte  */
531*fcf3ce44SJohn Forte #ifdef	__cplusplus
532*fcf3ce44SJohn Forte }
533*fcf3ce44SJohn Forte #endif
534*fcf3ce44SJohn Forte 
535*fcf3ce44SJohn Forte #endif /* _SYS_CONTRACT_H */
536