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