1 | /** @file
|
---|
2 | The head file of iSCSI DHCP4 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_DHCP_H_
|
---|
10 | #define _ISCSI_DHCP_H_
|
---|
11 |
|
---|
12 | #define ISCSI_ROOT_PATH_ID "iscsi:"
|
---|
13 | #define ISCSI_ROOT_PATH_FIELD_DELIMITER ':'
|
---|
14 |
|
---|
15 | #define RP_FIELD_IDX_SERVERNAME 0
|
---|
16 | #define RP_FIELD_IDX_PROTOCOL 1
|
---|
17 | #define RP_FIELD_IDX_PORT 2
|
---|
18 | #define RP_FIELD_IDX_LUN 3
|
---|
19 | #define RP_FIELD_IDX_TARGETNAME 4
|
---|
20 | #define RP_FIELD_IDX_MAX 5
|
---|
21 |
|
---|
22 | typedef struct _ISCSI_ATTEMPT_CONFIG_NVDATA ISCSI_ATTEMPT_CONFIG_NVDATA;
|
---|
23 |
|
---|
24 | typedef struct _ISCSI_ROOT_PATH_FIELD {
|
---|
25 | CHAR8 *Str;
|
---|
26 | UINT8 Len;
|
---|
27 | } ISCSI_ROOT_PATH_FIELD;
|
---|
28 |
|
---|
29 | /**
|
---|
30 | Parse the DHCP ACK to get the address configuration and DNS information.
|
---|
31 |
|
---|
32 | @param[in] Image The handle of the driver image.
|
---|
33 | @param[in] Controller The handle of the controller.
|
---|
34 | @param[in, out] ConfigData The attempt configuration data.
|
---|
35 |
|
---|
36 | @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
|
---|
37 | @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
---|
38 | @retval EFI_NO_MEDIA There was a media error.
|
---|
39 | @retval Others Other errors as indicated.
|
---|
40 |
|
---|
41 | **/
|
---|
42 | EFI_STATUS
|
---|
43 | IScsiDoDhcp (
|
---|
44 | IN EFI_HANDLE Image,
|
---|
45 | IN EFI_HANDLE Controller,
|
---|
46 | IN OUT ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData
|
---|
47 | );
|
---|
48 |
|
---|
49 | #endif
|
---|