SetIScsiIKEInfoA function (iscsidsc.h)

The SetIscsiIKEInfo function establishes the IPsec policy and preshared key for the indicated initiator to use when performing iSCSI connections.

Syntax

ISDSC_STATUS ISDSC_API SetIScsiIKEInfoA(
  [in] PSTR                            InitiatorName,
  [in] ULONG                           InitiatorPortNumber,
  [in] PIKE_AUTHENTICATION_INFORMATION AuthInfo,
  [in] BOOLEAN                         Persist
);

Parameters

[in] InitiatorName

The name of the initiator HBA for which the IPsec policy is established.

[in] InitiatorPortNumber

The port on the initiator HBA with which to associate the key. If this parameter contains a value of ISCSI_ALL_INITIATOR_PORTS, all ports on the initiator are associated with the key.

[in] AuthInfo

A pointer to a IKE_AUTHENTICATION_INFORMATION structure that contains the authentication method. Currently, only the IKE_AUTHENTICATION_PRESHARED_KEY_METHOD is supported.

[in] Persist

If true, this parameter indicates that the preshared key information will be stored in non-volatile memory and will persist across restarts of the computer or the iSCSI initiator service.

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 SetIScsiIKEInfo as an alias which 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 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

See also

GetIscsiIKEInfo

IKE_AUTHENTICATION_INFORMATION