1 /** @file 2 The head file of iSCSI DHCP4 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_DHCP_H_ 16 #define _ISCSI_DHCP_H_ 17 18 #define ISCSI_ROOT_PATH_ID "iscsi:" 19 #define ISCSI_ROOT_PATH_FIELD_DELIMITER ':' 20 21 #define RP_FIELD_IDX_SERVERNAME 0 22 #define RP_FIELD_IDX_PROTOCOL 1 23 #define RP_FIELD_IDX_PORT 2 24 #define RP_FIELD_IDX_LUN 3 25 #define RP_FIELD_IDX_TARGETNAME 4 26 #define RP_FIELD_IDX_MAX 5 27 28 typedef struct _ISCSI_ATTEMPT_CONFIG_NVDATA ISCSI_ATTEMPT_CONFIG_NVDATA; 29 30 typedef struct _ISCSI_ROOT_PATH_FIELD { 31 CHAR8 *Str; 32 UINT8 Len; 33 } ISCSI_ROOT_PATH_FIELD; 34 35 /** 36 Parse the DHCP ACK to get the address configuration and DNS information. 37 38 @param[in] Image The handle of the driver image. 39 @param[in] Controller The handle of the controller. 40 @param[in, out] ConfigData The attempt configuration data. 41 42 @retval EFI_SUCCESS The DNS information is got from the DHCP ACK. 43 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. 44 @retval EFI_NO_MEDIA There was a media error. 45 @retval Others Other errors as indicated. 46 47 **/ 48 EFI_STATUS 49 IScsiDoDhcp ( 50 IN EFI_HANDLE Image, 51 IN EFI_HANDLE Controller, 52 IN OUT ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData 53 ); 54 55 #endif 56