]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h
update file header
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiDhcp.h
... / ...
CommitLineData
1/** @file\r
2 The header file of IScsiDhcp.\r
3\r
4Copyright (c) 2004 - 2008, Intel Corporation.<BR>\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT 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
18#include <Protocol/Dhcp4.h>\r
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
29typedef enum {\r
30 RP_FIELD_IDX_SERVERNAME = 0,\r
31 RP_FIELD_IDX_PROTOCOL,\r
32 RP_FIELD_IDX_PORT,\r
33 RP_FIELD_IDX_LUN,\r
34 RP_FIELD_IDX_TARGETNAME,\r
35 RP_FIELD_IDX_MAX\r
36} RP_FIELD_IDX;\r
37\r
38typedef struct _ISCSI_ROOT_PATH_FIELD {\r
39 CHAR8 *Str;\r
40 UINT8 Len;\r
41} ISCSI_ROOT_PATH_FIELD;\r
42\r
43/**\r
44 Parse the DHCP ACK to get the address configuration and DNS information.\r
45 \r
46 @param[in] Image The handle of the driver image.\r
47 @param[in] Controller The handle of the controller;\r
48 @param[in] ConfigData The session configuration data.\r
49\r
50 @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.\r
51 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r
52 @retval Others Some unexpected error happened.\r
53**/\r
54EFI_STATUS\r
55IScsiDoDhcp (\r
56 IN EFI_HANDLE Image,\r
57 IN EFI_HANDLE Controller,\r
58 IN ISCSI_SESSION_CONFIG_DATA *ConfigData\r
59 );\r
60\r
61#endif\r