]> git.proxmox.com Git - mirror_edk2.git/blob - NetworkPkg/IScsiDxe/IScsiDhcp.h
Fix a bug about the iSCSI DHCP dependency issue.
[mirror_edk2.git] / NetworkPkg / IScsiDxe / IScsiDhcp.h
1 /** @file
2 The head file of iSCSI DHCP4 related configuration routines.
3
4 Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _ISCSI_DHCP_H_
16 #define _ISCSI_DHCP_H_
17
18
19 #define DHCP4_TAG_PARA_LIST 55
20 #define DHCP4_TAG_NETMASK 1
21 #define DHCP4_TAG_ROUTER 3
22 #define DHCP4_TAG_DNS 6
23 #define DHCP4_TAG_SERVER_ID 54
24 #define DHCP4_TAG_ROOT_PATH 17
25 #define ISCSI_ROOT_PATH_ID "iscsi:"
26 #define ISCSI_ROOT_PATH_FIELD_DELIMITER ':'
27
28 #define RP_FIELD_IDX_SERVERNAME 0
29 #define RP_FIELD_IDX_PROTOCOL 1
30 #define RP_FIELD_IDX_PORT 2
31 #define RP_FIELD_IDX_LUN 3
32 #define RP_FIELD_IDX_TARGETNAME 4
33 #define RP_FIELD_IDX_MAX 5
34
35 typedef struct _ISCSI_ATTEMPT_CONFIG_NVDATA ISCSI_ATTEMPT_CONFIG_NVDATA;
36
37 typedef struct _ISCSI_ROOT_PATH_FIELD {
38 CHAR8 *Str;
39 UINT8 Len;
40 } ISCSI_ROOT_PATH_FIELD;
41
42 /**
43 Parse the DHCP ACK to get the address configuration and DNS information.
44
45 @param[in] Image The handle of the driver image.
46 @param[in] Controller The handle of the controller.
47 @param[in, out] ConfigData The attempt configuration data.
48
49 @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
50 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
51 @retval EFI_NO_MEDIA There was a media error.
52 @retval Others Other errors as indicated.
53
54 **/
55 EFI_STATUS
56 IScsiDoDhcp (
57 IN EFI_HANDLE Image,
58 IN EFI_HANDLE Controller,
59 IN OUT ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData
60 );
61
62 #endif