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