NetworkPkg/IScsiDxe/IScsiConfig.c File Reference


Functions

VOID IScsiIpToStr (IN EFI_IP_ADDRESS *Ip, IN BOOLEAN Ipv6Flag, OUT CHAR16 *Str)
BOOLEAN IpIsUnicast (IN EFI_IP_ADDRESS *Ip, IN UINT8 IpMode)
EFI_STATUS IScsiParseIsIdFromString (IN CONST CHAR16 *String, IN OUT UINT8 *IsId)
EFI_STATUS IScsiConvertIsIdToString (OUT CHAR16 *String, IN UINT8 *IsId)
ISCSI_ATTEMPT_CONFIG_NVDATAIScsiConfigGetAttemptByConfigIndex (IN UINT8 AttemptConfigIndex)
ISCSI_ATTEMPT_CONFIG_NVDATAIScsiConfigGetAttemptByNic (IN ISCSI_ATTEMPT_CONFIG_NVDATA *NewAttempt, IN UINT8 IScsiMode)
VOID IScsiConvertAttemptConfigDataToIfrNvData (IN ISCSI_ATTEMPT_CONFIG_NVDATA *Attempt, IN OUT ISCSI_CONFIG_IFR_NVDATA *IfrNvData)
EFI_STATUS IScsiConvertIfrNvDataToAttemptConfigData (IN ISCSI_CONFIG_IFR_NVDATA *IfrNvData, IN OUT ISCSI_ATTEMPT_CONFIG_NVDATA *Attempt)
EFI_STATUS IScsiCreateOpCode (IN UINT16 StartLabelNumber, OUT VOID **StartOpCodeHandle, OUT EFI_IFR_GUID_LABEL **StartLabel, OUT VOID **EndOpCodeHandle, OUT EFI_IFR_GUID_LABEL **EndLabel)
EFI_STATUS IScsiConfigAddAttempt (VOID)
VOID IScsiConfigUpdateAttempt (VOID)
EFI_STATUS IScsiConfigDeleteAttempts (IN ISCSI_CONFIG_IFR_NVDATA *IfrNvData)
EFI_STATUS IScsiConfigDisplayDeleteAttempts (IN ISCSI_CONFIG_IFR_NVDATA *IfrNvData)
EFI_STATUS IScsiConfigDisplayOrderAttempts (VOID)
EFI_STATUS IScsiConfigOrderAttempts (IN ISCSI_CONFIG_IFR_NVDATA *IfrNvData)
EFI_STATUS IScsiConfigProcessDefault (IN EFI_QUESTION_ID KeyValue, IN ISCSI_CONFIG_IFR_NVDATA *IfrNvData)
EFI_STATUS EFIAPI IScsiFormExtractConfig (IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results)
EFI_STATUS EFIAPI IScsiFormRouteConfig (IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress)
EFI_STATUS EFIAPI IScsiFormCallback (IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID QuestionId, IN UINT8 Type, IN OUT EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest)
EFI_STATUS IScsiConfigFormInit (IN EFI_HANDLE DriverBindingHandle)
EFI_STATUS IScsiConfigFormUnload (IN EFI_HANDLE DriverBindingHandle)

Variables

CHAR16 mVendorStorageName [] = L"ISCSI_CONFIG_IFR_NVDATA"
BOOLEAN mIScsiDeviceListUpdated = FALSE
UINTN mNumberOfIScsiDevices = 0
ISCSI_FORM_CALLBACK_INFOmCallbackInfo = NULL
HII_VENDOR_DEVICE_PATH mIScsiHiiVendorDevicePath

Detailed Description

Helper functions for configuring or getting the parameters relating to iSCSI.

Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.


Function Documentation

BOOLEAN IpIsUnicast ( IN EFI_IP_ADDRESS *  Ip,
IN UINT8  IpMode 
)

Check whether the input IP address is valid.

Parameters:
[in] Ip The IP address.
[in] IpMode Indicates iSCSI running on IP4 or IP6 stack.
Return values:
TRUE The input IP address is valid.
FALSE Otherwise

References IP_MODE_IP4, and IP_MODE_IP6.

