IScsiDhcp6.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /** @file
  2. The header file of iSCSI DHCP6 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_DHCP6_H_
  7. #define _ISCSI_DHCP6_H_
  8. #define ISCSI_ROOT_PATH_ID "iscsi:"
  9. #define ISCSI_ROOT_PATH_FIELD_DELIMITER ':'
  10. #define ISCSI_ROOT_PATH_ADDR_START_DELIMITER '['
  11. #define ISCSI_ROOT_PATH_ADDR_END_DELIMITER ']'
  12. /**
  13. Extract the Root Path option and get the required target information from
  14. Boot File Uniform Resource Locator (URL) Option.
  15. @param[in] RootPath The RootPath string.
  16. @param[in] Length Length of the RootPath option payload.
  17. @param[in, out] ConfigData The iSCSI session configuration data read from
  18. nonvolatile device.
  19. @retval EFI_SUCCESS All required information is extracted from the
  20. RootPath option.
  21. @retval EFI_NOT_FOUND The RootPath is not an iSCSI RootPath.
  22. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
  23. @retval EFI_INVALID_PARAMETER The RootPath is malformatted.
  24. **/
  25. EFI_STATUS
  26. IScsiDhcp6ExtractRootPath (
  27. IN CHAR8 *RootPath,
  28. IN UINT16 Length,
  29. IN OUT ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData
  30. );
  31. /**
  32. Parse the DHCP ACK to get the address configuration and DNS information.
  33. @param[in] Image The handle of the driver image.
  34. @param[in] Controller The handle of the controller;
  35. @param[in, out] ConfigData The attempt configuration data.
  36. @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
  37. @retval EFI_NO_MAPPING DHCP failed to acquire address and other
  38. information.
  39. @retval EFI_INVALID_PARAMETER The DHCP ACK's DNS option is malformatted.
  40. @retval EFI_DEVICE_ERROR Some unexpected error happened.
  41. @retval EFI_OUT_OF_RESOURCES There is no sufficient resource to finish the
  42. operation.
  43. @retval EFI_NO_MEDIA There was a media error.
  44. **/
  45. EFI_STATUS
  46. IScsiDoDhcp6 (
  47. IN EFI_HANDLE Image,
  48. IN EFI_HANDLE Controller,
  49. IN OUT ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData
  50. );
  51. #endif