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