Referenced by IScsiConvertIfrNvDataToAttemptConfigData(), and IScsiFormCallback().

EFI_STATUS IScsiConfigAddAttempt ( VOID   ) 

EFI_STATUS IScsiConfigDeleteAttempts ( IN ISCSI_CONFIG_IFR_NVDATA IfrNvData  ) 

Callback function when user presses "Commit Changes and Exit" in Delete Attempts.

Parameters:
[in] IfrNvData The IFR NV data.
Return values:
EFI_NOT_FOUND Cannot find the corresponding variable.
EFI_SUCCESS The operation is completed successfully.
EFI_ABOTRED This operation is aborted cause of error configuration.
EFI_OUT_OF_RESOURCES Fail to finish the operation due to lack of resources.

References _ISCSI_ATTEMPT_CONFIG_NVDATA::AttemptConfigIndex, ISCSI_PRIVATE_DATA::AttemptConfigs, ISCSI_PRIVATE_DATA::AttemptCount, _ISCSI_SESSION_CONFIG_NVDATA::Enabled, ISCSI_PRIVATE_DATA::EnableMpio, gIScsiConfigGuid, ISCSI_ENABLED, ISCSI_ENABLED_FOR_MPIO, ISCSI_MAX_MAC_STRING_LEN, IScsiGetVariableAndSize(), _ISCSI_ATTEMPT_CONFIG_NVDATA::Link, _ISCSI_ATTEMPT_CONFIG_NVDATA::MacString, ISCSI_PRIVATE_DATA::MpioCount, mPrivate, ISCSI_PRIVATE_DATA::PortString, _ISCSI_ATTEMPT_CONFIG_NVDATA::SessionConfigData, and ISCSI_PRIVATE_DATA::SinglePathCount.

Referenced by IScsiFormCallback().

EFI_STATUS IScsiConfigDisplayDeleteAttempts ( IN ISCSI_CONFIG_IFR_NVDATA IfrNvData  ) 

Callback function when user presses "Delete Attempts".

Parameters:
[in] IfrNvData The IFR nv data.
Return values:
EFI_INVALID_PARAMETER Any parameter is invalid.
EFI_BUFFER_TOO_SMALL The buffer in UpdateData is too small.
EFI_SUCCESS The operation is completed successfully.

References ATTEMPT_DEL_QUESTION_ID, ATTEMPT_DEL_VAR_OFFSET, ISCSI_PRIVATE_DATA::AttemptConfigs, _ISCSI_ATTEMPT_CONFIG_NVDATA::AttemptTitleHelpToken, _ISCSI_ATTEMPT_CONFIG_NVDATA::AttemptTitleToken, CONFIGURATION_VARSTORE_ID, DELETE_ENTRY_LABEL, FORMID_DELETE_FORM, gIScsiConfigGuid, ISCSI_MAX_ATTEMPTS_NUM, IScsiCreateOpCode(), IScsiGetVariableAndSize(), mPrivate, and _ISCSI_FORM_CALLBACK_INFO::RegisteredHandle.

Referenced by IScsiFormCallback().

EFI_STATUS IScsiConfigDisplayOrderAttempts ( VOID   ) 

Callback function when user presses "Change Attempt Order".

Return values:
EFI_INVALID_PARAMETER Any parameter is invalid.
EFI_OUT_OF_RESOURCES Does not have sufficient resources to finish this operation.
EFI_SUCCESS The operation is completed successfully.

References _ISCSI_ATTEMPT_CONFIG_NVDATA::AttemptConfigIndex, ISCSI_PRIVATE_DATA::AttemptConfigs, ISCSI_PRIVATE_DATA::AttemptCount, _ISCSI_ATTEMPT_CONFIG_NVDATA::AttemptTitleToken, CONFIGURATION_VARSTORE_ID, DYNAMIC_ORDERED_LIST_QUESTION_ID, DYNAMIC_ORDERED_LIST_VAR_OFFSET, FORMID_ORDER_FORM, gIScsiConfigGuid, ISCSI_MAX_ATTEMPTS_NUM, IScsiCreateOpCode(), mPrivate, ORDER_ENTRY_LABEL, and _ISCSI_FORM_CALLBACK_INFO::RegisteredHandle.

