]>
Commit | Line | Data |
---|---|---|
12618416 | 1 | /** @file\r |
7551539c | 2 | The header file of IScsiDhcp.\r |
6a690e23 | 3 | \r |
d1102dba | 4 | Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r |
e5eed7d3 | 5 | This program and the accompanying materials\r |
7a444476 | 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 | |
6a690e23 | 12 | \r |
12618416 | 13 | **/\r |
6a690e23 | 14 | \r |
15 | #ifndef _ISCSI_DHCP_H_\r | |
16 | #define _ISCSI_DHCP_H_\r | |
17 | \r | |
9cb8724d | 18 | #include <Protocol/Dhcp4.h>\r |
6a690e23 | 19 | \r |
6a690e23 | 20 | #define ISCSI_ROOT_PATH_ID "iscsi:"\r |
21 | #define ISCSI_ROOT_PATH_FIELD_DELIMITER ':'\r | |
22 | \r | |
f6b7393c | 23 | #define RP_FIELD_IDX_SERVERNAME 0\r |
24 | #define RP_FIELD_IDX_PROTOCOL 1\r | |
25 | #define RP_FIELD_IDX_PORT 2\r | |
26 | #define RP_FIELD_IDX_LUN 3\r | |
27 | #define RP_FIELD_IDX_TARGETNAME 4\r | |
28 | #define RP_FIELD_IDX_MAX 5\r | |
6a690e23 | 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 | |
12618416 | 35 | /**\r |
36 | Parse the DHCP ACK to get the address configuration and DNS information.\r | |
d1102dba | 37 | \r |
c5de0d55 | 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 session configuration data.\r | |
12618416 | 41 | \r |
42 | @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.\r | |
7551539c | 43 | @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r |
dd29f3ed | 44 | @retval EFI_NO_MEDIA There was a media error.\r |
963dbb30 | 45 | @retval Others Other errors as indicated.\r |
dd29f3ed | 46 | \r |
12618416 | 47 | **/\r |
6a690e23 | 48 | EFI_STATUS\r |
49 | IScsiDoDhcp (\r | |
c5de0d55 | 50 | IN EFI_HANDLE Image,\r |
51 | IN EFI_HANDLE Controller,\r | |
52 | IN OUT ISCSI_SESSION_CONFIG_DATA *ConfigData\r | |
6a690e23 | 53 | );\r |
54 | \r | |
55 | #endif\r |