Add FUNCFLAGS and change TYPEFLAGS_* to an enum.
[wine] / include / wine / winaspi.h
1 /**************************************************************************
2  * WINE winaspi.h
3  * This file should be source compatible with the Adaptec winaspi.h
4  * All DOS ASPI structures are the same as WINASPI
5  */
6
7 #ifndef __WINASPI_H__
8 #define __WINASPI_H__
9
10 /* Include base aspi defs */
11 #include "wnaspi32.h"
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif /* #ifdef __cplusplus */
16
17 /* WINE SCSI Stuff */
18 #define ASPI_DOS        1
19 #define ASPI_WIN16      2
20
21 #include "pshpack1.h"
22
23 /* SRB HA_INQUIRY */
24
25 typedef struct tagSRB16_HaInquiry {
26   BYTE  SRB_Cmd;
27   BYTE  SRB_Status;
28   BYTE  SRB_HaId;
29   BYTE  SRB_Flags;
30   WORD  SRB_55AASignature;
31   WORD  SRB_ExtBufferSize;
32   BYTE  HA_Count;
33   BYTE  HA_SCSI_ID;
34   BYTE  HA_ManagerId[16];
35   BYTE  HA_Identifier[16];
36   BYTE  HA_Unique[16];
37   BYTE  HA_ExtBuffer[4];
38 } SRB_HaInquiry16, *PSRB_HaInquiry16, *LPSRB_HaInquiry16;
39
40 typedef struct tagSRB16_GDEVBlock {
41   BYTE        SRB_Cmd;            /* ASPI command code = SC_GET_DEV_TYPE */
42   BYTE        SRB_Status;         /* ASPI command status byte */
43   BYTE        SRB_HaId;           /* ASPI host adapter number */
44   BYTE        SRB_Flags;          /* ASPI request flags */
45   DWORD       SRB_Hdr_Rsvd;       /* Reserved, MUST = 0 */
46   BYTE        SRB_Target;         /* Target's SCSI ID */
47   BYTE        SRB_Lun;            /* Target's LUN number */
48   BYTE        SRB_DeviceType;     /* Target's peripheral device type */
49 } SRB_GDEVBlock16, *PSRB_GDEVBlock16, *LPSRB_GDEVBlock16;
50
51
52 typedef struct tagSRB16_ExecSCSICmd {
53   BYTE        SRB_Cmd;                /* ASPI command code            (W)  */
54   BYTE        SRB_Status;             /* ASPI command status byte     (R)  */
55   BYTE        SRB_HaId;               /* ASPI host adapter number     (W)  */
56   BYTE        SRB_Flags;              /* ASPI request flags           (W)  */
57   DWORD       SRB_Hdr_Rsvd;           /* Reserved, MUST = 0           (-)  */
58   BYTE        SRB_Target;             /* Target's SCSI ID             (W)  */
59   BYTE        SRB_Lun;                /* Target's LUN number          (W)  */
60   DWORD       SRB_BufLen;             /* Data Allocation LengthPG     (W/R)*/
61   BYTE        SRB_SenseLen;           /* Sense Allocation Length      (W)  */
62   SEGPTR      SRB_BufPointer;         /* Data Buffer Pointer          (W)  */
63   DWORD       SRB_Rsvd1;              /* Reserved, MUST = 0           (-/W)*/
64   BYTE        SRB_CDBLen;             /* CDB Length = 6               (W)  */
65   BYTE        SRB_HaStat;             /* Host Adapter Status          (R)  */
66   BYTE        SRB_TargStat;           /* Target Status                (R)  */
67   FARPROC16   SRB_PostProc;           /* Post routine                 (W)  */
68   BYTE        SRB_Rsvd2[34];          /* Reserved, MUST = 0                */
69   BYTE          CDBByte[1];           /* SCSI CBD - variable length   (W)  */
70   /* variable example for 6 byte cbd
71    * BYTE        CDBByte[6];             * SCSI CDB                    (W) *
72    * BYTE        SenseArea6[SENSE_LEN];  * Request Sense buffer         (R) *
73    */
74 } SRB_ExecSCSICmd16, *PSRB_ExecSCSICmd16, *LPSRB_ExecSCSICmd16;
75
76 typedef struct tagSRB16_Abort {
77   BYTE        SRB_Cmd;            /* ASPI command code = SC_ABORT_SRB */
78   BYTE        SRB_Status;         /* ASPI command status byte */
79   BYTE        SRB_HaId;           /* ASPI host adapter number */
80   BYTE        SRB_Flags;          /* ASPI request flags */
81   DWORD       SRB_Hdr_Rsvd;       /* Reserved, MUST = 0 */
82   SEGPTR      SRB_ToAbort;        /* Pointer to SRB to abort */
83 } SRB_Abort16, *PSRB_Abort16, *LPSRB_Abort16;
84
85
86 typedef struct tagSRB16_BusDeviceReset {
87   BYTE        SRB_Cmd;            /* ASPI command code = SC_RESET_DEV */
88   BYTE        SRB_Status;         /* ASPI command status byte */
89   BYTE        SRB_HaId;           /* ASPI host adapter number */
90   BYTE        SRB_Flags;          /* ASPI request flags */
91   DWORD       SRB_Hdr_Rsvd;       /* Reserved, MUST = 0 */
92   BYTE        SRB_Target;         /* Target's SCSI ID */
93   BYTE        SRB_Lun;            /* Target's LUN number */
94   BYTE        SRB_ResetRsvd1[14]; /* Reserved, MUST = 0 */
95   BYTE        SRB_HaStat;         /* Host Adapter Status */
96   BYTE        SRB_TargStat;       /* Target Status */
97   FARPROC16   SRB_PostProc;       /* Post routine */
98   BYTE        SRB_ResetRsvd2[34]; /* Reserved, MUST = 0 */
99 } SRB_BusDeviceReset16, *PSRB_BusDeviceReset16, *LPSRB_BusDeviceReset16;
100
101
102 typedef struct tagSRB16_Common {
103   BYTE        SRB_Cmd;            /* ASPI command code = SC_ABORT_SRB */
104   BYTE        SRB_Status;         /* ASPI command status byte */
105   BYTE        SRB_HaId;           /* ASPI host adapter number */
106   BYTE        SRB_Flags;          /* ASPI request flags */
107   DWORD       SRB_Hdr_Rsvd;       /* Reserved, MUST = 0 */
108 } SRB_Common16, *PSRB_Common16, *LPSRB_Common16;
109
110 typedef union tagSRB16 {
111     SRB_Common16          common;
112     SRB_HaInquiry16       inquiry;
113     SRB_ExecSCSICmd16     cmd;
114     SRB_Abort16           abort;
115     SRB_BusDeviceReset16  reset;
116     SRB_GDEVBlock16       devtype;
117 } SRB16, *LPSRB16;
118
119 #include "poppack.h"
120
121 extern WORD WINAPI SendASPICommand16(SEGPTR);
122 extern WORD WINAPI GetASPISupportInfo16(void);
123
124 #ifdef __cplusplus
125 }
126 #endif /* #ifdef __cplusplus */
127
128 #endif /* __WINE_WINASPI_H */