1 /*
2  *   libdi - scsipt SCSI Device Interface Library
3  *
4  *   Copyright (C) 1993-2004  Ti Kan
5  *   E-mail: xmcd@amb.org
6  *
7  *   This program is free software; you can redistribute it and/or modify
8  *   it under the terms of the GNU General Public License as published by
9  *   the Free Software Foundation; either version 2 of the License, or
10  *   (at your option) any later version.
11  *
12  *   This program is distributed in the hope that it will be useful,
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *   GNU General Public License for more details.
16  *
17  *   You should have received a copy of the GNU General Public License
18  *   along with this program; if not, write to the Free Software
19  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21 
22 /*
23  *   BSDI BSD/OS support
24  *
25  *   Contributing author: Danny Braniss
26  *   E-Mail: danny@cs.huji.ac.il
27  *
28  *   This software fragment contains code that interfaces the
29  *   application to the BSDI BSD/OS (version 2.0 or later)
30  *   operating system.
31  */
32 #ifndef __OS_BSDI_H__
33 #define __OS_BSDI_H__
34 
35 #if defined(__bsdi__) && \
36     (defined(DI_SCSIPT) || defined(CDDA_RD_SCSIPT)) && \
37     !defined(DEMO_ONLY)
38 
39 #ifndef lint
40 static char *_os_bsdi_h_ident_ = "@(#)os_bsdi.h	6.26 04/01/14";
41 #endif
42 
43 #include <dev/scsi/scsi.h>
44 #include <dev/scsi/scsi_ioctl.h>
45 
46 #ifdef SCSIRAWCDB
47 #define OS_BSDI_3	/* BSDI 3.x SCSI subsystem */
48 #define BSDI_MAX_XFER	MAXPHYS		/* Max per-request data length */
49 #else
50 #define OS_BSDI_2	/* BSDI 2.x SCSI subsystem */
51 #define BSDI_MAX_XFER	(16 * 1024)	/* Max per-request data length */
52 #endif
53 
54 
55 #define OS_MODULE	/* Indicate that this is compiled on a supported OS */
56 #define SETUID_ROOT	/* Setuid root privilege is required */
57 
58 
59 /* Public function prototypes */
60 extern bool_t	pthru_send(di_dev_t *, int, byte_t *, size_t, byte_t *, size_t,
61 			   byte_t *, size_t, byte_t, int, bool_t);
62 extern di_dev_t	*pthru_open(char *);
63 extern void	pthru_close(di_dev_t *);
64 extern void	pthru_enable(di_dev_t *, int);
65 extern void	pthru_disable(di_dev_t *, int);
66 extern bool_t	pthru_is_enabled(di_dev_t *, int);
67 extern size_t	pthru_maxfer(di_dev_t *);
68 extern char	*pthru_vers(void);
69 
70 #endif	/* __bsdi__ DI_SCSIPT CDDA_RD_SCSIPT DEMO_ONLY */
71 
72 #endif	/* __OS_BSDI_H__ */
73 
74