1 /** @file 2 The header file of iSCSI DHCP6 related configuration routines. 3 4 Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 13 **/ 14 15 #ifndef _ISCSI_DHCP6_H_ 16 #define _ISCSI_DHCP6_H_ 17 18 #define ISCSI_ROOT_PATH_ID "iscsi:" 19 #define ISCSI_ROOT_PATH_FIELD_DELIMITER ':' 20 #define ISCSI_ROOT_PATH_ADDR_START_DELIMITER '[' 21 #define ISCSI_ROOT_PATH_ADDR_END_DELIMITER ']' 22 23 24 /** 25 Extract the Root Path option and get the required target information from 26 Boot File Uniform Resource Locator (URL) Option. 27 28 @param[in] RootPath The RootPath string. 29 @param[in] Length Length of the RootPath option payload. 30 @param[in, out] ConfigData The iSCSI session configuration data read from 31 nonvolatile device. 32 33 @retval EFI_SUCCESS All required information is extracted from the 34 RootPath option. 35 @retval EFI_NOT_FOUND The RootPath is not an iSCSI RootPath. 36 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. 37 @retval EFI_INVALID_PARAMETER The RootPath is malformatted. 38 39 **/ 40 EFI_STATUS 41 IScsiDhcp6ExtractRootPath ( 42 IN CHAR8 *RootPath, 43 IN UINT16 Length, 44 IN OUT ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData 45 ); 46 47 /** 48 Parse the DHCP ACK to get the address configuration and DNS information. 49 50 @param[in] Image The handle of the driver image. 51 @param[in] Controller The handle of the controller; 52 @param[in, out] ConfigData The attempt configuration data. 53 54 @retval EFI_SUCCESS The DNS information is got from the DHCP ACK. 55 @retval EFI_NO_MAPPING DHCP failed to acquire address and other 56 information. 57 @retval EFI_INVALID_PARAMETER The DHCP ACK's DNS option is malformatted. 58 @retval EFI_DEVICE_ERROR Some unexpected error happened. 59 @retval EFI_OUT_OF_RESOURCES There is no sufficient resource to finish the 60 operation. 61 @retval EFI_NO_MEDIA There was a media error. 62 63 **/ 64 EFI_STATUS 65 IScsiDoDhcp6 ( 66 IN EFI_HANDLE Image, 67 IN EFI_HANDLE Controller, 68 IN OUT ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData 69 ); 70 71 #endif 72