diff options
author | Zhang Lubo <lubo.zhang@intel.com> | 2016-06-22 10:25:00 +0800 |
---|---|---|
committer | Jiaxin Wu <jiaxin.wu@intel.com> | 2016-06-23 09:39:23 +0800 |
commit | ac6c3d90edebf1499dac8f4d3c99e94d197ad45e (patch) | |
tree | 91f14976ee47797525ec40093c859ac5f48f6264 /MdeModulePkg/Universal/Network/IScsiDxe | |
parent | 8d648abc3265282bb7351c557110e3bdf3d98669 (diff) | |
download | edk2-ac6c3d90edebf1499dac8f4d3c99e94d197ad45e.zip edk2-ac6c3d90edebf1499dac8f4d3c99e94d197ad45e.tar.gz edk2-ac6c3d90edebf1499dac8f4d3c99e94d197ad45e.tar.bz2 |
MedmodulePkg: Refine codes related to Dhcpv4 and Dhcpv6 configuration.
Add a new head file Dhcp.h in Mde/Include/IndustryStandard, normalize the
universal option numbers and other network number tags.
Cc: Sriram Subramanian <sriram-s@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/Network/IScsiDxe')
-rw-r--r-- | MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c | 10 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h | 8 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h | 4 |
3 files changed, 9 insertions, 13 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c index d574ce2..869a56a 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c @@ -1,7 +1,7 @@ /** @file
iSCSI DHCP related configuration routines.
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -222,7 +222,7 @@ IScsiDhcpSelectOffer ( }
for (Index = 0; Index < OptionCount; Index++) {
- if (OptionList[Index]->OpCode != DHCP4_TAG_ROOT_PATH) {
+ if (OptionList[Index]->OpCode != DHCP4_TAG_ROOTPATH) {
continue;
}
@@ -303,7 +303,7 @@ IScsiParseDhcpAck ( //
// Get DNS server addresses and DHCP server address from this offer.
//
- if (OptionList[Index]->OpCode == DHCP4_TAG_DNS) {
+ if (OptionList[Index]->OpCode == DHCP4_TAG_DNS_SERVER) {
if (((OptionList[Index]->Length & 0x3) != 0) || (OptionList[Index]->Length == 0)) {
Status = EFI_INVALID_PARAMETER;
@@ -414,8 +414,8 @@ IScsiDoDhcp ( Data = &ParaList->Data[0];
Data[0] = DHCP4_TAG_NETMASK;
Data[1] = DHCP4_TAG_ROUTER;
- Data[2] = DHCP4_TAG_DNS;
- Data[3] = DHCP4_TAG_ROOT_PATH;
+ Data[2] = DHCP4_TAG_DNS_SERVER;
+ Data[3] = DHCP4_TAG_ROOTPATH;
ZeroMem (&Dhcp4ConfigData, sizeof (EFI_DHCP4_CONFIG_DATA));
Dhcp4ConfigData.OptionCount = 1;
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h index 77754b8..59f8672 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h @@ -1,7 +1,7 @@ /** @file
The header file of IScsiDhcp.
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -17,12 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Protocol/Dhcp4.h>
-#define DHCP4_TAG_PARA_LIST 55
-#define DHCP4_TAG_NETMASK 1
-#define DHCP4_TAG_ROUTER 3
-#define DHCP4_TAG_DNS 6
-#define DHCP4_TAG_SERVER_ID 54
-#define DHCP4_TAG_ROOT_PATH 17
#define ISCSI_ROOT_PATH_ID "iscsi:"
#define ISCSI_ROOT_PATH_FIELD_DELIMITER ':'
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h index 8c761f8..082199c 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h @@ -1,7 +1,7 @@ /** @file
The header file of IScsiImpl.c.
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -17,6 +17,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Uefi.h>
+#include <IndustryStandard/Dhcp.h>
+
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/NetLib.h>
|