]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h
sync comments, fix function header, rename variable name to follow coding style.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiDhcp.h
1 /** @file
2 Data structure for DHCP support
3
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
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 Module Name:
14
15 IScsiDhcp.h
16
17 Abstract:
18 The header file of IScsiDhcp.c
19
20 **/
21
22 #ifndef _ISCSI_DHCP_H_
23 #define _ISCSI_DHCP_H_
24
25 #include <Protocol/Dhcp4.h>
26
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 ':'
35
36 enum {
37 RP_FIELD_IDX_SERVERNAME = 0,
38 RP_FIELD_IDX_PROTOCOL,
39 RP_FIELD_IDX_PORT,
40 RP_FIELD_IDX_LUN,
41 RP_FIELD_IDX_TARGETNAME,
42 RP_FIELD_IDX_MAX
43 };
44
45 typedef struct _ISCSI_ROOT_PATH_FIELD {
46 CHAR8 *Str;
47 UINT8 Len;
48 } ISCSI_ROOT_PATH_FIELD;
49
50 /**
51 Parse the DHCP ACK to get the address configuration and DNS information.
52
53 @param Image[in] The handle of the driver image.
54
55 @param Controller[in] The handle of the controller;
56
57 @param ConfigData[in] The session configuration data.
58
59 @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
60
61 @retval EFI_NO_MAPPING DHCP failed to acquire address and other information.
62
63 @retval EFI_INVALID_PARAMETER The DHCP ACK's DNS option is mal-formatted.
64
65 @retval EFI_DEVICE_ERROR Some unexpected error happened.
66
67 **/
68 EFI_STATUS
69 IScsiDoDhcp (
70 IN EFI_HANDLE Image,
71 IN EFI_HANDLE Controller,
72 IN ISCSI_SESSION_CONFIG_DATA *ConfigData
73 );
74
75 #endif