AddIScsiSendTargetPortalA function (iscsidsc.h)
The AddIscsiSendTargetPortal function adds a static target portal to the list of target portals to which the iSCSI initiator service transmits SendTargets requests.
Syntax
ISDSC_STATUS ISDSC_API AddIScsiSendTargetPortalA(
[in, optional] PSTR InitiatorInstance,
[in, optional] ULONG InitiatorPortNumber,
[in, optional] PISCSI_LOGIN_OPTIONS LoginOptions,
[in, optional] ISCSI_SECURITY_FLAGS SecurityFlags,
PISCSI_TARGET_PORTALA Portal
);
Parameters
[in, optional] InitiatorInstance
The initiator that the iSCSI initiator service utilizes to transmit SendTargets requests to the specified target portal. If null, the iSCSI initiator service will use any initiator that can reach the target portal.
[in, optional] InitiatorPortNumber
The port number to use for the SendTargets request. This port number corresponds to the source IP address on the Host-Bus Adapter (HBA). A value of ISCSI_ALL_INITIATOR_PORTS indicates that the initiator must select the appropriate port based upon current routing information.
[in, optional] LoginOptions
A pointer to a structure of type ISCSI_LOGIN_OPTIONS that contains the login options to use with the target portal.
[in, optional] SecurityFlags
A bitmap that specifies the characteristics of the IPsec connection that the initiator adds to the session. If IPsec security policy between the initiator and the target portal is already configured as a result of the portal group policy or a previous connection to the portal, the existing configuration takes precedence over the configuration specified in SecurityFlags and the security bitmap is ignored.
If the ISCSI_SECURITY_FLAG_VALID flag is set to 0, the iSCSI initiator service uses default values for the security flags that are defined in the registry.
Caller can set any of the following flags in the bitmap:
Portal
A pointer to a structure of type ISCSI_TARGET_PORTAL that indicates the portal to which SendTargets will be sent for target discovery.
Return value
Returns ERROR_SUCCESS if the operation succeeds. Otherwise, it returns the appropriate Win32 or iSCSI error code.
Remarks
Note
The iscsidsc.h header defines AddIScsiSendTargetPortal as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | iscsidsc.h |
Library | Iscsidsc.lib |
DLL | Iscsidsc.dll |