Imported Upstream version 2.5.0
[debian/amanda] / contrib / gsc / gscdds.h
1 /*
2  * $Id: gscdds.h,v 1.1 2001/04/15 11:12:37 ant Exp $
3  * Copyright (c) 1996, 1997 by Matthew Jacob
4  *
5  *      This software is free software; you can redistribute it and/or
6  *      modify it under the terms of the GNU Library General Public
7  *      License as published by the Free Software Foundation; version 2.
8  *
9  *      This software is distributed in the hope that it will be useful,
10  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  *      Library General Public License for more details.
13  *
14  *      You should have received a copy of the GNU Library General Public
15  *      License along with this software; if not, write to the Free
16  *      Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  *
18  *      The author may be reached via electronic communications at
19  *
20  *              mjacob@feral.com
21  *
22  *      or, via United States Postal Address
23  *
24  *              Matthew Jacob
25  *              1831 Castro Street
26  *              San Francisco, CA, 94131
27  */
28 #ifndef _gscdds_h
29 #define _gscdds_h
30
31 #ifdef  __cplusplus
32 extern "C" {
33 #endif
34
35 #define MAX_UNITS       64
36
37 struct gsc_ddsinfo {
38     dev_t       busid;          /* dev_t for SCSI adapter */
39     char        target;         /* target */
40     char        lun;            /* logical unit */
41 };
42
43 /*
44  * Structure used to convey a scsi command to the driver
45  */
46
47 typedef struct {
48     char *      cdb;            /* SCSI command block */
49     int         cdblen;         /* length of SCSI command block */
50     char *      data_buf;       /* pointer to data area */
51     int         datalen;        /* length of data area. Zero implies none */
52     char *      sense_buf;      /* pointer to SENSE DATA area */
53     int         senselen;       /* length of sense area. Zero implies none */
54     char *      statusp;        /* pointer to SCSI status byte */
55     int         rw;             /* direction of data transfer- 1 means read */
56     int         timeval;        /* secs to complete cmd- 0 means infinite */
57 } scmd_t;
58
59
60 #define GSC_CMD         (('G' << 8) | 0)
61 #define GSC_SETDBG      (('G' << 8) | 1)
62
63 #ifdef  __cplusplus
64 }
65 #endif
66 #endif  /* ! _gscdds_h */
67 /*
68  * mode: c
69  * Local variables:
70  * c-indent-level: 4
71  * c-brace-imaginary-offset: 0
72  * c-brace-offset: -4
73  * c-argdecl-indent: 4
74  * c-label-offset: -4
75  * c-continued-statement-offset: 4
76  * c-continued-brace-offset: 0
77  * End:
78  */