]>
Commit | Line | Data |
---|---|---|
12618416 | 1 | /** @file\r |
2 | Data structure for DHCP support\r | |
6a690e23 | 3 | \r |
9cb8724d | 4 | Copyright (c) 2004 - 2008, Intel Corporation\r |
7a444476 | 5 | All rights reserved. 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 | |
6a690e23 | 12 | \r |
13 | Module Name:\r | |
14 | \r | |
15 | IScsiDhcp.h\r | |
16 | \r | |
17 | Abstract:\r | |
12618416 | 18 | The header file of IScsiDhcp.c\r |
6a690e23 | 19 | \r |
12618416 | 20 | **/\r |
6a690e23 | 21 | \r |
22 | #ifndef _ISCSI_DHCP_H_\r | |
23 | #define _ISCSI_DHCP_H_\r | |
24 | \r | |
9cb8724d | 25 | #include <Protocol/Dhcp4.h>\r |
6a690e23 | 26 | \r |
27 | #define DHCP4_TAG_PARA_LIST 55\r | |
28 | #define DHCP4_TAG_NETMASK 1\r | |
29 | #define DHCP4_TAG_ROUTER 3\r | |
30 | #define DHCP4_TAG_DNS 6\r | |
31 | #define DHCP4_TAG_SERVER_ID 54\r | |
32 | #define DHCP4_TAG_ROOT_PATH 17\r | |
33 | #define ISCSI_ROOT_PATH_ID "iscsi:"\r | |
34 | #define ISCSI_ROOT_PATH_FIELD_DELIMITER ':'\r | |
35 | \r | |
36 | enum {\r | |
37 | RP_FIELD_IDX_SERVERNAME = 0,\r | |
38 | RP_FIELD_IDX_PROTOCOL,\r | |
39 | RP_FIELD_IDX_PORT,\r | |
40 | RP_FIELD_IDX_LUN,\r | |
41 | RP_FIELD_IDX_TARGETNAME,\r | |
42 | RP_FIELD_IDX_MAX\r | |
43 | };\r | |
44 | \r | |
45 | typedef struct _ISCSI_ROOT_PATH_FIELD {\r | |
46 | CHAR8 *Str;\r | |
47 | UINT8 Len;\r | |
48 | } ISCSI_ROOT_PATH_FIELD;\r | |
49 | \r | |
12618416 | 50 | /**\r |
51 | Parse the DHCP ACK to get the address configuration and DNS information.\r | |
52 | \r | |
53 | @param Image[in] The handle of the driver image.\r | |
54 | \r | |
55 | @param Controller[in] The handle of the controller;\r | |
56 | \r | |
57 | @param ConfigData[in] The session configuration data.\r | |
58 | \r | |
59 | @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.\r | |
60 | \r | |
61 | @retval EFI_NO_MAPPING DHCP failed to acquire address and other information.\r | |
62 | \r | |
63 | @retval EFI_INVALID_PARAMETER The DHCP ACK's DNS option is mal-formatted.\r | |
64 | \r | |
65 | @retval EFI_DEVICE_ERROR Some unexpected error happened.\r | |
66 | \r | |
67 | **/\r | |
6a690e23 | 68 | EFI_STATUS\r |
69 | IScsiDoDhcp (\r | |
70 | IN EFI_HANDLE Image,\r | |
71 | IN EFI_HANDLE Controller,\r | |
72 | IN ISCSI_SESSION_CONFIG_DATA *ConfigData\r | |
73 | );\r | |
74 | \r | |
75 | #endif\r |