// iscsiop.h
typedef struct _AddConnectionToSession_IN {
ULONGLONG UniqueAdapterId;
ULONGLONG UniqueSessionId;
ULONGLONG SecurityFlags;
ULONG PortNumber;
ISCSI_LoginOptions LoginOptions;
ISCSI_TargetPortal TargetPortal;
ULONG UsernameSize;
ULONG PasswordSize;
ULONG KeySize;
UCHAR Key[1];
} AddConnectionToSession_IN, *PAddConnectionToSession_IN;
View the official Windows Driver Kit DDI referenceNo description available.
The AddConnectionToSession_IN structure holds input data for the AddConnectionToSession method, which is used to add a new connection to an already existing session.
UniqueAdapterIdA 64-bit integer that uniquely identifies an adapter and a particular loaded instance of a storage miniport driver that manages the adapter. This identifier is unique, not only on the computer where the adapter is located, but also across the entire network.
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.
SecurityFlagsA bitwise OR of flags that indicate the security requirements of a target. For a list of possible values for this member, see SECURITY_FLAG_QUALIFIERS.
PortNumberThe number of the port from which to initiate the target logon session.
LoginOptionsA ISCSI_LoginOptions structure that describes the characteristics of the target logon session that a connection will be added to.
TargetPortalA ISCSI_TargetPortal structure that indicates which target portal to use to make the additional connection. The AddConnectionToSession method calls the LoginToTarget method to establish the new connection. If LoginToTarget fails with a status value of either ISCSC_TARGET_MOVED_PERMANENTLY or ISCSC_TARGET_MOVED_TEMPORARILY. TargetPortal will indicate, on output from AddConnectionToSession, the portal that the logon operation should be redirected to. For more information about the ISCSC_TARGET_MOVED_PERMANENTLY and ISCSC_TARGET_MOVED_TEMPORARILY status values, see ISCSI_STATUS_QUALIFIERS.
UsernameSizeThe username size, in bytes.
PasswordSizeThe password size, in bytes.
KeySizeThe preshared key size, in bytes.
KeyA variable-length array of characters that specifies the preshared key that is associated with the target IP address. The number of elements in the array is specified by the KeySize field.
The iSCSI service requires this method. It is optional that you implement this method.