1 | /** @file
|
---|
2 | The header file of iSCSI DHCP6 related configuration routines.
|
---|
3 |
|
---|
4 | Copyright (c) 2004 - 2010, 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 DHCP6_OPT_REQUEST_OPTION 6
|
---|
19 | #define DHCP6_OPT_VENDOR_INFO 17
|
---|
20 | #define DHCP6_OPT_DNS_SERVERS 23
|
---|
21 | ///
|
---|
22 | /// Assigned by IANA, RFC 5970
|
---|
23 | ///
|
---|
24 | #define DHCP6_OPT_BOOT_FILE_URL 59
|
---|
25 |
|
---|
26 | #define ISCSI_ROOT_PATH_ID "iscsi:"
|
---|
27 | #define ISCSI_ROOT_PATH_FIELD_DELIMITER ':'
|
---|
28 | #define ISCSI_ROOT_PATH_ADDR_START_DELIMITER '['
|
---|
29 | #define ISCSI_ROOT_PATH_ADDR_END_DELIMITER ']'
|
---|
30 |
|
---|
31 |
|
---|
32 | /**
|
---|
33 | Extract the Root Path option and get the required target information from
|
---|
34 | Boot File Uniform Resource Locator (URL) Option.
|
---|
35 |
|
---|
36 | @param[in] RootPath The RootPath string.
|
---|
37 | @param[in] Length Length of the RootPath option payload.
|
---|
38 | @param[in, out] ConfigData The iSCSI session configuration data read from
|
---|
39 | nonvolatile device.
|
---|
40 |
|
---|
41 | @retval EFI_SUCCESS All required information is extracted from the
|
---|
42 | RootPath option.
|
---|
43 | @retval EFI_NOT_FOUND The RootPath is not an iSCSI RootPath.
|
---|
44 | @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
---|
45 | @retval EFI_INVALID_PARAMETER The RootPath is malformatted.
|
---|
46 |
|
---|
47 | **/
|
---|
48 | EFI_STATUS
|
---|
49 | IScsiDhcp6ExtractRootPath (
|
---|
50 | IN CHAR8 *RootPath,
|
---|
51 | IN UINT16 Length,
|
---|
52 | IN OUT ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData
|
---|
53 | );
|
---|
54 |
|
---|
55 | /**
|
---|
56 | Parse the DHCP ACK to get the address configuration and DNS information.
|
---|
57 |
|
---|
58 | @param[in] Image The handle of the driver image.
|
---|
59 | @param[in] Controller The handle of the controller;
|
---|
60 | @param[in, out] ConfigData The attempt configuration data.
|
---|
61 |
|
---|
62 | @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
|
---|
63 | @retval EFI_NO_MAPPING DHCP failed to acquire address and other
|
---|
64 | information.
|
---|
65 | @retval EFI_INVALID_PARAMETER The DHCP ACK's DNS option is malformatted.
|
---|
66 | @retval EFI_DEVICE_ERROR Some unexpected error happened.
|
---|
67 | @retval EFI_OUT_OF_RESOURCES There is no sufficient resource to finish the
|
---|
68 | operation.
|
---|
69 | @retval EFI_NO_MEDIA There was a media error.
|
---|
70 |
|
---|
71 | **/
|
---|
72 | EFI_STATUS
|
---|
73 | IScsiDoDhcp6 (
|
---|
74 | IN EFI_HANDLE Image,
|
---|
75 | IN EFI_HANDLE Controller,
|
---|
76 | IN OUT ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData
|
---|
77 | );
|
---|
78 |
|
---|
79 | #endif
|
---|