iscsidsc.h: Fixed many of the constants and data types.
git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/branches/releases/v2_branch@4340 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/include/ChangeLog b/mingw-w64-headers/include/ChangeLog
index d7d3ee4..0ab644b 100644
--- a/mingw-w64-headers/include/ChangeLog
+++ b/mingw-w64-headers/include/ChangeLog
@@ -1,3 +1,7 @@
+2011-08-08 Ozkan Sezer <sezeroz@gmail.com>
+
+ * iscsidsc.h: Fixed many of the constants and data types.
+
2011-08-07 Ozkan Sezer <sezeroz@gmail.com>
* wincrypt.h: Added MS_ENH_RSA_AES_PROV_XP[_A|_W]. (Thanks to Alon
diff --git a/mingw-w64-headers/include/iscsidsc.h b/mingw-w64-headers/include/iscsidsc.h
index c095ce0..134ead9 100644
--- a/mingw-w64-headers/include/iscsidsc.h
+++ b/mingw-w64-headers/include/iscsidsc.h
@@ -11,11 +11,6 @@
extern "C" {
#endif
- typedef PVOID ISCSI_UNIQUE_SESSION_ID;
- typedef PVOID ISCSI_UNIQUE_CONNECTION_ID;
- typedef ISCSI_UNIQUE_SESSION_ID *PISCSI_UNIQUE_SESSION_ID;
- typedef ISCSI_UNIQUE_CONNECTION_ID *PISCSI_UNIQUE_CONNECTION_ID;
-
typedef enum {
ISCSI_NO_AUTH_TYPE = 0,
ISCSI_CHAP_AUTH_TYPE = 1,
@@ -27,33 +22,40 @@
ISCSI_DIGEST_TYPE_CRC32C = 1
} ISCSI_DIGEST_TYPES;
-/* typedef struct _ISCSI_LOGIN_OPTIONS_INFO_SPECIFIED {
- WINBOOL ISCSI_LOGIN_OPTIONS_USERNAME:1;
- WINBOOL ISCSI_LOGIN_OPTIONS_PASSWORD:1;
- WINBOOL ISCSI_LOGIN_OPTIONS_HEADER_DIGEST:1;
- WINBOOL ISCSI_LOGIN_OPTIONS_DATA_DIGEST:1;
- WINBOOL ISCSI_LOGIN_OPTIONS_MAXIMUM_CONNECTIONS:1;
- WINBOOL ISCSI_LOGIN_OPTIONS_DEFAULT_TIME_2_WAIT:1;
- WINBOOL ISCSI_LOGIN_OPTIONS_DEFAULT_TIME_2_RETAIN:1;
- WINBOOL ISCSI_LOGIN_OPTIONS_AUTH_TYPE:1;
- } ISCSI_LOGIN_OPTIONS_INFO_SPECIFIED;
+ typedef ULONG ISCSI_LOGIN_OPTIONS_INFO_SPECIFIED,
+ *PISCSI_LOGIN_OPTIONS_INFO_SPECIFIED;
+#define ISCSI_LOGIN_OPTIONS_HEADER_DIGEST 0x00000001
+#define ISCSI_LOGIN_OPTIONS_DATA_DIGEST 0x00000002
+#define ISCSI_LOGIN_OPTIONS_MAXIMUM_CONNECTIONS 0x00000004
+#define ISCSI_LOGIN_OPTIONS_DEFAULT_TIME_2_WAIT 0x00000008
+#define ISCSI_LOGIN_OPTIONS_DEFAULT_TIME_2_RETAIN 0x00000010
+#define ISCSI_LOGIN_OPTIONS_USERNAME 0x00000020
+#define ISCSI_LOGIN_OPTIONS_PASSWORD 0x00000040
+#define ISCSI_LOGIN_OPTIONS_AUTH_TYPE 0x00000080
- typedef struct _ISCSI_LOGIN_FLAGS {
- WIBBOOL ISCSI_LOGIN_FLAG_RESERVED1:1;
- WIBBOOL ISCSI_LOGIN_FLAG_ALLOW_PORTAL_HOPPING:1;
- WIBBOOL ISCSI_LOGIN_FLAG_REQUIRE_IPSEC:1;
- WIBBOOL ISCSI_LOGIN_FLAG_MULTIPATH_ENABLED:1;
- } ISCSI_LOGIN_FLAGS;
+#define ISCSI_LOGIN_OPTIONS_VERSION 0x00000000
- typedef struct _ISCSI_SECURITY_FLAGS {
- WINBOOL ISCSI_SECURITY_FLAG_TUNNEL_MODE_PREFERRED:1;
- WINBOOL ISCSI_SECURITY_FLAG_TRANSPORT_MODE_PREFERRED:1;
- WINBOOL ISCSI_SECURITY_FLAG_PFS_ENABLED:1;
- WINBOOL ISCSI_SECURITY_FLAG_AGGRESSIVE_MODE_ENABLED:1;
- WINBOOL ISCSI_SECURITY_FLAG_MAIN_MODE_ENABLED:1;
- WINBOOL ISCSI_SECURITY_FLAG_IKE_IPSEC_ENABLED:1;
- WINBOOL ISCSI_SECURITY_FLAG_VALID:1;
- } ISCSI_SECURITY_FLAGS;*/
+ typedef ULONG ISCSI_LOGIN_FLAGS,
+ *PISCSI_LOGIN_FLAGS;
+
+#define ISCSI_LOGIN_FLAG_REQUIRE_IPSEC 0x00000001
+#define ISCSI_LOGIN_FLAG_MULTIPATH_ENABLED 0x00000002
+#define ISCSI_LOGIN_FLAG_RESERVED1 0x00000004
+#define ISCSI_LOGIN_FLAG_ALLOW_PORTAL_HOPPING 0x00000008
+#define ISCSI_LOGIN_FLAG_USE_RADIUS_RESPONSE 0x00000010
+#define ISCSI_LOGIN_FLAG_USE_RADIUS_VERIFICATION 0x00000020
+
+ typedef ULONGLONG ISCSI_SECURITY_FLAGS,
+ *PISCSI_SECURITY_FLAGS;
+
+#define ISCSI_SECURITY_FLAG_VALID 0x00000001
+#define ISCSI_SECURITY_FLAG_IKE_IPSEC_ENABLED 0x00000002
+#define ISCSI_SECURITY_FLAG_MAIN_MODE_ENABLED 0x00000004
+#define ISCSI_SECURITY_FLAG_AGGRESSIVE_MODE_ENABLED 0x00000008
+#define ISCSI_SECURITY_FLAG_PFS_ENABLED 0x00000010
+#define ISCSI_SECURITY_FLAG_TRANSPORT_MODE_PREFERRED 0x00000020
+#define ISCSI_SECURITY_FLAG_TUNNEL_MODE_PREFERRED 0x00000040
+
#define AddIScsiConnection __MINGW_NAME_AW(AddIScsiConnection)
#define AddIScsiSendTargetPortal __MINGW_NAME_AW(AddIScsiSendTargetPortal)
@@ -71,22 +73,10 @@
#define MAX_ISCSI_PORTAL_ADDRESS_LEN 256
#define MAX_ISCSI_HBANAME_LEN 256
-#define ISCSI_SECURITY_FLAG_TUNNEL_MODE_PREFERRED (0x1UL<<25)
-#define ISCSI_SECURITY_FLAG_TRANSPORT_MODE_PREFERRED (0x1UL<<26)
-#define ISCSI_SECURITY_FLAG_PFS_ENABLED (0x1UL<<27)
-#define ISCSI_SECURITY_FLAG_AGGRESSIVE_MODE_ENABLED (0x1UL<<28)
-#define ISCSI_SECURITY_FLAG_MAIN_MODE_ENABLED (0x1UL<<29)
-#define ISCSI_SECURITY_FLAG_IKE_IPSEC_ENABLED (0x1UL<<30)
-#define ISCSI_SECURITY_FLAG_VALID (0x1UL<<31)
-
-typedef DWORD ISCSI_LOGIN_OPTIONS_INFO_SPECIFIED;
-typedef DWORD ISCSI_LOGIN_FLAGS;
-typedef DWORD ISCSI_SECURITY_FLAGS;
-
typedef enum _TARGET_INFORMATION_CLASS {
ProtocolType,
TargetAlias,
- DiscoveryMechanism,
+ DiscoveryMechanisms,
PortalGroups,
PersistentTargetMappings,
InitiatorName,
@@ -96,7 +86,6 @@
typedef enum _TARGETPROTOCOLTYPE {
ISCSI_TCP_PROTOCOL_TYPE
-
} TARGETPROTOCOLTYPE;
typedef enum _IKE_AUTHENTICATION_METHOD {
@@ -146,6 +135,13 @@
ULONGLONG TargetLUN;
} SCSI_LUN_LIST, *PSCSI_LUN_LIST;
+typedef struct _ISCSI_UNIQUE_SESSION_ID {
+ ULONGLONG AdapterUnique;
+ ULONGLONG AdapterSpecific;
+}
+ISCSI_UNIQUE_SESSION_ID, *PISCSI_UNIQUE_SESSION_ID,
+ISCSI_UNIQUE_CONNECTION_ID, *PISCSI_UNIQUE_CONNECTION_ID;
+
typedef struct _ISCSI_TARGET_MAPPINGA {
CHAR InitiatorName[MAX_ISCSI_HBANAME_LEN];
CHAR TargetName[MAX_ISCSI_NAME_LEN];
@@ -208,8 +204,6 @@
};
} IKE_AUTHENTICATION_INFORMATION, *PIKE_AUTHENTICATION_INFORMATION;
-typedef LPVOID ISCSI_UNIQUE_CONNECTION_ID;
-
typedef struct _ISCSI_CONNECTION_INFOA {
ISCSI_UNIQUE_CONNECTION_ID ConnectionId;
CHAR InitiatorAddress;
@@ -307,7 +301,7 @@
__MINGW_TYPEDEF_AW(ISCSI_TARGET_PORTAL_INFO_EX)
__MINGW_TYPEDEF_AW(PISCSI_TARGET_PORTAL_INFO_EX)
-typedef DWORD ISCSI_TARGET_FLAGS; /*32bit, guessed*/
+typedef ULONG ISCSI_TARGET_FLAGS;
HRESULT WINAPI AddIScsiConnectionA(PISCSI_UNIQUE_SESSION_ID UniqueSessionId,PVOID Reserved,ULONG InitiatorPortNumber,PISCSI_TARGET_PORTALA TargetPortal,ISCSI_SECURITY_FLAGS SecurityFlags,PSCSI_LOGIN_OPTIONS LoginOptions,ULONG KeySize,PCHAR Key,PISCSI_UNIQUE_CONNECTION_ID ConnectionId);
HRESULT WINAPI AddIScsiConnectionW(PISCSI_UNIQUE_SESSION_ID UniqueSessionId,PVOID Reserved,ULONG InitiatorPortNumber,PISCSI_TARGET_PORTALW TargetPortal,ISCSI_SECURITY_FLAGS SecurityFlags,PSCSI_LOGIN_OPTIONS LoginOptions,ULONG KeySize,PCHAR Key,PISCSI_UNIQUE_CONNECTION_ID ConnectionId);