IScsiDhcp.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /** @file
  2. The head file of iSCSI DHCP4 related configuration routines.
  3. Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef _ISCSI_DHCP_H_
  7. #define _ISCSI_DHCP_H_
  8. #define ISCSI_ROOT_PATH_ID "iscsi:"
  9. #define ISCSI_ROOT_PATH_FIELD_DELIMITER ':'
  10. #define RP_FIELD_IDX_SERVERNAME 0
  11. #define RP_FIELD_IDX_PROTOCOL 1
  12. #define RP_FIELD_IDX_PORT 2
  13. #define RP_FIELD_IDX_LUN 3
  14. #define RP_FIELD_IDX_TARGETNAME 4
  15. #define RP_FIELD_IDX_MAX 5
  16. typedef struct _ISCSI_ATTEMPT_CONFIG_NVDATA ISCSI_ATTEMPT_CONFIG_NVDATA;
  17. typedef struct _ISCSI_ROOT_PATH_FIELD {
  18. CHAR8 *Str;
  19. UINT8 Len;
  20. } ISCSI_ROOT_PATH_FIELD;
  21. /**
  22. Parse the DHCP ACK to get the address configuration and DNS information.
  23. @param[in] Image The handle of the driver image.
  24. @param[in] Controller The handle of the controller.
  25. @param[in, out] ConfigData The attempt configuration data.
  26. @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
  27. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
  28. @retval EFI_NO_MEDIA There was a media error.
  29. @retval Others Other errors as indicated.
  30. **/
  31. EFI_STATUS
  32. IScsiDoDhcp (
  33. IN EFI_HANDLE Image,
  34. IN EFI_HANDLE Controller,
  35. IN OUT ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData
  36. );
  37. #endif