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