]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h
07b30a936c6c87b01342907e23519f1c1492db0f
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiDhcp.h
1 /** @file
2 The header file of IScsiDhcp.
3
4 Copyright (c) 2004 - 2009, Intel Corporation.<BR>
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
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 #include <Protocol/Dhcp4.h>
19
20 #define DHCP4_TAG_PARA_LIST 55
21 #define DHCP4_TAG_NETMASK 1
22 #define DHCP4_TAG_ROUTER 3
23 #define DHCP4_TAG_DNS 6
24 #define DHCP4_TAG_SERVER_ID 54
25 #define DHCP4_TAG_ROOT_PATH 17
26 #define ISCSI_ROOT_PATH_ID "iscsi:"
27 #define ISCSI_ROOT_PATH_FIELD_DELIMITER ':'
28
29 #define RP_FIELD_IDX_SERVERNAME 0
30 #define RP_FIELD_IDX_PROTOCOL 1
31 #define RP_FIELD_IDX_PORT 2
32 #define RP_FIELD_IDX_LUN 3
33 #define RP_FIELD_IDX_TARGETNAME 4
34 #define RP_FIELD_IDX_MAX 5
35
36 typedef struct _ISCSI_ROOT_PATH_FIELD {
37 CHAR8 *Str;
38 UINT8 Len;
39 } ISCSI_ROOT_PATH_FIELD;
40
41 /**
42 Parse the DHCP ACK to get the address configuration and DNS information.
43
44 @param[in] Image The handle of the driver image.
45 @param[in] Controller The handle of the controller;
46 @param[in, out] ConfigData The session configuration data.
47
48 @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
49 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
50 @retval Others Other errors as indicated.
51 **/
52 EFI_STATUS
53 IScsiDoDhcp (
54 IN EFI_HANDLE Image,
55 IN EFI_HANDLE Controller,
56 IN OUT ISCSI_SESSION_CONFIG_DATA *ConfigData
57 );
58
59 #endif