Referenced by IScsiFormCallback().

EFI_STATUS IScsiConfigFormInit ( IN EFI_HANDLE  DriverBindingHandle  ) 

Initialize the iSCSI configuration form.

Parameters:
[in] DriverBindingHandle The iSCSI driverbinding handle.
Return values:
EFI_SUCCESS The iSCSI configuration form is initialized.
EFI_OUT_OF_RESOURCES Failed to allocate memory.

References _ISCSI_FORM_CALLBACK_INFO::ConfigAccess, _ISCSI_FORM_CALLBACK_INFO::Current, _ISCSI_FORM_CALLBACK_INFO::DriverHandle, gIScsiConfigGuid, ISCSI_FORM_CALLBACK_INFO_SIGNATURE, IScsiConfigVfrBin, IScsiDxeStrings, IScsiFormCallback(), IScsiFormExtractConfig(), IScsiFormRouteConfig(), _ISCSI_FORM_CALLBACK_INFO::RegisteredHandle, and _ISCSI_FORM_CALLBACK_INFO::Signature.

Referenced by IScsiDriverEntryPoint().

EFI_STATUS IScsiConfigFormUnload ( IN EFI_HANDLE  DriverBindingHandle  ) 

Unload the iSCSI configuration form, this includes: delete all the iSCSI configuration entries, uninstall the form callback protocol, and free the resources used.

Parameters:
[in] DriverBindingHandle The iSCSI driverbinding handle.
Return values:
EFI_SUCCESS The iSCSI configuration form is unloaded.
Others Failed to unload the form.

References ISCSI_PRIVATE_DATA::AttemptConfigs, ISCSI_PRIVATE_DATA::AttemptCount, _ISCSI_FORM_CALLBACK_INFO::ConfigAccess, _ISCSI_FORM_CALLBACK_INFO::DriverHandle, mPrivate, ISCSI_PRIVATE_DATA::NewAttempt, ISCSI_PRIVATE_DATA::NicCount, ISCSI_PRIVATE_DATA::NicInfoList, and _ISCSI_FORM_CALLBACK_INFO::RegisteredHandle.

Referenced by IScsiDriverEntryPoint(), and IScsiUnload().

ISCSI_ATTEMPT_CONFIG_NVDATA* IScsiConfigGetAttemptByConfigIndex ( IN UINT8  AttemptConfigIndex  ) 

Get the attempt config data from global structure by the ConfigIndex.

Parameters:
[in] AttemptConfigIndex The unique index indicates the attempt.
Returns:
Pointer to the attempt config data.
Return values:
NULL The attempt configuration data cannot be found.

References _ISCSI_ATTEMPT_CONFIG_NVDATA::AttemptConfigIndex, ISCSI_PRIVATE_DATA::AttemptConfigs, and mPrivate.

Referenced by IScsiConfigOrderAttempts(), IScsiConfigProcessDefault(), IScsiConvertIfrNvDataToAttemptConfigData(), IScsiFillNICAndTargetSections(), and IScsiGetConfigData().

ISCSI_ATTEMPT_CONFIG_NVDATA* IScsiConfigGetAttemptByNic ( IN ISCSI_ATTEMPT_CONFIG_NVDATA NewAttempt,
IN UINT8  IScsiMode 
)

Get the existing attempt config data from global structure by the NicIndex.

Parameters:
[in] NewAttempt The created new attempt
[in] IScsiMode The IScsi Mode of the new attempt, Enabled or Enabled for MPIO.
Returns:
Pointer to the existing attempt config data which has the same NICIndex as the new created attempt.
Return values:
NULL The attempt with NicIndex does not exist.

References ISCSI_PRIVATE_DATA::AttemptConfigs, _ISCSI_SESSION_CONFIG_NVDATA::Enabled, mPrivate, _ISCSI_ATTEMPT_CONFIG_NVDATA::NicIndex, and _ISCSI_ATTEMPT_CONFIG_NVDATA::SessionConfigData.

Referenced by IScsiConvertIfrNvDataToAttemptConfigData().

EFI_STATUS IScsiConfigOrderAttempts ( IN ISCSI_CONFIG_IFR_NVDATA IfrNvData  ) 

