/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* The sole purpose of this file is to document our violations of the DDI
* in Solaris and to get ddict to run on the data services stack.
* Definitions and declarations contained in this file are never compiled
* into the code. It is only included if we are running ddict on our src.
*
* IMPORTANT NOTE:
* Many of the declarations are not correct. It does not matter.
* Structure declarations only define the fields we require.
* Structures which we use in an opaque manner are defined as void *
*/
#ifndef _SYS_CONTRACT_H
#define _SYS_CONTRACT_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Define our interfaces for nsctl because ddict is stupid
* about intermodule dependencies
*/
/*
* Define our ncall interfaces
*/
/*
* The STRUCT_DECL definitions in the ddict headers are fouled up
* we include our own model.h here to redefine it to avoid errors.
*/
#if !defined(_SunOS_5_6)
#endif
/*
* General violations
* Everybody violates these
* Why are they called ddi if it is not part of it?
*/
#define DDI_PROP_NOTPROM 0
int ddi_rele_driver(void) { }
int ddi_hold_installed_driver(void) { }
/*
* SV module violations
*/
void *curthread;
int devcnt;
/*
* The following from vnode.h
*/
typedef struct vode {
} vnode_t;
#define FOLLOW 0
#define AT_RDEV 0
/*
* The fields we use from vattr_t
*/
typedef struct vattr {
} vattr_t;
int lookupname(void, void, void, void, void) { }
/*
* End of SV module violations
*/
/*
*/
/*
* This is really bogus that ddict does not understand sys/inttypes.h
*/
#define INT32_MIN 0
#define INT32_MAX 0
#define INT64_MAX 0
/*
*/
/*
* UNISTAT module violations
*/
void mod_miscops;
/*
* End of UNISTAT module violations
*/
/*
* NSCTL module violations
*/
#define ERESTART 0
#define EUSERS 0
#define ENAMETOOLONG 0
#define ENOSYS 0
#define FOPEN 0
int ddi_name_to_major() { }
/*
* End of NSCTL module violations
*/
/*
* NSKERN module violations
*/
#define UL_GETFSIZE 0
#define USHRT_MAX 0
int ulimit() { }
int maxphys;
#define AT_SIZE 0
#define VBLK 0
#define VCHR 0
#define VREG 0
#define VLNK 0
/*
* End of NSKERN module violations
*/
/*
* NVRAM module violations
*/
#define MMU_PAGESIZE 0
#ifndef MAXNAMELEN
#endif
#define DEVMAP_DEFAULTS 0
/*
* End of NVRAM module violations
*/
/*
* RDCSVR (SNDR) module
* Contract PSARC 2001/699
*/
#define DUP_DONE 0
#define DUP_ERROR 0
#define DUP_INPROGRESS 0
#define DUP_NEW 0
#define DUP_DROP 0
#define RPC_MAXDATASIZE 0
typedef int enum_t;
int rq_vers;
int rq_proc;
} svc_req_t;
/*
* non-ddi not under contracts
*/
struct netbuf {
int maxlen;
int len;
char *buf;
}
/*
* End of RDCSRV module Contracts
*/
/*
* RDC (SNDR) module
* Contract PSARC 2001/699
*/
#define RPC_INTR 0
#define RPC_SUCCESS 0
#define RPC_TLIERROR 0
#define RPC_XPRTFAILED 0
#define RPC_VERSMISMATCH 0
#define RPC_PROGVERSMISMATCH 0
#define RPC_INPROGRESS 0
#define ENOEXEC 0
#define EBADF 0
/*
* XDR routines
*/
int xdr_void() { }
int xdr_int() { }
int xdr_union() { }
int xdr_enum() { }
int xdr_u_int() { }
int xdr_u_longlong_t() { }
int xdr_opaque() { }
int xdr_bytes() { }
int xdr_array() { }
/*
*/
/* Client is mostly opaque exccept for the following */
void *cl_auth;
} CLIENT;
#define CLSET_PROGRESS 0
struct knetconfig {
unsigned int knc_semantics;
};
void *clnt_sperrno() { }
void IS_UNRECOVERABLE_RPC(a) { }
void AUTH_DESTROY(void *a) { }
void CLNT_DESTROY(void *a) { }
int clnt_tli_kcreate(void *a, void *b, void c, void d, void e, void f,
void *g, void **h) { }
void *c) { }
void CLNT_CALL(void, void, void, void, void, void, void) { }
/*
*/
void svc_sendreply() { }
void svcerr_decode() { }
void SVC_GETARGS() { }
/*
*/
void getf(void) { }
void releasef(void) { }
/*
* Not under contract
*/
void sigintr(void) { }
void sigunintr(void) { }
/*
* End of RDC module
*/
/*
* SDBC module violations
*/
/*
* devid uses internal structure
* from sys/ddi_impldefs.h
*/
typedef struct impl_devid {
} impl_devid_t;
#define DEVID_SCSI_SERIAL 0
#define E2BIG 0
#define ENOENT 0
#define EIDRM 0
#define B_KERNBUF 0
#define KSTAT_TYPE_RAW 0
#define MAXPATHLEN 0
/* Page list IO stuff */
typedef struct page {
} page_t;
int page_add(void) { }
int page_find(void) { }
int page_list_concat(void) { }
int pageio_setup(void) { }
int pageio_done(void) { }
void kobj_getsymvalue(void) { }
int ddi_dev_pathname(void) { }
/*
* HACK ALERT
* struct buf hack for ddict.
* SDBC currently violates in struct buf
* b_pages
* b_proc
* which we will define as the pad fields for ddict since
* we can not overload the definition of struct buf with our own stuff.
*/
/*
* End of SDBC moduel violations
*/
/*
* SCMTEST module violations
*/
/*
* End of SCMTEST module violations
*/
/*
* SFTM module violations
* Note: XXX This list is currently incomplete
*/
typedef struct la_els_prli_s {
/*
*/
typedef struct fcp_cntl {
} fcp_cntl_t;
typedef struct fcp_ent_addr {
typedef struct fcp_cmd_s {
int fcp_data_len;
} fcp_cmd_t;
typedef struct fcal_transport {
/*
* End of SFTM module violations
*/
/*
* STE module violations
*/
/* WWN formats from sys/fcal/fcal_linkapp.h */
typedef union la_wwn {
struct {
} w;
} la_wwn_t;
insque(void) { }
remque(void) { }
snprintf(void) { }
/*
* STE uses inq_serial and inq_ackqreqq from struct scsi_inquiry
*/
/*
* End of STE module violations
*/
/*
* NCALL module violations
*/
#define ENONET 0
/* NCALLSRV */
typedef int bool_t;
/* NCALLIP */
#ifndef TRUE
#endif
#ifndef FALSE
#define FALSE 0
#endif
#define ERANGE 0
#define ENODATA 0
#define RPC_TIMEDOUT 0
/*
* End of NCALL violations
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_CONTRACT_H */