1 | /* $Id: wnaspi32.h,v 1.1 1999-05-24 20:19:23 ktk Exp $ */
|
---|
2 |
|
---|
3 | #if !defined(WNASPI32_H)
|
---|
4 | #define WNASPI32_H
|
---|
5 |
|
---|
6 | #include "pshpack1.h"
|
---|
7 |
|
---|
8 | typedef union SRB * LPSRB;
|
---|
9 |
|
---|
10 | typedef struct tagSRB_HaInquiry {
|
---|
11 | BYTE SRB_Cmd; /* ASPI command code = SC_HA_INQUIRY */
|
---|
12 | BYTE SRB_Status; /* ASPI command status byte */
|
---|
13 | BYTE SRB_HaId; /* ASPI host adapter number */
|
---|
14 | BYTE SRB_Flags; /* ASPI request flags */
|
---|
15 | DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
|
---|
16 | BYTE HA_Count; /* Number of host adapters present */
|
---|
17 | BYTE HA_SCSI_ID; /* SCSI ID of host adapter */
|
---|
18 | BYTE HA_ManagerId[16]; /* String describing the manager */
|
---|
19 | BYTE HA_Identifier[16]; /* String describing the host adapter */
|
---|
20 | BYTE HA_Unique[16]; /* Host Adapter Unique parameters */
|
---|
21 | WORD HA_Rsvd1;
|
---|
22 | } SRB_HaInquiry WINE_PACKED;
|
---|
23 |
|
---|
24 | typedef struct tagSRB_ExecSCSICmd {
|
---|
25 | BYTE SRB_Cmd; /* ASPI command code = SC_EXEC_SCSI_CMD */
|
---|
26 | BYTE SRB_Status; /* ASPI command status byte */
|
---|
27 | BYTE SRB_HaId; /* ASPI host adapter number */
|
---|
28 | BYTE SRB_Flags; /* ASPI request flags */
|
---|
29 | DWORD SRB_Hdr_Rsvd; /* Reserved */
|
---|
30 | BYTE SRB_Target; /* Target's SCSI ID */
|
---|
31 | BYTE SRB_Lun; /* Target's LUN number */
|
---|
32 | WORD SRB_Rsvd1; /* Reserved for Alignment */
|
---|
33 | DWORD SRB_BufLen; /* Data Allocation Length */
|
---|
34 | BYTE *SRB_BufPointer; /* Data Buffer Point */
|
---|
35 | BYTE SRB_SenseLen; /* Sense Allocation Length */
|
---|
36 | BYTE SRB_CDBLen; /* CDB Length */
|
---|
37 | BYTE SRB_HaStat; /* Host Adapter Status */
|
---|
38 | BYTE SRB_TargStat; /* Target Status */
|
---|
39 | void (*SRB_PostProc)(); /* Post routine */
|
---|
40 | void *SRB_Rsvd2; /* Reserved */
|
---|
41 | BYTE SRB_Rsvd3[16]; /* Reserved for expansion */
|
---|
42 | BYTE CDBByte[16]; /* SCSI CDB */
|
---|
43 | BYTE SenseArea[0]; /* Request sense buffer - var length */
|
---|
44 | } SRB_ExecSCSICmd WINE_PACKED;
|
---|
45 |
|
---|
46 | typedef struct tagSRB_Abort {
|
---|
47 | BYTE SRB_Cmd; /* ASPI command code = SC_ABORT_SRB */
|
---|
48 | BYTE SRB_Status; /* ASPI command status byte */
|
---|
49 | BYTE SRB_HaId; /* ASPI host adapter number */
|
---|
50 | BYTE SRB_Flags; /* Reserved */
|
---|
51 | DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
|
---|
52 | LPSRB SRB_ToAbort; /* Pointer to SRB to abort */
|
---|
53 | } SRB_Abort WINE_PACKED;
|
---|
54 |
|
---|
55 | typedef struct tagSRB_BusDeviceReset {
|
---|
56 | BYTE SRB_Cmd; /* ASPI command code = SC_RESET_DEV */
|
---|
57 | BYTE SRB_Status; /* ASPI command status byte */
|
---|
58 | BYTE SRB_HaId; /* ASPI host adapter number */
|
---|
59 | BYTE SRB_Flags; /* Reserved */
|
---|
60 | DWORD SRB_Hdr_Rsvd; /* Reserved */
|
---|
61 | BYTE SRB_Target; /* Target's SCSI ID */
|
---|
62 | BYTE SRB_Lun; /* Target's LUN number */
|
---|
63 | BYTE SRB_Rsvd1[12]; /* Reserved for Alignment */
|
---|
64 | BYTE SRB_HaStat; /* Host Adapter Status */
|
---|
65 | BYTE SRB_TargStat; /* Target Status */
|
---|
66 | void (*SRB_PostProc)(); /* Post routine */
|
---|
67 | void *SRB_Rsvd2; /* Reserved */
|
---|
68 | BYTE SRB_Rsvd3[32]; /* Reserved */
|
---|
69 | } SRB_BusDeviceReset WINE_PACKED;
|
---|
70 |
|
---|
71 | typedef struct tagSRB_GDEVBlock {
|
---|
72 | BYTE SRB_Cmd; /* ASPI command code = SC_GET_DEV_TYPE */
|
---|
73 | BYTE SRB_Status; /* ASPI command status byte */
|
---|
74 | BYTE SRB_HaId; /* ASPI host adapter number */
|
---|
75 | BYTE SRB_Flags; /* Reserved */
|
---|
76 | DWORD SRB_Hdr_Rsvd; /* Reserved */
|
---|
77 | BYTE SRB_Target; /* Target's SCSI ID */
|
---|
78 | BYTE SRB_Lun; /* Target's LUN number */
|
---|
79 | BYTE SRB_DeviceType; /* Target's peripheral device type */
|
---|
80 | BYTE SRB_Rsvd1;
|
---|
81 | } SRB_GDEVBlock WINE_PACKED;
|
---|
82 |
|
---|
83 | typedef struct tagSRB_Common {
|
---|
84 | BYTE SRB_Cmd;
|
---|
85 | } SRB_Common;
|
---|
86 |
|
---|
87 | union SRB {
|
---|
88 | SRB_Common common;
|
---|
89 | SRB_HaInquiry inquiry;
|
---|
90 | SRB_ExecSCSICmd cmd;
|
---|
91 | SRB_Abort abort;
|
---|
92 | SRB_BusDeviceReset reset;
|
---|
93 | SRB_GDEVBlock devtype;
|
---|
94 | };
|
---|
95 |
|
---|
96 | typedef union SRB SRB;
|
---|
97 |
|
---|
98 | #include "poppack.h"
|
---|
99 |
|
---|
100 | #endif
|
---|