Callback function when user presses "Commit Changes and Exit" in Change Attempt Order.

Parameters:
[in] IfrNvData The IFR nv data.
Return values:
EFI_OUT_OF_RESOURCES Does not have sufficient resources to finish this operation.
EFI_NOT_FOUND Cannot find the corresponding variable.
EFI_SUCCESS The operation is completed successfully.

References ISCSI_PRIVATE_DATA::AttemptConfigs, gIScsiConfigGuid, ISCSI_MAX_ATTEMPTS_NUM, IScsiConfigGetAttemptByConfigIndex(), IScsiGetVariableAndSize(), _ISCSI_ATTEMPT_CONFIG_NVDATA::Link, and mPrivate.

Referenced by IScsiFormCallback().

EFI_STATUS IScsiConfigProcessDefault ( IN EFI_QUESTION_ID  KeyValue,
IN ISCSI_CONFIG_IFR_NVDATA IfrNvData 
)

Callback function when a user presses "Attempt *" or when a user selects a NIC to create the new attempt.

Parameters:
[in] KeyValue A unique value which is sent to the original exporting driver so that it can identify the type of data to expect.
[in] IfrNvData The IFR nv data.
Return values:
EFI_OUT_OF_RESOURCES Does not have sufficient resources to finish this operation.
EFI_NOT_FOUND Cannot find the corresponding variable.
EFI_SUCCESS The operation is completed successfully.

References _ISCSI_ATTEMPT_CONFIG_NVDATA::AttemptConfigIndex, _ISCSI_ATTEMPT_CONFIG_NVDATA::AttemptName, _ISCSI_ATTEMPT_CONFIG_NVDATA::AttemptTitleHelpToken, _ISCSI_ATTEMPT_CONFIG_NVDATA::AuthConfigData, _ISCSI_ATTEMPT_CONFIG_NVDATA::AuthenticationType, ISCSI_NIC_INFO::BusNumber, _ISCSI_ATTEMPT_CONFIG_NVDATA::CHAP, _ISCSI_CHAP_AUTH_CONFIG_NVDATA::CHAPType, CONNECT_DEFAULT_TIMEOUT, CONNECT_MIN_RETRY, _ISCSI_SESSION_CONFIG_NVDATA::ConnectRetryCount, _ISCSI_SESSION_CONFIG_NVDATA::ConnectTimeout, _ISCSI_FORM_CALLBACK_INFO::Current, ISCSI_NIC_INFO::DeviceNumber, ISCSI_NIC_INFO::FunctionNumber, gIScsiConfigGuid, ISCSI_NIC_INFO::HwAddressSize, ISCSI_AUTH_TYPE_CHAP, ISCSI_CHAP_UNI, ISCSI_MAX_ATTEMPTS_NUM, ISCSI_MAX_MAC_STRING_LEN, ISCSI_NAME_IFR_MAX_SIZE, ISCSI_WELL_KNOWN_PORT, IScsiConfigGetAttemptByConfigIndex(), IScsiConvertAttemptConfigDataToIfrNvData(), IScsiGetNicInfoByIndex(), IScsiGetVariableAndSize(), IScsiMacAddrToStr(), _ISCSI_SESSION_CONFIG_NVDATA::IsId, KEY_ATTEMPT_ENTRY_BASE, KEY_MAC_ENTRY_BASE, _ISCSI_ATTEMPT_CONFIG_NVDATA::MacString, ISCSI_PRIVATE_DATA::MaxNic, mPrivate, ISCSI_PRIVATE_DATA::NewAttempt, _ISCSI_ATTEMPT_CONFIG_NVDATA::NicIndex, ISCSI_NIC_INFO::PermanentAddress, ISCSI_PRIVATE_DATA::PortString, _ISCSI_FORM_CALLBACK_INFO::RegisteredHandle, _ISCSI_ATTEMPT_CONFIG_NVDATA::SessionConfigData, _ISCSI_SESSION_CONFIG_NVDATA::TargetPort, and ISCSI_NIC_INFO::VlanId.

Referenced by IScsiFormCallback().

VOID IScsiConfigUpdateAttempt ( VOID   ) 

