diff options
author | Zhang Lubo <lubo.zhang@intel.com> | 2016-06-22 10:25:21 +0800 |
---|---|---|
committer | Jiaxin Wu <jiaxin.wu@intel.com> | 2016-06-23 09:39:38 +0800 |
commit | 142c00c3d659a6d5d66416385b4c93fd9a9f10e6 (patch) | |
tree | 6df6f04a6c91d797994fbd0b7e306d69fb09b000 /NetworkPkg/Ip6Dxe | |
parent | ac6c3d90edebf1499dac8f4d3c99e94d197ad45e (diff) | |
download | edk2-platforms-142c00c3d659a6d5d66416385b4c93fd9a9f10e6.tar.xz |
NetworkPkg: Refine codes related to Dhcpv4 and Dhcpv6 configuration.
v2:
*Since we have redefined the name of arch types in Dhcp.h for http boot,
it need to change corresponding codes.
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 'NetworkPkg/Ip6Dxe')
-rw-r--r-- | NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 6 | ||||
-rw-r--r-- | NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h | 2 | ||||
-rw-r--r-- | NetworkPkg/Ip6Dxe/Ip6Impl.h | 4 | ||||
-rw-r--r-- | NetworkPkg/Ip6Dxe/Ip6Nd.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c index 62a8ae298c..54522f9a73 100644 --- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c @@ -219,9 +219,9 @@ Ip6ConfigStartStatefulAutoConfig ( // with DNS SERVERS.
//
Oro = (EFI_DHCP6_PACKET_OPTION *) OptBuf;
- Oro->OpCode = HTONS (IP6_CONFIG_DHCP6_OPTION_ORO);
+ Oro->OpCode = HTONS (DHCP6_OPT_ORO);
Oro->OpLen = HTONS (2);
- *((UINT16 *) &Oro->Data[0]) = HTONS (IP6_CONFIG_DHCP6_OPTION_DNS_SERVERS);
+ *((UINT16 *) &Oro->Data[0]) = HTONS (DHCP6_OPT_DNS_SERVERS);
OptList[0] = Oro;
Status = EFI_SUCCESS;
@@ -1508,7 +1508,7 @@ Ip6ConfigParseDhcpReply ( CopyMem (&OpCode, &OptList[Index]->OpCode, sizeof (OpCode));
OpCode = NTOHS (OpCode);
- if (OpCode == IP6_CONFIG_DHCP6_OPTION_DNS_SERVERS) {
+ if (OpCode == DHCP6_OPT_DNS_SERVERS) {
CopyMem (&Length, &OptList[Index]->OpLen, sizeof (Length));
Length = NTOHS (Length);
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h index 2f0e4467d1..3a6e8ad4d1 100644 --- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h @@ -21,8 +21,6 @@ #define IP6_CONFIG_VARIABLE_ATTRIBUTE (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS)
#define IP6_CONFIG_DEFAULT_DAD_XMITS 1
-#define IP6_CONFIG_DHCP6_OPTION_ORO 6
-#define IP6_CONFIG_DHCP6_OPTION_DNS_SERVERS 23
#define DATA_ATTRIB_SIZE_FIXED 0x1
#define DATA_ATTRIB_VOLATILE 0x2
diff --git a/NetworkPkg/Ip6Dxe/Ip6Impl.h b/NetworkPkg/Ip6Dxe/Ip6Impl.h index d30246b2db..9960a9a711 100644 --- a/NetworkPkg/Ip6Dxe/Ip6Impl.h +++ b/NetworkPkg/Ip6Dxe/Ip6Impl.h @@ -1,7 +1,7 @@ /** @file
Implementation of EFI_IP6_PROTOCOL protocol interfaces and type definitions.
- Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
This program and the accompanying materials
@@ -19,6 +19,8 @@ #include <Uefi.h>
+#include <IndustryStandard/Dhcp.h>
+
#include <Protocol/ServiceBinding.h>
#include <Protocol/ManagedNetwork.h>
#include <Protocol/IpSec.h>
diff --git a/NetworkPkg/Ip6Dxe/Ip6Nd.c b/NetworkPkg/Ip6Dxe/Ip6Nd.c index be3dd911b6..a3f49bb2da 100644 --- a/NetworkPkg/Ip6Dxe/Ip6Nd.c +++ b/NetworkPkg/Ip6Dxe/Ip6Nd.c @@ -853,9 +853,9 @@ Ip6OnDADFinished ( // with DNS SERVERS.
//
Oro = (EFI_DHCP6_PACKET_OPTION *) OptBuf;
- Oro->OpCode = HTONS (IP6_CONFIG_DHCP6_OPTION_ORO);
+ Oro->OpCode = HTONS (DHCP6_OPT_ORO);
Oro->OpLen = HTONS (2);
- *((UINT16 *) &Oro->Data[0]) = HTONS (IP6_CONFIG_DHCP6_OPTION_DNS_SERVERS);
+ *((UINT16 *) &Oro->Data[0]) = HTONS (DHCP6_OPT_DNS_SERVERS);
InfoReqReXmit.Irt = 4;
InfoReqReXmit.Mrc = 64;
|