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 * Digital OSF1 (aka Digital UNIX, Compaq/HP Tru64 UNIX) and 24 * Digital Ultrix support 25 * 26 * Contributing author: Matt Thomas 27 * E-Mail: thomas@lkg.dec.com 28 * 29 * This software fragment contains code that interfaces the 30 * application to the Digital OSF1 and Ultrix operating systems. 31 * The term Digital, Compaq, HP, OSF1 and Ultrix are used here 32 * for identification purposes only. 33 */ 34 #ifndef __OS_DEC_H__ 35 #define __OS_DEC_H__ 36 37 #if (defined(_OSF1) || defined(_ULTRIX)) && \ 38 (defined(DI_SCSIPT) || defined(CDDA_RD_SCSIPT)) && \ 39 !defined(DEMO_ONLY) 40 41 #ifndef lint 42 static char *_os_dec_h_ident_ = "@(#)os_dec.h 6.27 04/01/14"; 43 #endif 44 45 #ifdef _OSF1 46 #include <io/common/iotypes.h> 47 #include <io/common/devgetinfo.h> 48 #else /* must be ultrix */ 49 #include <sys/devio.h> 50 #endif 51 #include <io/cam/cam.h> 52 #include <io/cam/uagt.h> 53 #include <io/cam/dec_cam.h> 54 #include <io/cam/scsi_all.h> 55 56 57 #define OS_MODULE /* Indicate that this is compiled on a supported OS */ 58 #define SETUID_ROOT /* setuid root privilege is required */ 59 60 #define DEC_MAX_XFER (32 * 1024) /* Max per-request data length */ 61 62 #define DEV_CAM "/dev/cam" /* CAM device path */ 63 64 65 /* Public function prototypes */ 66 extern bool_t pthru_send(di_dev_t *, int, byte_t *, size_t, byte_t *, size_t, 67 byte_t *, size_t, byte_t, int, bool_t); 68 extern di_dev_t *pthru_open(char *); 69 extern void pthru_close(di_dev_t *); 70 extern void pthru_enable(di_dev_t *, int); 71 extern void pthru_disable(di_dev_t *, int); 72 extern bool_t pthru_is_enabled(di_dev_t *, int); 73 extern size_t pthru_maxfer(di_dev_t *); 74 extern char *pthru_vers(void); 75 76 #endif /* _OSF1 _ULTRIX DI_SCSIPT CDDA_RD_SCSIPT DEMO_ONLY */ 77 78 #endif /* __OS_DEC_H__ */ 79 80