VOID IScsiConvertAttemptConfigDataToIfrNvData ( IN ISCSI_ATTEMPT_CONFIG_NVDATA Attempt,
IN OUT ISCSI_CONFIG_IFR_NVDATA IfrNvData 
)

EFI_STATUS IScsiConvertIfrNvDataToAttemptConfigData ( IN ISCSI_CONFIG_IFR_NVDATA IfrNvData,
IN OUT ISCSI_ATTEMPT_CONFIG_NVDATA Attempt 
)

EFI_STATUS IScsiConvertIsIdToString ( OUT CHAR16 *  String,
IN UINT8 *  IsId 
)

Convert IsId from binary to string format.

Parameters:
[out] String The buffer to store the converted string.
[in] IsId The buffer to store IsId.
Return values:
EFI_SUCCESS The string converted successfully.
EFI_INVALID_PARAMETER Any input parameter is invalid.

References ISID_CONFIGURABLE_STORAGE.

Referenced by IScsiConvertAttemptConfigDataToIfrNvData(), and IScsiFormCallback().

EFI_STATUS IScsiCreateOpCode ( IN UINT16  StartLabelNumber,
OUT VOID **  StartOpCodeHandle,
OUT EFI_IFR_GUID_LABEL **  StartLabel,
OUT VOID **  EndOpCodeHandle,
OUT EFI_IFR_GUID_LABEL **  EndLabel 
)

Create Hii Extend Label OpCode as the start opcode and end opcode. It is a help function.

Parameters:
[in] StartLabelNumber The number of start label.
[out] StartOpCodeHandle Points to the start opcode handle.
[out] StartLabel Points to the created start opcode.
[out] EndOpCodeHandle Points to the end opcode handle.
[out] EndLabel Points to the created end opcode.
Return values:
EFI_OUT_OF_RESOURCES Do not have sufficient resource to finish this operation.
EFI_INVALID_PARAMETER Any input parameter is invalid.
EFI_SUCCESS The operation is completed successfully.

References LABEL_END.

Referenced by IScsiConfigAddAttempt(), IScsiConfigDisplayDeleteAttempts(), IScsiConfigDisplayOrderAttempts(), and IScsiConfigUpdateAttempt().

EFI_STATUS EFIAPI IScsiFormCallback ( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *  This,
IN EFI_BROWSER_ACTION  Action,
IN EFI_QUESTION_ID  QuestionId,
IN UINT8  Type,
IN OUT EFI_IFR_TYPE_VALUE *  Value,
OUT EFI_BROWSER_ACTION_REQUEST *  ActionRequest 
)

This function is called to provide results data to the driver. This data consists of a unique key that is used to identify which data is either being passed back or being asked for.

