// iscsidef.h
typedef struct _ISCSI_TargetMapping {
ULONG OSBus;
ULONG OSTarget;
ULONGLONG UniqueSessionId;
ULONG LUNCount;
WCHAR TargetName[223 + 1];
BOOLEAN FromPersistentLogin;
ULONGLONG Reserved;
ISCSI_LUNList LUNList[1];
} ISCSI_TargetMapping, *PISCSI_TargetMapping;
View the official Windows Driver Kit DDI referenceNo description available.
The ISCSI_TargetMapping structure maps a collection of logical unit numbers (LUNs) that are locally defined to a group of 64-bit iSCSI logical unit numbers.
OSBusThe SCSI bus number (which is valid in the local operating system) that the remote target is mapped to. A value of 0xffffffff indicates that the miniport driver can associate any SCSI bus number with the target.
OSTargetThe SCSI target number (which is valid in the local operating system) that the remote target is mapped to. A value of 0xffffffff indicates that the miniport driver can pick any number to identify the remote target device.
UniqueSessionIdA 64-bit integer that uniquely identifies the session. The LoginToTarget and AddConnectionToSession methods both return this value in their UniqueSessionId parameter. Do not confuse this value with the values in the ISID and TSID members.
LUNCountThe number of LUNs that are associated with the remote target device.
TargetNameA wide character string that indicates the target name.
FromPersistentLoginA Boolean value that indicates whether the logon session is persistent. If this member is TRUE, the logon session is persistent and the system creates it automatically when the computer boots up. If this member is FALSE, the logon session is not persistent.
ReservedReserved for Microsoft use only.
LUNListA ISCSI_LUNList structure that holds a list of LUNs that are associated with the target device.
A 64-bit iSCSI LUN by itself does not uniquely identify the logical unit that it represents. However, the combination of an iSCSI LUN and the name of the target that the logical unit belongs to does provide a unique identification for that logical unit that is valid anywhere in the network.
Management applications can use the ISCSI_TargetMapping structure to specify a local LUN number that can be assigned to the target LUN that the operating system finds during device enumerations.