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