Parameters:
[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
[in] Action Specifies the type of action taken by the browser.
[in] QuestionId A unique value which is sent to the original exporting driver so that it can identify the type of data to expect. The format of the data tends to vary based on the opcode that generated the callback.
[in] Type The type of value for the question.
[in,out] Value A pointer to the data being sent to the original exporting driver.
[out] ActionRequest On return, points to the action requested by the callback function.
Return values:
EFI_SUCCESS The callback successfully handled the action.
EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
EFI_DEVICE_ERROR The variable could not be saved.
EFI_UNSUPPORTED The specified Action is not supported by the callback.

References ATTEMPT_NAME_SIZE, _ISCSI_ATTEMPT_CONFIG_NVDATA::AttemptName, _ISCSI_ATTEMPT_CONFIG_NVDATA::AuthConfigData, _ISCSI_ATTEMPT_CONFIG_NVDATA::AutoConfigureMode, _ISCSI_SESSION_CONFIG_NVDATA::BootLun, _ISCSI_ATTEMPT_CONFIG_NVDATA::CHAP, _ISCSI_CHAP_AUTH_CONFIG_NVDATA::CHAPName, _ISCSI_CHAP_AUTH_CONFIG_NVDATA::CHAPSecret, _ISCSI_FORM_CALLBACK_INFO::Current, _ISCSI_CONFIG_IFR_NVDATA::DeleteAttemptList, _ISCSI_CONFIG_IFR_NVDATA::DynamicOrderedList, _ISCSI_SESSION_CONFIG_NVDATA::Gateway, gIScsiInitiatorName, ISCSI_PRIVATE_DATA::InitiatorName, ISCSI_PRIVATE_DATA::InitiatorNameLength, IP_MODE_IP4, IP_MODE_IP6, IP_STR_MAX_SIZE, IpIsUnicast(), ISCSI_AUTH_TYPE_CHAP, ISCSI_CHAP_UNI, ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK, ISCSI_LUN_STR_MAX_LEN, ISCSI_NAME_MAX_SIZE, IScsiAsciiStrToIp(), IScsiAsciiStrToLun(), IScsiConfigAddAttempt(), IScsiConfigDeleteAttempts(), IScsiConfigDisplayDeleteAttempts(), IScsiConfigDisplayOrderAttempts(), IScsiConfigOrderAttempts(), IScsiConfigProcessDefault(), IScsiConfigUpdateAttempt(), IScsiConvertIfrNvDataToAttemptConfigData(), IScsiConvertIsIdToString(), IScsiGetSubnetMaskPrefixLength(), IScsiIpToStr(), IScsiNormalizeName(), IScsiParseIsIdFromString(), _ISCSI_SESSION_CONFIG_NVDATA::IsId, KEY_ADD_ATTEMPT, KEY_ATTEMPT_NAME, KEY_AUTH_TYPE, KEY_BOOT_LUN, KEY_CHAP_NAME, KEY_CHAP_SECRET, KEY_CONFIG_ISID, KEY_DELETE_ATTEMPT, KEY_DHCP_ENABLE, KEY_GATE_WAY, KEY_IGNORE_DELETE_ATTEMPT, KEY_IGNORE_ORDER_CHANGES, KEY_INITIATOR_NAME, KEY_IP_MODE, KEY_LOCAL_IP, KEY_ORDER_ATTEMPT_CONFIG, KEY_REVERSE_CHAP_NAME, KEY_REVERSE_CHAP_SECRET, KEY_SAVE_ATTEMPT_CONFIG, KEY_SAVE_DELETE_ATTEMPT, KEY_SAVE_ORDER_CHANGES, KEY_SUBNET_MASK, KEY_TARGET_IP, KEY_TARGET_NAME, _ISCSI_SESSION_CONFIG_NVDATA::LocalIp, mPrivate, _ISCSI_CHAP_AUTH_CONFIG_NVDATA::ReverseCHAPName, _ISCSI_CHAP_AUTH_CONFIG_NVDATA::ReverseCHAPSecret, _ISCSI_ATTEMPT_CONFIG_NVDATA::SessionConfigData, _ISCSI_SESSION_CONFIG_NVDATA::SubnetMask, _ISCSI_SESSION_CONFIG_NVDATA::TargetIp, and _ISCSI_SESSION_CONFIG_NVDATA::TargetName.

Referenced by IScsiConfigFormInit().

EFI_STATUS EFIAPI IScsiFormExtractConfig ( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *  This,
IN CONST EFI_STRING  Request,
OUT EFI_STRING *  Progress,
OUT EFI_STRING *  Results 
)

This function allows the caller to request the current configuration for one or more named elements. The resulting string is in <ConfigAltResp> format. Also, any and all alternative configuration strings shall be appended to the end of the current configuration string. If they are, they must appear after the current configuration. They must contain the same routing (GUID, NAME, PATH) as the current configuration string. They must have an additional description indicating the type of alternative configuration the string represents, "ALTCFG=<StringToken>". That <StringToken> (when converted from Hex UNICODE to binary) is a reference to a string in the associated string pack.

Parameters:
[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
[in] Request A null-terminated Unicode string in <ConfigRequest> format. Note that this includes the routing information as well as the configurable name / value pairs. It is invalid for this string to be in <MultiConfigRequest> format.
[out] Progress On return, points to a character in the Request string. Points to the string's null terminator if request was successful. Points to the most recent "&" before the first failing name / value pair (or the beginning of the string if the failure is in the first name / value pair) if the request was not successful.
[out] Results A null-terminated Unicode string in <ConfigAltResp> format which has all values filled in for the names in the Request string. String to be allocated by the called function.
Return values:
EFI_SUCCESS The Results string is filled with the values corresponding to all requested names.
EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the results that must be stored awaiting possible future protocols.
EFI_INVALID_PARAMETER For example, passing in a NULL for the Request parameter would result in this type of error. In this case, the Progress parameter would be set to NULL.
EFI_NOT_FOUND Routing data doesn't match any known driver. Progress set to the first character in the routing header. Note: There is no requirement that the driver validate the routing data. It must skip the <ConfigHdr> in order to process the names.
EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent "&" before the error or the beginning of the string.
EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the name in question.

References _ISCSI_FORM_CALLBACK_INFO::Current, _ISCSI_FORM_CALLBACK_INFO::DriverHandle, gIScsiConfigGuid, gIScsiInitiatorName, _ISCSI_CONFIG_IFR_NVDATA::InitiatorName, ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK, ISCSI_NAME_MAX_SIZE, IScsiConvertAttemptConfigDataToIfrNvData(), and mVendorStorageName.

Referenced by IScsiConfigFormInit().

EFI_STATUS EFIAPI IScsiFormRouteConfig ( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *  This,
IN CONST EFI_STRING  Configuration,
OUT EFI_STRING *  Progress 
)

This function applies changes in a driver's configuration. Input is a Configuration, which has the routing data for this driver followed by name / value configuration pairs. The driver must apply those pairs to its configurable storage. If the driver's configuration is stored in a linear block of data and the driver's name / value pairs are in <BlockConfig> format, it may use the ConfigToBlock helper function (above) to simplify the job.

Parameters:
[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
[in] Configuration A null-terminated Unicode string in <ConfigString> format.
[out] Progress A pointer to a string filled in with the offset of the most recent '&' before the first failing name / value pair (or the beginning of the string if the failure is in the first name / value pair) or the terminating NULL if all was successful.
Return values:
EFI_SUCCESS The results have been distributed or are awaiting distribution.
EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the results that must be stored awaiting possible future protocols.
EFI_INVALID_PARAMETERS Passing in a NULL for the Results parameter would result in this type of error.
EFI_NOT_FOUND Target for the specified routing data was not found.

References gIScsiConfigGuid, and mVendorStorageName.

Referenced by IScsiConfigFormInit().

VOID IScsiIpToStr ( IN EFI_IP_ADDRESS *  Ip,
IN BOOLEAN  Ipv6Flag,
OUT CHAR16 *  Str 
)

Convert the IP address into a dotted string.

Parameters:
[in] Ip The IP address.
[in] Ipv6Flag Indicates whether the IP address is version 4 or version 6.
[out] Str The formatted IP string.

References IP4_STR_MAX_SIZE, and IP_STR_MAX_SIZE.

Referenced by IScsiConvertAttemptConfigDataToIfrNvData(), and IScsiFormCallback().

EFI_STATUS IScsiParseIsIdFromString ( IN CONST CHAR16 *  String,
IN OUT UINT8 *  IsId 
)

Parse IsId in string format and convert it to binary.

Parameters:
[in] String The buffer of the string to be parsed.
[in,out] IsId The buffer to store IsId.
Return values:
EFI_SUCCESS The operation finished successfully.
EFI_INVALID_PARAMETER Any input parameter is invalid.

References ISCSI_NAME_IFR_MAX_SIZE.

Referenced by IScsiFormCallback().


Variable Documentation

Referenced by IScsiGetConfigData().

BOOLEAN mIScsiDeviceListUpdated = FALSE

Initial value:

 {
  {
    {
      HARDWARE_DEVICE_PATH,
      HW_VENDOR_DP,
      {
        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
      }
    },
    ISCSI_CONFIG_GUID
  },
  {
    END_DEVICE_PATH_TYPE,
    END_ENTIRE_DEVICE_PATH_SUBTYPE,
    { 
      (UINT8) (END_DEVICE_PATH_LENGTH),
      (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
    }
  }
}

CHAR16 mVendorStorageName[] = L"ISCSI_CONFIG_IFR_NVDATA"


Generated on Mon Sep 28 08:49:06 2015 for NetworkPkg[ALL] by  doxygen 1.5.7.1