]>
Commit | Line | Data |
---|---|---|
12618416 | 1 | /** @file\r |
7551539c | 2 | The header file of IScsiDhcp.\r |
6a690e23 | 3 | \r |
e5eed7d3 HT |
4 | Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r |
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 |
20 | #define DHCP4_TAG_PARA_LIST 55\r | |
21 | #define DHCP4_TAG_NETMASK 1\r | |
22 | #define DHCP4_TAG_ROUTER 3\r | |
23 | #define DHCP4_TAG_DNS 6\r | |
24 | #define DHCP4_TAG_SERVER_ID 54\r | |
25 | #define DHCP4_TAG_ROOT_PATH 17\r | |
26 | #define ISCSI_ROOT_PATH_ID "iscsi:"\r | |
27 | #define ISCSI_ROOT_PATH_FIELD_DELIMITER ':'\r | |
28 | \r | |
f6b7393c | 29 | #define RP_FIELD_IDX_SERVERNAME 0\r |
30 | #define RP_FIELD_IDX_PROTOCOL 1\r | |
31 | #define RP_FIELD_IDX_PORT 2\r | |
32 | #define RP_FIELD_IDX_LUN 3\r | |
33 | #define RP_FIELD_IDX_TARGETNAME 4\r | |
34 | #define RP_FIELD_IDX_MAX 5\r | |
6a690e23 | 35 | \r |
36 | typedef struct _ISCSI_ROOT_PATH_FIELD {\r | |
37 | CHAR8 *Str;\r | |
38 | UINT8 Len;\r | |
39 | } ISCSI_ROOT_PATH_FIELD;\r | |
40 | \r | |
12618416 | 41 | /**\r |
42 | Parse the DHCP ACK to get the address configuration and DNS information.\r | |
43 | \r | |
c5de0d55 | 44 | @param[in] Image The handle of the driver image.\r |
45 | @param[in] Controller The handle of the controller;\r | |
46 | @param[in, out] ConfigData The session configuration data.\r | |
12618416 | 47 | \r |
48 | @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.\r | |
7551539c | 49 | @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r |
dd29f3ed | 50 | @retval EFI_NO_MEDIA There was a media error.\r |
963dbb30 | 51 | @retval Others Other errors as indicated.\r |
dd29f3ed | 52 | \r |
12618416 | 53 | **/\r |
6a690e23 | 54 | EFI_STATUS\r |
55 | IScsiDoDhcp (\r | |
c5de0d55 | 56 | IN EFI_HANDLE Image,\r |
57 | IN EFI_HANDLE Controller,\r | |
58 | IN OUT ISCSI_SESSION_CONFIG_DATA *ConfigData\r | |
6a690e23 | 59 | );\r |
60 | \r | |
61 | #endif\r |