2 Data structure for DHCP support
4 Copyright (c) 2004 - 2008, Intel Corporation
5 All rights reserved. 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
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.
18 The header file of IScsiDhcp.c
22 #ifndef _ISCSI_DHCP_H_
23 #define _ISCSI_DHCP_H_
25 #include <Protocol/Dhcp4.h>
27 #define DHCP4_TAG_PARA_LIST 55
28 #define DHCP4_TAG_NETMASK 1
29 #define DHCP4_TAG_ROUTER 3
30 #define DHCP4_TAG_DNS 6
31 #define DHCP4_TAG_SERVER_ID 54
32 #define DHCP4_TAG_ROOT_PATH 17
33 #define ISCSI_ROOT_PATH_ID "iscsi:"
34 #define ISCSI_ROOT_PATH_FIELD_DELIMITER ':'
37 RP_FIELD_IDX_SERVERNAME
= 0,
38 RP_FIELD_IDX_PROTOCOL
,
41 RP_FIELD_IDX_TARGETNAME
,
45 typedef struct _ISCSI_ROOT_PATH_FIELD
{
48 } ISCSI_ROOT_PATH_FIELD
;
51 Parse the DHCP ACK to get the address configuration and DNS information.
53 @param Image[in] The handle of the driver image.
55 @param Controller[in] The handle of the controller;
57 @param ConfigData[in] The session configuration data.
59 @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
61 @retval EFI_NO_MAPPING DHCP failed to acquire address and other information.
63 @retval EFI_INVALID_PARAMETER The DHCP ACK's DNS option is mal-formatted.
65 @retval EFI_DEVICE_ERROR Some unexpected error happened.
71 IN EFI_HANDLE Controller
,
72 IN ISCSI_SESSION_CONFIG_DATA
*ConfigData