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 <srira...@hpe.com>
Cc: Ye Ting <ting...@intel.com>
Cc: Fu Siyuan <siyuan...@intel.com>
Cc: Wu Jiaxin <jiaxin...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zh...@intel.com>
---
 NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h        | 128 +--------------------------------
 NetworkPkg/HttpBootDxe/HttpBootDhcp4.c |  82 ++++++++++-----------
 NetworkPkg/HttpBootDxe/HttpBootDhcp4.h |  51 ++-----------
 NetworkPkg/HttpBootDxe/HttpBootDhcp6.c |  30 ++++----
 NetworkPkg/HttpBootDxe/HttpBootDhcp6.h |  27 +------
 NetworkPkg/HttpBootDxe/HttpBootDxe.h   |   1 +
 NetworkPkg/IScsiDxe/IScsiDhcp.c        |  10 +--
 NetworkPkg/IScsiDxe/IScsiDhcp.h        |   9 +--
 NetworkPkg/IScsiDxe/IScsiDhcp6.c       |   8 +--
 NetworkPkg/IScsiDxe/IScsiDhcp6.h       |  11 +--
 NetworkPkg/IScsiDxe/IScsiImpl.h        |   4 +-
 NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c      |   6 +-
 NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h      |   2 -
 NetworkPkg/Ip6Dxe/Ip6Impl.h            |   4 +-
 NetworkPkg/Ip6Dxe/Ip6Nd.c              |   4 +-
 NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c   |  98 ++++++++++++-------------
 NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h   |  42 +----------
 NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c   |  28 ++++----
 NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h   |  25 +------
 NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h    |   3 +-
 20 files changed, 155 insertions(+), 418 deletions(-)

diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
index e3e7553..86ef8af 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
@@ -1,9 +1,9 @@
 /** @file
   Dhcp6 internal data structure and definition declaration.
 
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2009 - 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
   http://opensource.org/licenses/bsd-license.php.
@@ -17,10 +17,12 @@
 #define __EFI_DHCP6_IMPL_H__
 
 
 #include <Uefi.h>
 
+#include <IndustryStandard/Dhcp.h>
+
 #include <Protocol/Dhcp6.h>
 #include <Protocol/Udp6.h>
 #include <Protocol/Ip6Config.h>
 #include <Protocol/ServiceBinding.h>
 #include <Protocol/DriverBinding.h>
@@ -48,70 +50,10 @@ typedef struct _DHCP6_INSTANCE DHCP6_INSTANCE;
 #include "Dhcp6Driver.h"
 
 #define DHCP6_SERVICE_SIGNATURE   SIGNATURE_32 ('D', 'H', '6', 'S')
 #define DHCP6_INSTANCE_SIGNATURE  SIGNATURE_32 ('D', 'H', '6', 'I')
 
-//
-// Transmit parameters of solicit message, refers to section-5.5 of rfc-3315.
-//
-#define DHCP6_SOL_MAX_DELAY       1
-#define DHCP6_SOL_IRT             1
-#define DHCP6_SOL_MRC             0
-#define DHCP6_SOL_MRT             120
-#define DHCP6_SOL_MRD             0
-//
-// Transmit parameters of request message, refers to section-5.5 of rfc-3315.
-//
-#define DHCP6_REQ_IRT             1
-#define DHCP6_REQ_MRC             10
-#define DHCP6_REQ_MRT             30
-#define DHCP6_REQ_MRD             0
-//
-// Transmit parameters of confirm message, refers to section-5.5 of rfc-3315.
-//
-#define DHCP6_CNF_MAX_DELAY       1
-#define DHCP6_CNF_IRT             1
-#define DHCP6_CNF_MRC             0
-#define DHCP6_CNF_MRT             4
-#define DHCP6_CNF_MRD             10
-//
-// Transmit parameters of renew message, refers to section-5.5 of rfc-3315.
-//
-#define DHCP6_REN_IRT             10
-#define DHCP6_REN_MRC             0
-#define DHCP6_REN_MRT             600
-#define DHCP6_REN_MRD             0
-//
-// Transmit parameters of rebind message, refers to section-5.5 of rfc-3315.
-//
-#define DHCP6_REB_IRT             10
-#define DHCP6_REB_MRC             0
-#define DHCP6_REB_MRT             600
-#define DHCP6_REB_MRD             0
-//
-// Transmit parameters of information request message, refers to section-5.5 
of rfc-3315.
-//
-#define DHCP6_INF_MAX_DELAY       1
-#define DHCP6_INF_IRT             1
-#define DHCP6_INF_MRC             0
-#define DHCP6_INF_MRT             120
-#define DHCP6_INF_MRD             0
-//
-// Transmit parameters of release message, refers to section-5.5 of rfc-3315.
-//
-#define DHCP6_REL_IRT             1
-#define DHCP6_REL_MRC             5
-#define DHCP6_REL_MRT             0
-#define DHCP6_REL_MRD             0
-//
-// Transmit parameters of decline message, refers to section-5.5 of rfc-3315.
-//
-#define DHCP6_DEC_IRT             1
-#define DHCP6_DEC_MRC             5
-#define DHCP6_DEC_MRT             0
-#define DHCP6_DEC_MRD             0
-
 #define DHCP6_PACKET_ALL          0
 #define DHCP6_PACKET_STATEFUL     1
 #define DHCP6_PACKET_STATELESS    2
 
 #define DHCP6_BASE_PACKET_SIZE    1024
@@ -125,74 +67,10 @@ typedef struct _DHCP6_INSTANCE DHCP6_INSTANCE;
 extern EFI_IPv6_ADDRESS           mAllDhcpRelayAndServersAddress;
 extern EFI_IPv6_ADDRESS           mAllDhcpServersAddress;
 extern EFI_DHCP6_PROTOCOL         gDhcp6ProtocolTemplate;
 
 //
-// Enumeration of Dhcp6 message type, refers to section-5.3 of rfc-3315.
-//
-typedef enum {
-  Dhcp6MsgSolicit               = 1,
-  Dhcp6MsgAdvertise             = 2,
-  Dhcp6MsgRequest               = 3,
-  Dhcp6MsgConfirm               = 4,
-  Dhcp6MsgRenew                 = 5,
-  Dhcp6MsgRebind                = 6,
-  Dhcp6MsgReply                 = 7,
-  Dhcp6MsgRelease               = 8,
-  Dhcp6MsgDecline               = 9,
-  Dhcp6MsgReconfigure           = 10,
-  Dhcp6MsgInfoRequest           = 11
-} DHCP6_MSG_TYPE;
-
-//
-// Enumeration of option code in Dhcp6 packet, refers to section-24.3 of 
rfc-3315.
-//
-typedef enum {
-  Dhcp6OptClientId              = 1,
-  Dhcp6OptServerId              = 2,
-  Dhcp6OptIana                  = 3,
-  Dhcp6OptIata                  = 4,
-  Dhcp6OptIaAddr                = 5,
-  Dhcp6OptRequestOption         = 6,
-  Dhcp6OptPreference            = 7,
-  Dhcp6OptElapsedTime           = 8,
-  Dhcp6OptReplayMessage         = 9,
-  Dhcp6OptAuthentication        = 11,
-  Dhcp6OptServerUnicast         = 12,
-  Dhcp6OptStatusCode            = 13,
-  Dhcp6OptRapidCommit           = 14,
-  Dhcp6OptUserClass             = 15,
-  Dhcp6OptVendorClass           = 16,
-  Dhcp6OptVendorInfo            = 17,
-  Dhcp6OptInterfaceId           = 18,
-  Dhcp6OptReconfigMessage       = 19,
-  Dhcp6OptReconfigureAccept     = 20
-} DHCP6_OPT_CODE;
-
-//
-// Enumeration of status code recorded by IANA, refers to section-24.4 of 
rfc-3315.
-//
-typedef enum {
-  Dhcp6StsSuccess               = 0,
-  Dhcp6StsUnspecFail            = 1,
-  Dhcp6StsNoAddrsAvail          = 2,
-  Dhcp6StsNoBinding             = 3,
-  Dhcp6StsNotOnLink             = 4,
-  Dhcp6StsUseMulticast          = 5
-} DHCP6_STS_CODE;
-
-//
-// Enumeration of Duid type recorded by IANA, refers to section-24.5 of 
rfc-3315.
-//
-typedef enum {
-  Dhcp6DuidTypeLlt              = 1,
-  Dhcp6DuidTypeEn               = 2,
-  Dhcp6DuidTypeLl               = 3,
-  Dhcp6DuidTypeUuid             = 4
-} DHCP6_DUID_TYPE;
-
-//
 // Control block for each IA.
 //
 struct _DHCP6_IA_CB {
   EFI_DHCP6_IA                  *Ia;
   UINT32                        T1;
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c 
b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
index 5a226d7..c848c46 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
@@ -16,17 +16,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 
 //
 // This is a map from the interested DHCP4 option tags' index to the tag value.
 //
 UINT8 mInterestedDhcp4Tags[HTTP_BOOT_DHCP4_TAG_INDEX_MAX] = {
-  HTTP_BOOT_DHCP4_TAG_BOOTFILE_LEN,
-  HTTP_BOOT_DHCP4_TAG_OVERLOAD,
-  HTTP_BOOT_DHCP4_TAG_MSG_TYPE,
-  HTTP_BOOT_DHCP4_TAG_SERVER_ID,
-  HTTP_BOOT_DHCP4_TAG_CLASS_ID,
-  HTTP_BOOT_DHCP4_TAG_BOOTFILE,
-  HTTP_BOOT_DHCP4_TAG_DNS_SERVER
+  DHCP4_TAG_BOOTFILE_LEN,
+  DHCP4_TAG_OVERLOAD,
+  DHCP4_TAG_MSG_TYPE,
+  DHCP4_TAG_SERVER_ID,
+  DHCP4_TAG_CLASS_ID,
+  DHCP4_TAG_BOOTFILE,
+  DHCP4_TAG_DNS_SERVER
 };
 
 //
 // There are 4 times retries with the value of 4, 8, 16 and 32, refers to UEFI 
2.5 spec.
 //
@@ -57,46 +57,46 @@ HttpBootBuildDhcp4Options (
   OptList[0] = (EFI_DHCP4_PACKET_OPTION *) Buffer;
 
   //
   // Append parameter request list option.
   //
-  OptList[Index]->OpCode    = HTTP_BOOT_DHCP4_TAG_PARA_LIST;
+  OptList[Index]->OpCode    = DHCP4_TAG_PARA_LIST;
   OptList[Index]->Length    = 27;
   OptEnt.Para               = (HTTP_BOOT_DHCP4_OPTION_PARA *) 
OptList[Index]->Data;
-  OptEnt.Para->ParaList[0]  = HTTP_BOOT_DHCP4_TAG_NETMASK;
-  OptEnt.Para->ParaList[1]  = HTTP_BOOT_DHCP4_TAG_TIME_OFFSET;
-  OptEnt.Para->ParaList[2]  = HTTP_BOOT_DHCP4_TAG_ROUTER;
-  OptEnt.Para->ParaList[3]  = HTTP_BOOT_DHCP4_TAG_TIME_SERVER;
-  OptEnt.Para->ParaList[4]  = HTTP_BOOT_DHCP4_TAG_NAME_SERVER;
-  OptEnt.Para->ParaList[5]  = HTTP_BOOT_DHCP4_TAG_DNS_SERVER;
-  OptEnt.Para->ParaList[6]  = HTTP_BOOT_DHCP4_TAG_HOSTNAME;
-  OptEnt.Para->ParaList[7]  = HTTP_BOOT_DHCP4_TAG_BOOTFILE_LEN;
-  OptEnt.Para->ParaList[8]  = HTTP_BOOT_DHCP4_TAG_DOMAINNAME;
-  OptEnt.Para->ParaList[9]  = HTTP_BOOT_DHCP4_TAG_ROOTPATH;
-  OptEnt.Para->ParaList[10] = HTTP_BOOT_DHCP4_TAG_EXTEND_PATH;
-  OptEnt.Para->ParaList[11] = HTTP_BOOT_DHCP4_TAG_EMTU;
-  OptEnt.Para->ParaList[12] = HTTP_BOOT_DHCP4_TAG_TTL;
-  OptEnt.Para->ParaList[13] = HTTP_BOOT_DHCP4_TAG_BROADCAST;
-  OptEnt.Para->ParaList[14] = HTTP_BOOT_DHCP4_TAG_NIS_DOMAIN;
-  OptEnt.Para->ParaList[15] = HTTP_BOOT_DHCP4_TAG_NIS_SERVER;
-  OptEnt.Para->ParaList[16] = HTTP_BOOT_DHCP4_TAG_NTP_SERVER;
-  OptEnt.Para->ParaList[17] = HTTP_BOOT_DHCP4_TAG_VENDOR;
-  OptEnt.Para->ParaList[18] = HTTP_BOOT_DHCP4_TAG_REQUEST_IP;
-  OptEnt.Para->ParaList[19] = HTTP_BOOT_DHCP4_TAG_LEASE;
-  OptEnt.Para->ParaList[20] = HTTP_BOOT_DHCP4_TAG_SERVER_ID;
-  OptEnt.Para->ParaList[21] = HTTP_BOOT_DHCP4_TAG_T1;
-  OptEnt.Para->ParaList[22] = HTTP_BOOT_DHCP4_TAG_T2;
-  OptEnt.Para->ParaList[23] = HTTP_BOOT_DHCP4_TAG_CLASS_ID;
-  OptEnt.Para->ParaList[25] = HTTP_BOOT_DHCP4_TAG_BOOTFILE;
-  OptEnt.Para->ParaList[26] = HTTP_BOOT_DHCP4_TAG_UUID;
+  OptEnt.Para->ParaList[0]  = DHCP4_TAG_NETMASK;
+  OptEnt.Para->ParaList[1]  = DHCP4_TAG_TIME_OFFSET;
+  OptEnt.Para->ParaList[2]  = DHCP4_TAG_ROUTER;
+  OptEnt.Para->ParaList[3]  = DHCP4_TAG_TIME_SERVER;
+  OptEnt.Para->ParaList[4]  = DHCP4_TAG_NAME_SERVER;
+  OptEnt.Para->ParaList[5]  = DHCP4_TAG_DNS_SERVER;
+  OptEnt.Para->ParaList[6]  = DHCP4_TAG_HOSTNAME;
+  OptEnt.Para->ParaList[7]  = DHCP4_TAG_BOOTFILE_LEN;
+  OptEnt.Para->ParaList[8]  = DHCP4_TAG_DOMAINNAME;
+  OptEnt.Para->ParaList[9]  = DHCP4_TAG_ROOTPATH;
+  OptEnt.Para->ParaList[10] = DHCP4_TAG_EXTEND_PATH;
+  OptEnt.Para->ParaList[11] = DHCP4_TAG_EMTU;
+  OptEnt.Para->ParaList[12] = DHCP4_TAG_TTL;
+  OptEnt.Para->ParaList[13] = DHCP4_TAG_BROADCAST;
+  OptEnt.Para->ParaList[14] = DHCP4_TAG_NIS_DOMAIN;
+  OptEnt.Para->ParaList[15] = DHCP4_TAG_NIS_SERVER;
+  OptEnt.Para->ParaList[16] = DHCP4_TAG_NTP_SERVER;
+  OptEnt.Para->ParaList[17] = DHCP4_TAG_VENDOR;
+  OptEnt.Para->ParaList[18] = DHCP4_TAG_REQUEST_IP;
+  OptEnt.Para->ParaList[19] = DHCP4_TAG_LEASE;
+  OptEnt.Para->ParaList[20] = DHCP4_TAG_SERVER_ID;
+  OptEnt.Para->ParaList[21] = DHCP4_TAG_T1;
+  OptEnt.Para->ParaList[22] = DHCP4_TAG_T2;
+  OptEnt.Para->ParaList[23] = DHCP4_TAG_CLASS_ID;
+  OptEnt.Para->ParaList[25] = DHCP4_TAG_BOOTFILE;
+  OptEnt.Para->ParaList[26] = DHCP4_TAG_UUID;
   Index++;
   OptList[Index]            = GET_NEXT_DHCP_OPTION (OptList[Index - 1]);
 
   //
   // Append UUID/Guid-based client identifier option
   //
-  OptList[Index]->OpCode  = HTTP_BOOT_DHCP4_TAG_UUID;
+  OptList[Index]->OpCode  = DHCP4_TAG_UUID;
   OptList[Index]->Length  = (UINT8) sizeof (HTTP_BOOT_DHCP4_OPTION_UUID);
   OptEnt.Uuid             = (HTTP_BOOT_DHCP4_OPTION_UUID *) 
OptList[Index]->Data;
   OptEnt.Uuid->Type       = 0;
   if (EFI_ERROR (NetLibGetSystemGuid ((EFI_GUID *) OptEnt.Uuid->Guid))) {
     //
@@ -108,11 +108,11 @@ HttpBootBuildDhcp4Options (
   OptList[Index]          = GET_NEXT_DHCP_OPTION (OptList[Index - 1]);
 
   //
   // Append client network device interface option
   //
-  OptList[Index]->OpCode  = HTTP_BOOT_DHCP4_TAG_UNDI;
+  OptList[Index]->OpCode  = DHCP4_TAG_UNDI;
   OptList[Index]->Length  = (UINT8) sizeof (HTTP_BOOT_DHCP4_OPTION_UNDI);
   OptEnt.Undi             = (HTTP_BOOT_DHCP4_OPTION_UNDI *) 
OptList[Index]->Data;
 
   if (Private->Nii != NULL) {
     OptEnt.Undi->Type     = Private->Nii->Type;
@@ -128,22 +128,22 @@ HttpBootBuildDhcp4Options (
   OptList[Index] = GET_NEXT_DHCP_OPTION (OptList[Index - 1]);
 
   //
   // Append client system architecture option
   //
-  OptList[Index]->OpCode  = HTTP_BOOT_DHCP4_TAG_ARCH;
+  OptList[Index]->OpCode  = DHCP4_TAG_ARCH;
   OptList[Index]->Length  = (UINT8) sizeof (HTTP_BOOT_DHCP4_OPTION_ARCH);
   OptEnt.Arch             = (HTTP_BOOT_DHCP4_OPTION_ARCH *) 
OptList[Index]->Data;
   Value                   = HTONS (EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE);
   CopyMem (&OptEnt.Arch->Type, &Value, sizeof (UINT16));
   Index++;
   OptList[Index]          = GET_NEXT_DHCP_OPTION (OptList[Index - 1]);
 
   //
   // Append vendor class identify option
   //
-  OptList[Index]->OpCode  = HTTP_BOOT_DHCP4_TAG_CLASS_ID;
+  OptList[Index]->OpCode  = DHCP4_TAG_CLASS_ID;
   OptList[Index]->Length  = (UINT8) sizeof (HTTP_BOOT_DHCP4_OPTION_CLID);
   OptEnt.Clid             = (HTTP_BOOT_DHCP4_OPTION_CLID *) 
OptList[Index]->Data;
   CopyMem (
     OptEnt.Clid,
     DEFAULT_CLASS_ID_DATA,
@@ -188,11 +188,11 @@ HttpBootParseDhcp4Options (
   UINT32                        Offset;
 
   Option  = (EFI_DHCP4_PACKET_OPTION *) Buffer;
   Offset  = 0;
 
-  while (Offset < Length && Option->OpCode != HTTP_BOOT_DHCP4_TAG_EOP) {
+  while (Offset < Length && Option->OpCode != DHCP4_TAG_EOP) {
 
     if (Option->OpCode == OptTag) {
       //
       // Found the required option.
       //
@@ -200,11 +200,11 @@ HttpBootParseDhcp4Options (
     }
 
     //
     // Skip the current option to the next.
     //
-    if (Option->OpCode == HTTP_BOOT_DHCP4_TAG_PAD) {
+    if (Option->OpCode == DHCP4_TAG_PAD) {
       Offset++;
     } else {
       Offset += Option->Length + 2;
     }
 
@@ -605,11 +605,11 @@ HttpBootDhcp4CallBack (
   // Override the Maximum DHCP Message Size.
   //
   MaxMsgSize = HttpBootParseDhcp4Options (
                  Packet->Dhcp4.Option,
                  GET_OPTION_BUFFER_LEN (Packet),
-                 HTTP_BOOT_DHCP4_TAG_MAXMSG
+                 DHCP4_TAG_MAXMSG
                  );
   if (MaxMsgSize != NULL) {
     Value = HTONS (HTTP_BOOT_DHCP4_PACKET_MAX_SIZE);
     CopyMem (MaxMsgSize->Data, &Value, sizeof (Value));
   }
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h 
b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
index 5ac7f71..27d9498 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
@@ -22,70 +22,29 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 #define HTTP_BOOT_DHCP4_OPCODE_REQUEST         1
 #define HTTP_BOOT_DHCP4_OPCODE_REPLY           2
 #define HTTP_BOOT_DHCP4_MSG_TYPE_REQUEST       3
 #define HTTP_BOOT_DHCP4_MAGIC                  0x63538263 // network byte order
 
-//
-// Dhcp Options
-//
-#define HTTP_BOOT_DHCP4_TAG_PAD                0    // Pad Option
-#define HTTP_BOOT_DHCP4_TAG_EOP                255  // End Option
-#define HTTP_BOOT_DHCP4_TAG_NETMASK            1    // Subnet Mask
-#define HTTP_BOOT_DHCP4_TAG_TIME_OFFSET        2    // Time Offset from UTC
-#define HTTP_BOOT_DHCP4_TAG_ROUTER             3    // Router option,
-#define HTTP_BOOT_DHCP4_TAG_TIME_SERVER        4    // Time Server
-#define HTTP_BOOT_DHCP4_TAG_NAME_SERVER        5    // Name Server
-#define HTTP_BOOT_DHCP4_TAG_DNS_SERVER         6    // Domain Name Server
-#define HTTP_BOOT_DHCP4_TAG_HOSTNAME           12   // Host Name
-#define HTTP_BOOT_DHCP4_TAG_BOOTFILE_LEN       13   // Boot File Size
-#define HTTP_BOOT_DHCP4_TAG_DUMP               14   // Merit Dump File
-#define HTTP_BOOT_DHCP4_TAG_DOMAINNAME         15   // Domain Name
-#define HTTP_BOOT_DHCP4_TAG_ROOTPATH           17   // Root path
-#define HTTP_BOOT_DHCP4_TAG_EXTEND_PATH        18   // Extensions Path
-#define HTTP_BOOT_DHCP4_TAG_EMTU               22   // Maximum Datagram 
Reassembly Size
-#define HTTP_BOOT_DHCP4_TAG_TTL                23   // Default IP Time-to-live
-#define HTTP_BOOT_DHCP4_TAG_BROADCAST          28   // Broadcast Address
-#define HTTP_BOOT_DHCP4_TAG_NIS_DOMAIN         40   // Network Information 
Service Domain
-#define HTTP_BOOT_DHCP4_TAG_NIS_SERVER         41   // Network Information 
Servers
-#define HTTP_BOOT_DHCP4_TAG_NTP_SERVER         42   // Network Time Protocol 
Servers
-#define HTTP_BOOT_DHCP4_TAG_VENDOR             43   // Vendor Specific 
Information
-#define HTTP_BOOT_DHCP4_TAG_REQUEST_IP         50   // Requested IP Address
-#define HTTP_BOOT_DHCP4_TAG_LEASE              51   // IP Address Lease Time
-#define HTTP_BOOT_DHCP4_TAG_OVERLOAD           52   // Option Overload
-#define HTTP_BOOT_DHCP4_TAG_MSG_TYPE           53   // DHCP Message Type
-#define HTTP_BOOT_DHCP4_TAG_SERVER_ID          54   // Server Identifier
-#define HTTP_BOOT_DHCP4_TAG_PARA_LIST          55   // Parameter Request List
-#define HTTP_BOOT_DHCP4_TAG_MAXMSG             57   // Maximum DHCP Message 
Size
-#define HTTP_BOOT_DHCP4_TAG_T1                 58   // Renewal (T1) Time Value
-#define HTTP_BOOT_DHCP4_TAG_T2                 59   // Rebinding (T2) Time 
Value
-#define HTTP_BOOT_DHCP4_TAG_CLASS_ID           60   // Vendor class identifier
-#define HTTP_BOOT_DHCP4_TAG_CLIENT_ID          61   // Client-identifier
-#define HTTP_BOOT_DHCP4_TAG_TFTP               66   // TFTP server name
-#define HTTP_BOOT_DHCP4_TAG_BOOTFILE           67   // Bootfile name
-#define HTTP_BOOT_DHCP4_TAG_ARCH               93
-#define HTTP_BOOT_DHCP4_TAG_UNDI               94
-#define HTTP_BOOT_DHCP4_TAG_UUID               97
-
 #define HTTP_BOOT_DHCP4_OVERLOAD_FILE          1
 #define HTTP_BOOT_DHCP4_OVERLOAD_SERVER_NAME   2
 
 ///
 /// HTTP Tag definition that identifies the processor 
 /// and programming environment of the client system.
 /// These identifiers are defined by IETF:
 /// http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml
 ///
 #if defined (MDE_CPU_IA32)
-#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    0x000F
+#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    HTTP_CLIENT_ARCH_IA32
 #elif defined (MDE_CPU_X64)
-#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    0x0010
+#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    HTTP_CLIENT_ARCH_X64
 #elif defined (MDE_CPU_ARM)
-#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    0x0012
+#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    HTTP_CLIENT_ARCH_ARM
 #elif defined (MDE_CPU_AARCH64)
-#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    0x0013
+#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    HTTP_CLIENT_ARCH_AARCH64
 #elif defined (MDE_CPU_EBC)
-#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    0x0011
+#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    HTTP_CLIENT_ARCH_EBC
 #endif
 
 /// DHCP offer types among HTTP boot.
 /// Dhcp4 and Dhcp6 share this definition, and corresponding
 /// relatioinship is as follows:
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c 
b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
index 0157095..81db766 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
@@ -1,9 +1,9 @@
 /** @file
   Functions implementation related with DHCPv6 for HTTP boot driver.
 
-Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 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 that accompanies this 
distribution.  
 The full text of the license may be found at
 http://opensource.org/licenses/bsd-license.php.                                
          
     
@@ -39,24 +39,24 @@ HttpBootBuildDhcp6Options (
   OptList[0] = (EFI_DHCP6_PACKET_OPTION *) Buffer;
 
   //
   // Append client option request option
   //
-  OptList[Index]->OpCode     = HTONS (HTTP_BOOT_DHCP6_OPT_ORO);
+  OptList[Index]->OpCode     = HTONS (DHCP6_OPT_ORO);
   OptList[Index]->OpLen      = HTONS (8);
   OptEnt.Oro                 = (HTTP_BOOT_DHCP6_OPTION_ORO *) 
OptList[Index]->Data;
-  OptEnt.Oro->OpCode[0]      = HTONS(HTTP_BOOT_DHCP6_OPT_BOOT_FILE_URL);
-  OptEnt.Oro->OpCode[1]      = HTONS(HTTP_BOOT_DHCP6_OPT_BOOT_FILE_PARAM);
-  OptEnt.Oro->OpCode[2]      = HTONS(HTTP_BOOT_DHCP6_OPT_DNS_SERVERS);
-  OptEnt.Oro->OpCode[3]      = HTONS(HTTP_BOOT_DHCP6_OPT_VENDOR_CLASS);
+  OptEnt.Oro->OpCode[0]      = HTONS(DHCP6_OPT_BOOT_FILE_URL);
+  OptEnt.Oro->OpCode[1]      = HTONS(DHCP6_OPT_BOOT_FILE_PARAM);
+  OptEnt.Oro->OpCode[2]      = HTONS(DHCP6_OPT_DNS_SERVERS);
+  OptEnt.Oro->OpCode[3]      = HTONS(DHCP6_OPT_VENDOR_CLASS);
   Index++;
   OptList[Index]             = GET_NEXT_DHCP6_OPTION (OptList[Index - 1]);
 
   //
   // Append client network device interface option
   //
-  OptList[Index]->OpCode     = HTONS (HTTP_BOOT_DHCP6_OPT_UNDI);
+  OptList[Index]->OpCode     = HTONS (DHCP6_OPT_UNDI);
   OptList[Index]->OpLen      = HTONS ((UINT16)3);
   OptEnt.Undi                = (HTTP_BOOT_DHCP6_OPTION_UNDI *) 
OptList[Index]->Data;
 
   if (Private->Nii != NULL) {
     OptEnt.Undi->Type        = Private->Nii->Type;
@@ -72,22 +72,22 @@ HttpBootBuildDhcp6Options (
   OptList[Index]             = GET_NEXT_DHCP6_OPTION (OptList[Index - 1]);
 
   //
   // Append client system architecture option
   //
-  OptList[Index]->OpCode     = HTONS (HTTP_BOOT_DHCP6_OPT_ARCH);
+  OptList[Index]->OpCode     = HTONS (DHCP6_OPT_ARCH);
   OptList[Index]->OpLen      = HTONS ((UINT16) sizeof 
(HTTP_BOOT_DHCP6_OPTION_ARCH));
   OptEnt.Arch                = (HTTP_BOOT_DHCP6_OPTION_ARCH *) 
OptList[Index]->Data;
   Value                      = HTONS 
(EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE);
   CopyMem (&OptEnt.Arch->Type, &Value, sizeof (UINT16));
   Index++;
   OptList[Index]             = GET_NEXT_DHCP6_OPTION (OptList[Index - 1]);
 
   //
   // Append vendor class identify option.
   //
-  OptList[Index]->OpCode       = HTONS (HTTP_BOOT_DHCP6_OPT_VENDOR_CLASS);
+  OptList[Index]->OpCode       = HTONS (DHCP6_OPT_VENDOR_CLASS);
   OptList[Index]->OpLen        = HTONS ((UINT16) sizeof 
(HTTP_BOOT_DHCP6_OPTION_VENDOR_CLASS));
   OptEnt.VendorClass           = (HTTP_BOOT_DHCP6_OPTION_VENDOR_CLASS *) 
OptList[Index]->Data;
   OptEnt.VendorClass->Vendor   = HTONL (HTTP_BOOT_DHCP6_ENTERPRISE_NUM);
   OptEnt.VendorClass->ClassLen = HTONS ((UINT16) sizeof (HTTP_BOOT_CLASS_ID));
   CopyMem (
@@ -209,22 +209,22 @@ HttpBootParseDhcp6Packet (
   //
   // OpLen and OpCode here are both stored in network order, since they are 
from original packet.
   //
   while (Offset < Length) {
 
-    if (NTOHS (Option->OpCode) == HTTP_BOOT_DHCP6_OPT_IA_NA) {
+    if (NTOHS (Option->OpCode) == DHCP6_OPT_IA_NA) {
       Options[HTTP_BOOT_DHCP6_IDX_IA_NA] = Option;
-    } else if (NTOHS (Option->OpCode) == HTTP_BOOT_DHCP6_OPT_BOOT_FILE_URL) {
+    } else if (NTOHS (Option->OpCode) == DHCP6_OPT_BOOT_FILE_URL) {
       //
       // The server sends this option to inform the client about an URL to a 
boot file.
       //
       Options[HTTP_BOOT_DHCP6_IDX_BOOT_FILE_URL] = Option;
-    } else if (NTOHS (Option->OpCode) == HTTP_BOOT_DHCP6_OPT_BOOT_FILE_PARAM) {
+    } else if (NTOHS (Option->OpCode) == DHCP6_OPT_BOOT_FILE_PARAM) {
       Options[HTTP_BOOT_DHCP6_IDX_BOOT_FILE_PARAM] = Option;
-    } else if (NTOHS (Option->OpCode) == HTTP_BOOT_DHCP6_OPT_VENDOR_CLASS) {
+    } else if (NTOHS (Option->OpCode) == DHCP6_OPT_VENDOR_CLASS) {
       Options[HTTP_BOOT_DHCP6_IDX_VENDOR_CLASS] = Option;
-    } else if (NTOHS (Option->OpCode) == HTTP_BOOT_DHCP6_OPT_DNS_SERVERS) {
+    } else if (NTOHS (Option->OpCode) == DHCP6_OPT_DNS_SERVERS) {
       Options[HTTP_BOOT_DHCP6_IDX_DNS_SERVER] = Option;
     }
 
     Offset += (NTOHS (Option->OpLen) + 4);
     Option  = (EFI_DHCP6_PACKET_OPTION *) (Offer->Dhcp6.Option + Offset);
@@ -236,11 +236,11 @@ HttpBootParseDhcp6Packet (
   Option = Options[HTTP_BOOT_DHCP6_IDX_IA_NA];
   if (Option != NULL) {
     Option = HttpBootParseDhcp6Options (
                Option->Data + 12,
                NTOHS (Option->OpLen),
-               HTTP_BOOT_DHCP6_OPT_STATUS_CODE
+               DHCP6_OPT_STATUS_CODE
                );
     if ((Option != NULL && Option->Data[0] == 0) || (Option == NULL)) {
       IsProxyOffer = FALSE;
     }
   }
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h 
b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
index 59ca19e..f9eec9d 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
@@ -1,9 +1,9 @@
 /** @file
   Functions declaration related with DHCPv6 for HTTP boot driver.
 
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 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 that accompanies this 
distribution.  
 The full text of the license may be found at
 http://opensource.org/licenses/bsd-license.php.                                
          
     
@@ -22,35 +22,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 #define HTTP_BOOT_DHCP6_PACKET_MAX_SIZE        1472
 #define HTTP_BOOT_IP6_ROUTE_TABLE_TIMEOUT      10
 #define HTTP_BOOT_DEFAULT_HOPLIMIT             64
 #define HTTP_BOOT_DEFAULT_LIFETIME             50000
 
-
-#define HTTP_BOOT_DHCP6_OPT_CLIENT_ID         1
-#define HTTP_BOOT_DHCP6_OPT_SERVER_ID         2
-#define HTTP_BOOT_DHCP6_OPT_IA_NA             3
-#define HTTP_BOOT_DHCP6_OPT_IA_TA             4
-#define HTTP_BOOT_DHCP6_OPT_IAADDR            5
-#define HTTP_BOOT_DHCP6_OPT_ORO               6
-#define HTTP_BOOT_DHCP6_OPT_PREFERENCE        7
-#define HTTP_BOOT_DHCP6_OPT_ELAPSED_TIME      8
-#define HTTP_BOOT_DHCP6_OPT_REPLAY_MSG        9
-#define HTTP_BOOT_DHCP6_OPT_AUTH              11
-#define HTTP_BOOT_DHCP6_OPT_UNICAST           12
-#define HTTP_BOOT_DHCP6_OPT_STATUS_CODE       13
-#define HTTP_BOOT_DHCP6_OPT_RAPID_COMMIT      14
-#define HTTP_BOOT_DHCP6_OPT_USER_CLASS        15
-#define HTTP_BOOT_DHCP6_OPT_VENDOR_CLASS      16
-#define HTTP_BOOT_DHCP6_OPT_VENDOR_OPTS       17
-#define HTTP_BOOT_DHCP6_OPT_INTERFACE_ID      18
-#define HTTP_BOOT_DHCP6_OPT_RECONFIG_MSG      19
-#define HTTP_BOOT_DHCP6_OPT_RECONFIG_ACCEPT   20
-#define HTTP_BOOT_DHCP6_OPT_DNS_SERVERS       23
-#define HTTP_BOOT_DHCP6_OPT_BOOT_FILE_URL     59    // Assigned by IANA, RFC 
5970
-#define HTTP_BOOT_DHCP6_OPT_BOOT_FILE_PARAM   60    // Assigned by IANA, RFC 
5970
-#define HTTP_BOOT_DHCP6_OPT_ARCH              61    // Assigned by IANA, RFC 
5970
-#define HTTP_BOOT_DHCP6_OPT_UNDI              62    // Assigned by IANA, RFC 
5970
 #define HTTP_BOOT_DHCP6_ENTERPRISE_NUM        343   // TODO: IANA TBD: 
temporarily using Intel's
 #define HTTP_BOOT_DHCP6_MAX_BOOT_FILE_SIZE    65535 //   It's a limitation of 
bit length, 65535*512 bytes.
 
 #define HTTP_BOOT_DHCP6_IDX_IA_NA             0
 #define HTTP_BOOT_DHCP6_IDX_BOOT_FILE_URL     1
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.h 
b/NetworkPkg/HttpBootDxe/HttpBootDxe.h
index 806429c..7e8cd9d 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxe.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.h
@@ -17,10 +17,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 #define __EFI_HTTP_BOOT_DXE_H__
 
 #include <Uefi.h>
 
 #include <IndustryStandard/Http11.h>
+#include <IndustryStandard/Dhcp.h>
 
 //
 // Libraries
 //
 #include <Library/UefiBootServicesTableLib.h>
diff --git a/NetworkPkg/IScsiDxe/IScsiDhcp.c b/NetworkPkg/IScsiDxe/IScsiDhcp.c
index fa2412e..0e42805 100644
--- a/NetworkPkg/IScsiDxe/IScsiDhcp.c
+++ b/NetworkPkg/IScsiDxe/IScsiDhcp.c
@@ -1,9 +1,9 @@
 /** @file
   iSCSI DHCP4 related configuration routines.
 
-Copyright (c) 2004 - 2011, 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
 http://opensource.org/licenses/bsd-license.php
 
@@ -238,11 +238,11 @@ IScsiDhcpSelectOffer (
     FreePool (OptionList);
     return EFI_NOT_READY;
   }
 
   for (Index = 0; Index < OptionCount; Index++) {
-    if (OptionList[Index]->OpCode != DHCP4_TAG_ROOT_PATH) {
+    if (OptionList[Index]->OpCode != DHCP4_TAG_ROOTPATH) {
       continue;
     }
 
     Status = IScsiDhcpExtractRootPath (
                (CHAR8 *) &OptionList[Index]->Data[0],
@@ -324,11 +324,11 @@ IScsiParseDhcpAck (
 
   for (Index = 0; Index < OptionCount; Index++) {
     //
     // 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;
         break;
       }
@@ -438,12 +438,12 @@ IScsiDoDhcp (
   //
   ParaList->OpCode  = DHCP4_TAG_PARA_LIST;
   ParaList->Length  = (UINT8) (NvData->TargetInfoFromDhcp ? 4 : 3);
   ParaList->Data[0] = DHCP4_TAG_NETMASK;
   ParaList->Data[1] = DHCP4_TAG_ROUTER;
-  ParaList->Data[2] = DHCP4_TAG_DNS;
-  ParaList->Data[3] = DHCP4_TAG_ROOT_PATH;
+  ParaList->Data[2] = DHCP4_TAG_DNS_SERVER;
+  ParaList->Data[3] = DHCP4_TAG_ROOTPATH;
 
   ZeroMem (&Dhcp4ConfigData, sizeof (EFI_DHCP4_CONFIG_DATA));
   Dhcp4ConfigData.OptionCount = 1;
   Dhcp4ConfigData.OptionList  = &ParaList;
 
diff --git a/NetworkPkg/IScsiDxe/IScsiDhcp.h b/NetworkPkg/IScsiDxe/IScsiDhcp.h
index 3165100..7d55ec9 100644
--- a/NetworkPkg/IScsiDxe/IScsiDhcp.h
+++ b/NetworkPkg/IScsiDxe/IScsiDhcp.h
@@ -1,9 +1,9 @@
 /** @file
   The head file of iSCSI DHCP4 related configuration routines.
 
-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
 http://opensource.org/licenses/bsd-license.php
 
@@ -13,17 +13,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 **/
 
 #ifndef _ISCSI_DHCP_H_
 #define _ISCSI_DHCP_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 ':'
 
 #define RP_FIELD_IDX_SERVERNAME         0
 #define RP_FIELD_IDX_PROTOCOL           1
diff --git a/NetworkPkg/IScsiDxe/IScsiDhcp6.c b/NetworkPkg/IScsiDxe/IScsiDhcp6.c
index 331b0f1..0cd0bd8 100644
--- a/NetworkPkg/IScsiDxe/IScsiDhcp6.c
+++ b/NetworkPkg/IScsiDxe/IScsiDhcp6.c
@@ -1,9 +1,9 @@
 /** @file
   iSCSI DHCP6 related configuration routines.
 
-Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2009 - 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
 http://opensource.org/licenses/bsd-license.php
 
@@ -301,11 +301,11 @@ IScsiDhcp6ParseReply (
     } else if (OptionList[Index]->OpCode == DHCP6_OPT_BOOT_FILE_URL) {
       //
       // The server sends this option to inform the client about an URL to a 
boot file.
       //
       BootFileOpt = OptionList[Index];
-    } else if (OptionList[Index]->OpCode == DHCP6_OPT_BOOT_FILE_PARA) {
+    } else if (OptionList[Index]->OpCode == DHCP6_OPT_BOOT_FILE_PARAM) {
       //
       // The server sends this option to inform the client about DHCP6 server 
address.
       //
       if (OptionList[Index]->OpLen < 18) {
         Status = EFI_UNSUPPORTED;
@@ -432,15 +432,15 @@ IScsiDoDhcp6 (
 
   //
   // Ask the server to reply with DNS and Boot File URL options by info 
request.
   // All members in EFI_DHCP6_PACKET_OPTION are in network order.
   //
-  Oro->OpCode  = HTONS (DHCP6_OPT_REQUEST_OPTION);
+  Oro->OpCode  = HTONS (DHCP6_OPT_ORO);
   Oro->OpLen   = HTONS (2 * 3);
   Oro->Data[1] = DHCP6_OPT_DNS_SERVERS;
   Oro->Data[3] = DHCP6_OPT_BOOT_FILE_URL;
-  Oro->Data[5] = DHCP6_OPT_BOOT_FILE_PARA;
+  Oro->Data[5] = DHCP6_OPT_BOOT_FILE_PARAM;
 
   InfoReqReXmit.Irt = 4;
   InfoReqReXmit.Mrc = 1;
   InfoReqReXmit.Mrt = 10;
   InfoReqReXmit.Mrd = 30;
diff --git a/NetworkPkg/IScsiDxe/IScsiDhcp6.h b/NetworkPkg/IScsiDxe/IScsiDhcp6.h
index 4ca25bd..1d59d10 100644
--- a/NetworkPkg/IScsiDxe/IScsiDhcp6.h
+++ b/NetworkPkg/IScsiDxe/IScsiDhcp6.h
@@ -1,9 +1,9 @@
 /** @file
   The header file of iSCSI DHCP6 related configuration routines.
 
-Copyright (c) 2004 - 2012, 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
 http://opensource.org/licenses/bsd-license.php
 
@@ -13,19 +13,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 **/
 
 #ifndef _ISCSI_DHCP6_H_
 #define _ISCSI_DHCP6_H_
 
-#define DHCP6_OPT_REQUEST_OPTION 6
-#define DHCP6_OPT_VENDOR_INFO    17
-#define DHCP6_OPT_DNS_SERVERS    23
-///
-/// Assigned by IANA, RFC 5970
-///
-#define DHCP6_OPT_BOOT_FILE_URL  59
-#define DHCP6_OPT_BOOT_FILE_PARA 60
-
 #define ISCSI_ROOT_PATH_ID                   "iscsi:"
 #define ISCSI_ROOT_PATH_FIELD_DELIMITER      ':'
 #define ISCSI_ROOT_PATH_ADDR_START_DELIMITER '['
 #define ISCSI_ROOT_PATH_ADDR_END_DELIMITER   ']'
 
diff --git a/NetworkPkg/IScsiDxe/IScsiImpl.h b/NetworkPkg/IScsiDxe/IScsiImpl.h
index 9941b8c..af46871 100644
--- a/NetworkPkg/IScsiDxe/IScsiImpl.h
+++ b/NetworkPkg/IScsiDxe/IScsiImpl.h
@@ -1,9 +1,9 @@
 /** @file
   The shared head file for iSCSI driver.
 
-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
 http://opensource.org/licenses/bsd-license.php
 
@@ -15,10 +15,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 #ifndef _ISCSI_IMPL_H_
 #define _ISCSI_IMPL_H_
 
 #include <Uefi.h>
 
+#include <IndustryStandard/Dhcp.h>
+
 #include <Protocol/ComponentName.h>
 #include <Protocol/ComponentName2.h>
 #include <Protocol/DriverBinding.h>
 #include <Protocol/DevicePath.h>
 #include <Protocol/HiiConfigAccess.h>
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c 
b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
index 62a8ae2..54522f9 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
@@ -217,13 +217,13 @@ Ip6ConfigStartStatefulAutoConfig (
   //
   // Set the exta options to send. Here we only want the option request option
   // 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;
 
   if (!OtherInfoOnly) {
@@ -1506,11 +1506,11 @@ Ip6ConfigParseDhcpReply (
     // aligned.
     //
     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);
 
       if ((Length == 0) || ((Length % sizeof (EFI_IPv6_ADDRESS)) != 0)) {
         //
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h 
b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
index 2f0e446..3a6e8ad 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
@@ -19,12 +19,10 @@
 #define IP6_CONFIG_INSTANCE_SIGNATURE    SIGNATURE_32 ('I', 'P', '6', 'C')
 #define IP6_FORM_CALLBACK_INFO_SIGNATURE SIGNATURE_32 ('I', 'F', 'C', 'I')
 #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
 
 #define DATA_ATTRIB_SET(Attrib, Bits)       (BOOLEAN)((Attrib) & (Bits))
diff --git a/NetworkPkg/Ip6Dxe/Ip6Impl.h b/NetworkPkg/Ip6Dxe/Ip6Impl.h
index d30246b..9960a9a 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Impl.h
+++ b/NetworkPkg/Ip6Dxe/Ip6Impl.h
@@ -1,9 +1,9 @@
 /** @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
   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,10 +17,12 @@
 #ifndef __EFI_IP6_IMPL_H__
 #define __EFI_IP6_IMPL_H__
 
 #include <Uefi.h>
 
+#include <IndustryStandard/Dhcp.h>
+
 #include <Protocol/ServiceBinding.h>
 #include <Protocol/ManagedNetwork.h>
 #include <Protocol/IpSec.h>
 #include <Protocol/Ip6.h>
 #include <Protocol/Ip6Config.h>
diff --git a/NetworkPkg/Ip6Dxe/Ip6Nd.c b/NetworkPkg/Ip6Dxe/Ip6Nd.c
index be3dd91..a3f49bb 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Nd.c
+++ b/NetworkPkg/Ip6Dxe/Ip6Nd.c
@@ -851,13 +851,13 @@ Ip6OnDADFinished (
         //
         // Set the exta options to send. Here we only want the option request 
option
         // 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;
         InfoReqReXmit.Mrt = 60;
         InfoReqReXmit.Mrd = 0;
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c 
b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
index 818586f..9cab08b 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
@@ -17,17 +17,17 @@
 
 //
 // This is a map from the interested DHCP4 option tags' index to the tag value.
 //
 UINT8 mInterestedDhcp4Tags[PXEBC_DHCP4_TAG_INDEX_MAX] = {
-  PXEBC_DHCP4_TAG_BOOTFILE_LEN,
-  PXEBC_DHCP4_TAG_VENDOR,
-  PXEBC_DHCP4_TAG_OVERLOAD,
-  PXEBC_DHCP4_TAG_MSG_TYPE,
-  PXEBC_DHCP4_TAG_SERVER_ID,
-  PXEBC_DHCP4_TAG_CLASS_ID,
-  PXEBC_DHCP4_TAG_BOOTFILE
+  DHCP4_TAG_BOOTFILE_LEN,
+  DHCP4_TAG_VENDOR,
+  DHCP4_TAG_OVERLOAD,
+  DHCP4_TAG_MSG_TYPE,
+  DHCP4_TAG_SERVER_ID,
+  DHCP4_TAG_CLASS_ID,
+  DHCP4_TAG_BOOTFILE
 };
 
 //
 // There are 4 times retries with the value of 4, 8, 16 and 32, refers to 
PXE2.1 spec.
 //
@@ -56,11 +56,11 @@ PxeBcParseDhcp4Options (
   UINT32                        Offset;
 
   Option  = (EFI_DHCP4_PACKET_OPTION *) Buffer;
   Offset  = 0;
 
-  while (Offset < Length && Option->OpCode != PXEBC_DHCP4_TAG_EOP) {
+  while (Offset < Length && Option->OpCode != DHCP4_TAG_EOP) {
 
     if (Option->OpCode == OptTag) {
       //
       // Found the required option.
       //
@@ -68,11 +68,11 @@ PxeBcParseDhcp4Options (
     }
 
     //
     // Skip the current option to the next.
     //
-    if (Option->OpCode == PXEBC_DHCP4_TAG_PAD) {
+    if (Option->OpCode == DHCP4_TAG_PAD) {
       Offset++;
     } else {
       Offset += Option->Length + 2;
     }
 
@@ -106,11 +106,11 @@ PxeBcParseVendorOptions (
   PxeOption       = (EFI_DHCP4_PACKET_OPTION *) &Dhcp4Option->Data[0];
   Offset          = 0;
 
   ASSERT (PxeOption != NULL);
 
-  while ((Offset < VendorOptionLen) && (PxeOption->OpCode != 
PXEBC_DHCP4_TAG_EOP)) {
+  while ((Offset < VendorOptionLen) && (PxeOption->OpCode != DHCP4_TAG_EOP)) {
     //
     // Parse all the interesting PXE vendor options one by one.
     //
     switch (PxeOption->OpCode) {
 
@@ -199,11 +199,11 @@ PxeBcParseVendorOptions (
     SET_VENDOR_OPTION_BIT_MAP (BitMap, PxeOption->OpCode);
 
     //
     // Continue to the next option.
     //
-    if (PxeOption->OpCode == PXEBC_DHCP4_TAG_PAD) {
+    if (PxeOption->OpCode == DHCP4_TAG_PAD) {
       Offset++;
     } else {
       Offset = (UINT8) (Offset + PxeOption->Length + 2);
     }
 
@@ -241,21 +241,21 @@ PxeBcBuildDhcp4Options (
 
   if (NeedMsgType) {
     //
     // Append message type.
     //
-    OptList[Index]->OpCode  = PXEBC_DHCP4_TAG_MSG_TYPE;
+    OptList[Index]->OpCode  = DHCP4_TAG_MSG_TYPE;
     OptList[Index]->Length  = 1;
     OptEnt.Mesg             = (PXEBC_DHCP4_OPTION_MESG *) OptList[Index]->Data;
     OptEnt.Mesg->Type       = PXEBC_DHCP4_MSG_TYPE_REQUEST;
     Index++;
     OptList[Index]          = GET_NEXT_DHCP_OPTION (OptList[Index - 1]);
 
     //
     // Append max message size.
     //
-    OptList[Index]->OpCode  = PXEBC_DHCP4_TAG_MAXMSG;
+    OptList[Index]->OpCode  = DHCP4_TAG_MAXMSG;
     OptList[Index]->Length  = (UINT8) sizeof 
(PXEBC_DHCP4_OPTION_MAX_MESG_SIZE);
     OptEnt.MaxMesgSize      = (PXEBC_DHCP4_OPTION_MAX_MESG_SIZE *) 
OptList[Index]->Data;
     Value                   = NTOHS (PXEBC_DHCP4_PACKET_MAX_SIZE - 8);
     CopyMem (&OptEnt.MaxMesgSize->Size, &Value, sizeof (UINT16));
     Index++;
@@ -263,40 +263,40 @@ PxeBcBuildDhcp4Options (
   }
 
   //
   // Append parameter request list option.
   //
-  OptList[Index]->OpCode    = PXEBC_DHCP4_TAG_PARA_LIST;
+  OptList[Index]->OpCode    = DHCP4_TAG_PARA_LIST;
   OptList[Index]->Length    = 35;
   OptEnt.Para               = (PXEBC_DHCP4_OPTION_PARA *) OptList[Index]->Data;
-  OptEnt.Para->ParaList[0]  = PXEBC_DHCP4_TAG_NETMASK;
-  OptEnt.Para->ParaList[1]  = PXEBC_DHCP4_TAG_TIME_OFFSET;
-  OptEnt.Para->ParaList[2]  = PXEBC_DHCP4_TAG_ROUTER;
-  OptEnt.Para->ParaList[3]  = PXEBC_DHCP4_TAG_TIME_SERVER;
-  OptEnt.Para->ParaList[4]  = PXEBC_DHCP4_TAG_NAME_SERVER;
-  OptEnt.Para->ParaList[5]  = PXEBC_DHCP4_TAG_DNS_SERVER;
-  OptEnt.Para->ParaList[6]  = PXEBC_DHCP4_TAG_HOSTNAME;
-  OptEnt.Para->ParaList[7]  = PXEBC_DHCP4_TAG_BOOTFILE_LEN;
-  OptEnt.Para->ParaList[8]  = PXEBC_DHCP4_TAG_DOMAINNAME;
-  OptEnt.Para->ParaList[9]  = PXEBC_DHCP4_TAG_ROOTPATH;
-  OptEnt.Para->ParaList[10] = PXEBC_DHCP4_TAG_EXTEND_PATH;
-  OptEnt.Para->ParaList[11] = PXEBC_DHCP4_TAG_EMTU;
-  OptEnt.Para->ParaList[12] = PXEBC_DHCP4_TAG_TTL;
-  OptEnt.Para->ParaList[13] = PXEBC_DHCP4_TAG_BROADCAST;
-  OptEnt.Para->ParaList[14] = PXEBC_DHCP4_TAG_NIS_DOMAIN;
-  OptEnt.Para->ParaList[15] = PXEBC_DHCP4_TAG_NIS_SERVER;
-  OptEnt.Para->ParaList[16] = PXEBC_DHCP4_TAG_NTP_SERVER;
-  OptEnt.Para->ParaList[17] = PXEBC_DHCP4_TAG_VENDOR;
-  OptEnt.Para->ParaList[18] = PXEBC_DHCP4_TAG_REQUEST_IP;
-  OptEnt.Para->ParaList[19] = PXEBC_DHCP4_TAG_LEASE;
-  OptEnt.Para->ParaList[20] = PXEBC_DHCP4_TAG_SERVER_ID;
-  OptEnt.Para->ParaList[21] = PXEBC_DHCP4_TAG_T1;
-  OptEnt.Para->ParaList[22] = PXEBC_DHCP4_TAG_T2;
-  OptEnt.Para->ParaList[23] = PXEBC_DHCP4_TAG_CLASS_ID;
-  OptEnt.Para->ParaList[24] = PXEBC_DHCP4_TAG_TFTP;
-  OptEnt.Para->ParaList[25] = PXEBC_DHCP4_TAG_BOOTFILE;
-  OptEnt.Para->ParaList[26] = PXEBC_PXE_DHCP4_TAG_UUID;
+  OptEnt.Para->ParaList[0]  = DHCP4_TAG_NETMASK;
+  OptEnt.Para->ParaList[1]  = DHCP4_TAG_TIME_OFFSET;
+  OptEnt.Para->ParaList[2]  = DHCP4_TAG_ROUTER;
+  OptEnt.Para->ParaList[3]  = DHCP4_TAG_TIME_SERVER;
+  OptEnt.Para->ParaList[4]  = DHCP4_TAG_NAME_SERVER;
+  OptEnt.Para->ParaList[5]  = DHCP4_TAG_DNS_SERVER;
+  OptEnt.Para->ParaList[6]  = DHCP4_TAG_HOSTNAME;
+  OptEnt.Para->ParaList[7]  = DHCP4_TAG_BOOTFILE_LEN;
+  OptEnt.Para->ParaList[8]  = DHCP4_TAG_DOMAINNAME;
+  OptEnt.Para->ParaList[9]  = DHCP4_TAG_ROOTPATH;
+  OptEnt.Para->ParaList[10] = DHCP4_TAG_EXTEND_PATH;
+  OptEnt.Para->ParaList[11] = DHCP4_TAG_EMTU;
+  OptEnt.Para->ParaList[12] = DHCP4_TAG_TTL;
+  OptEnt.Para->ParaList[13] = DHCP4_TAG_BROADCAST;
+  OptEnt.Para->ParaList[14] = DHCP4_TAG_NIS_DOMAIN;
+  OptEnt.Para->ParaList[15] = DHCP4_TAG_NIS_SERVER;
+  OptEnt.Para->ParaList[16] = DHCP4_TAG_NTP_SERVER;
+  OptEnt.Para->ParaList[17] = DHCP4_TAG_VENDOR;
+  OptEnt.Para->ParaList[18] = DHCP4_TAG_REQUEST_IP;
+  OptEnt.Para->ParaList[19] = DHCP4_TAG_LEASE;
+  OptEnt.Para->ParaList[20] = DHCP4_TAG_SERVER_ID;
+  OptEnt.Para->ParaList[21] = DHCP4_TAG_T1;
+  OptEnt.Para->ParaList[22] = DHCP4_TAG_T2;
+  OptEnt.Para->ParaList[23] = DHCP4_TAG_CLASS_ID;
+  OptEnt.Para->ParaList[24] = DHCP4_TAG_TFTP;
+  OptEnt.Para->ParaList[25] = DHCP4_TAG_BOOTFILE;
+  OptEnt.Para->ParaList[26] = DHCP4_TAG_UUID;
   OptEnt.Para->ParaList[27] = 0x80;
   OptEnt.Para->ParaList[28] = 0x81;
   OptEnt.Para->ParaList[29] = 0x82;
   OptEnt.Para->ParaList[30] = 0x83;
   OptEnt.Para->ParaList[31] = 0x84;
@@ -307,11 +307,11 @@ PxeBcBuildDhcp4Options (
   OptList[Index]            = GET_NEXT_DHCP_OPTION (OptList[Index - 1]);
 
   //
   // Append UUID/Guid-based client identifier option
   //
-  OptList[Index]->OpCode  = PXEBC_PXE_DHCP4_TAG_UUID;
+  OptList[Index]->OpCode  = DHCP4_TAG_UUID;
   OptList[Index]->Length  = (UINT8) sizeof (PXEBC_DHCP4_OPTION_UUID);
   OptEnt.Uuid             = (PXEBC_DHCP4_OPTION_UUID *) OptList[Index]->Data;
   OptEnt.Uuid->Type       = 0;
   Index++;
   OptList[Index]          = GET_NEXT_DHCP_OPTION (OptList[Index - 1]);
@@ -324,11 +324,11 @@ PxeBcBuildDhcp4Options (
   }
 
   //
   // Append client network device interface option
   //
-  OptList[Index]->OpCode  = PXEBC_PXE_DHCP4_TAG_UNDI;
+  OptList[Index]->OpCode  = DHCP4_TAG_UNDI;
   OptList[Index]->Length  = (UINT8) sizeof (PXEBC_DHCP4_OPTION_UNDI);
   OptEnt.Undi             = (PXEBC_DHCP4_OPTION_UNDI *) OptList[Index]->Data;
 
   if (Private->Nii != NULL) {
     OptEnt.Undi->Type     = Private->Nii->Type;
@@ -344,22 +344,22 @@ PxeBcBuildDhcp4Options (
   OptList[Index] = GET_NEXT_DHCP_OPTION (OptList[Index - 1]);
 
   //
   // Append client system architecture option
   //
-  OptList[Index]->OpCode  = PXEBC_PXE_DHCP4_TAG_ARCH;
+  OptList[Index]->OpCode  = DHCP4_TAG_ARCH;
   OptList[Index]->Length  = (UINT8) sizeof (PXEBC_DHCP4_OPTION_ARCH);
   OptEnt.Arch             = (PXEBC_DHCP4_OPTION_ARCH *) OptList[Index]->Data;
   Value                   = HTONS (EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE);
   CopyMem (&OptEnt.Arch->Type, &Value, sizeof (UINT16));
   Index++;
   OptList[Index]          = GET_NEXT_DHCP_OPTION (OptList[Index - 1]);
 
   //
   // Append vendor class identify option
   //
-  OptList[Index]->OpCode  = PXEBC_DHCP4_TAG_CLASS_ID;
+  OptList[Index]->OpCode  = DHCP4_TAG_CLASS_ID;
   OptList[Index]->Length  = (UINT8) sizeof (PXEBC_DHCP4_OPTION_CLID);
   OptEnt.Clid             = (PXEBC_DHCP4_OPTION_CLID *) OptList[Index]->Data;
   CopyMem (
     OptEnt.Clid,
     DEFAULT_CLASS_ID_DATA,
@@ -412,11 +412,11 @@ PxeBcSeedDhcp4Packet (
   Header->HwType        = Mode.IfType;
   Header->HwAddrLen     = (UINT8) Mode.HwAddressSize;
   CopyMem (Header->ClientHwAddr, &Mode.CurrentAddress, Header->HwAddrLen);
 
   Seed->Dhcp4.Magik     = PXEBC_DHCP4_MAGIC;
-  Seed->Dhcp4.Option[0] = PXEBC_DHCP4_TAG_EOP;
+  Seed->Dhcp4.Option[0] = DHCP4_TAG_EOP;
 }
 
 
 /**
   Cache the DHCPv4 packet.
@@ -1178,11 +1178,11 @@ PxeBcDhcp4CallBack (
   // Override the Maximum DHCP Message Size.
   //
   MaxMsgSize = PxeBcParseDhcp4Options (
                  Packet->Dhcp4.Option,
                  GET_OPTION_BUFFER_LEN (Packet),
-                 PXEBC_DHCP4_TAG_MAXMSG
+                 DHCP4_TAG_MAXMSG
                  );
   if (MaxMsgSize != NULL) {
     Value = HTONS (PXEBC_DHCP4_PACKET_MAX_SIZE - 8);
     CopyMem (MaxMsgSize->Data, &Value, sizeof (Value));
   }
@@ -1354,18 +1354,18 @@ PxeBcDhcp4Discover (
     OptList[OptCount] = AllocateZeroPool (VendorOptLen);
     if (OptList[OptCount] == NULL) {
       return EFI_OUT_OF_RESOURCES;
     }
 
-    OptList[OptCount]->OpCode     = PXEBC_DHCP4_TAG_VENDOR;
+    OptList[OptCount]->OpCode     = DHCP4_TAG_VENDOR;
     OptList[OptCount]->Length     = (UINT8) (VendorOptLen - 2);
     PxeOpt                        = (EFI_DHCP4_PACKET_OPTION *) 
OptList[OptCount]->Data;
     PxeOpt->OpCode                = PXEBC_VENDOR_TAG_BOOT_ITEM;
     PxeOpt->Length                = (UINT8) sizeof (PXEBC_OPTION_BOOT_ITEM);
     PxeBootItem                   = (PXEBC_OPTION_BOOT_ITEM *) PxeOpt->Data;
     PxeBootItem->Type             = HTONS (Type);
-    PxeOpt->Data[PxeOpt->Length]  = PXEBC_DHCP4_TAG_EOP;
+    PxeOpt->Data[PxeOpt->Length]  = DHCP4_TAG_EOP;
 
     if (Layer != NULL) {
       PxeBootItem->Layer          = HTONS (*Layer);
     }
 
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h 
b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
index 248dc60..3aabaed 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
@@ -1,9 +1,9 @@
 /** @file
   Functions declaration related with DHCPv4 for UefiPxeBc Driver.
 
-  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2009 - 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
   http://opensource.org/licenses/bsd-license.php.
@@ -27,50 +27,10 @@
 #define PXEBC_DHCP4_OPCODE_REPLY           2
 #define PXEBC_DHCP4_MSG_TYPE_REQUEST       3
 #define PXEBC_DHCP4_MAGIC                  0x63538263 // network byte order
 
 //
-// Dhcp Options
-//
-#define PXEBC_DHCP4_TAG_PAD                0    // Pad Option
-#define PXEBC_DHCP4_TAG_EOP                255  // End Option
-#define PXEBC_DHCP4_TAG_NETMASK            1    // Subnet Mask
-#define PXEBC_DHCP4_TAG_TIME_OFFSET        2    // Time Offset from UTC
-#define PXEBC_DHCP4_TAG_ROUTER             3    // Router option,
-#define PXEBC_DHCP4_TAG_TIME_SERVER        4    // Time Server
-#define PXEBC_DHCP4_TAG_NAME_SERVER        5    // Name Server
-#define PXEBC_DHCP4_TAG_DNS_SERVER         6    // Domain Name Server
-#define PXEBC_DHCP4_TAG_HOSTNAME           12   // Host Name
-#define PXEBC_DHCP4_TAG_BOOTFILE_LEN       13   // Boot File Size
-#define PXEBC_DHCP4_TAG_DUMP               14   // Merit Dump File
-#define PXEBC_DHCP4_TAG_DOMAINNAME         15   // Domain Name
-#define PXEBC_DHCP4_TAG_ROOTPATH           17   // Root path
-#define PXEBC_DHCP4_TAG_EXTEND_PATH        18   // Extensions Path
-#define PXEBC_DHCP4_TAG_EMTU               22   // Maximum Datagram Reassembly 
Size
-#define PXEBC_DHCP4_TAG_TTL                23   // Default IP Time-to-live
-#define PXEBC_DHCP4_TAG_BROADCAST          28   // Broadcast Address
-#define PXEBC_DHCP4_TAG_NIS_DOMAIN         40   // Network Information Service 
Domain
-#define PXEBC_DHCP4_TAG_NIS_SERVER         41   // Network Information Servers
-#define PXEBC_DHCP4_TAG_NTP_SERVER         42   // Network Time Protocol 
Servers
-#define PXEBC_DHCP4_TAG_VENDOR             43   // Vendor Specific Information
-#define PXEBC_DHCP4_TAG_REQUEST_IP         50   // Requested IP Address
-#define PXEBC_DHCP4_TAG_LEASE              51   // IP Address Lease Time
-#define PXEBC_DHCP4_TAG_OVERLOAD           52   // Option Overload
-#define PXEBC_DHCP4_TAG_MSG_TYPE           53   // DHCP Message Type
-#define PXEBC_DHCP4_TAG_SERVER_ID          54   // Server Identifier
-#define PXEBC_DHCP4_TAG_PARA_LIST          55   // Parameter Request List
-#define PXEBC_DHCP4_TAG_MAXMSG             57   // Maximum DHCP Message Size
-#define PXEBC_DHCP4_TAG_T1                 58   // Renewal (T1) Time Value
-#define PXEBC_DHCP4_TAG_T2                 59   // Rebinding (T2) Time Value
-#define PXEBC_DHCP4_TAG_CLASS_ID           60   // Vendor class identifier
-#define PXEBC_DHCP4_TAG_CLIENT_ID          61   // Client-identifier
-#define PXEBC_DHCP4_TAG_TFTP               66   // TFTP server name
-#define PXEBC_DHCP4_TAG_BOOTFILE           67   // Bootfile name
-#define PXEBC_PXE_DHCP4_TAG_ARCH           93
-#define PXEBC_PXE_DHCP4_TAG_UNDI           94
-#define PXEBC_PXE_DHCP4_TAG_UUID           97
-//
 // Sub-Options in Dhcp Vendor Option
 //
 #define PXEBC_VENDOR_TAG_MTFTP_IP          1
 #define PXEBC_VENDOR_TAG_MTFTP_CPORT       2
 #define PXEBC_VENDOR_TAG_MTFTP_SPORT       3
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c 
b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
index 8003f31..41d3d30 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
@@ -90,22 +90,22 @@ PxeBcBuildDhcp6Options (
   OptList[0]  = (EFI_DHCP6_PACKET_OPTION *) Buffer;
 
   //
   // Append client option request option
   //
-  OptList[Index]->OpCode     = HTONS (PXEBC_DHCP6_OPT_ORO);
+  OptList[Index]->OpCode     = HTONS (DHCP6_OPT_ORO);
   OptList[Index]->OpLen      = HTONS (4);
   OptEnt.Oro                 = (PXEBC_DHCP6_OPTION_ORO *) OptList[Index]->Data;
-  OptEnt.Oro->OpCode[0]      = HTONS(PXEBC_DHCP6_OPT_BOOT_FILE_URL);
-  OptEnt.Oro->OpCode[1]      = HTONS(PXEBC_DHCP6_OPT_BOOT_FILE_PARAM);
+  OptEnt.Oro->OpCode[0]      = HTONS(DHCP6_OPT_BOOT_FILE_URL);
+  OptEnt.Oro->OpCode[1]      = HTONS(DHCP6_OPT_BOOT_FILE_PARAM);
   Index++;
   OptList[Index]             = GET_NEXT_DHCP6_OPTION (OptList[Index - 1]);
 
   //
   // Append client network device interface option
   //
-  OptList[Index]->OpCode     = HTONS (PXEBC_DHCP6_OPT_UNDI);
+  OptList[Index]->OpCode     = HTONS (DHCP6_OPT_UNDI);
   OptList[Index]->OpLen      = HTONS ((UINT16)3);
   OptEnt.Undi                = (PXEBC_DHCP6_OPTION_UNDI *) 
OptList[Index]->Data;
 
   if (Private->Nii != NULL) {
     OptEnt.Undi->Type        = Private->Nii->Type;
@@ -121,22 +121,22 @@ PxeBcBuildDhcp6Options (
   OptList[Index]             = GET_NEXT_DHCP6_OPTION (OptList[Index - 1]);
 
   //
   // Append client system architecture option
   //
-  OptList[Index]->OpCode     = HTONS (PXEBC_DHCP6_OPT_ARCH);
+  OptList[Index]->OpCode     = HTONS (DHCP6_OPT_ARCH);
   OptList[Index]->OpLen      = HTONS ((UINT16) sizeof 
(PXEBC_DHCP6_OPTION_ARCH));
   OptEnt.Arch                = (PXEBC_DHCP6_OPTION_ARCH *) 
OptList[Index]->Data;
   Value                      = HTONS (EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE);
   CopyMem (&OptEnt.Arch->Type, &Value, sizeof (UINT16));
   Index++;
   OptList[Index]             = GET_NEXT_DHCP6_OPTION (OptList[Index - 1]);
 
   //
   // Append vendor class option to store the PXE class identifier.
   //
-  OptList[Index]->OpCode       = HTONS (PXEBC_DHCP6_OPT_VENDOR_CLASS);
+  OptList[Index]->OpCode       = HTONS (DHCP6_OPT_VENDOR_CLASS);
   OptList[Index]->OpLen        = HTONS ((UINT16) sizeof 
(PXEBC_DHCP6_OPTION_VENDOR_CLASS));
   OptEnt.VendorClass           = (PXEBC_DHCP6_OPTION_VENDOR_CLASS *) 
OptList[Index]->Data;
   OptEnt.VendorClass->Vendor   = HTONL (PXEBC_DHCP6_ENTERPRISE_NUM);
   OptEnt.VendorClass->ClassLen = HTONS ((UINT16) sizeof (PXEBC_CLASS_ID));
   CopyMem (
@@ -469,20 +469,20 @@ PxeBcParseDhcp6Packet (
   //
   // OpLen and OpCode here are both stored in network order, since they are 
from original packet.
   //
   while (Offset < Length) {
 
-    if (NTOHS (Option->OpCode) == PXEBC_DHCP6_OPT_IA_NA) {
+    if (NTOHS (Option->OpCode) == DHCP6_OPT_IA_NA) {
       Options[PXEBC_DHCP6_IDX_IA_NA] = Option;
-    } else if (NTOHS (Option->OpCode) == PXEBC_DHCP6_OPT_BOOT_FILE_URL) {
+    } else if (NTOHS (Option->OpCode) == DHCP6_OPT_BOOT_FILE_URL) {
       //
       // The server sends this option to inform the client about an URL to a 
boot file.
       //
       Options[PXEBC_DHCP6_IDX_BOOT_FILE_URL] = Option;
-    } else if (NTOHS (Option->OpCode) == PXEBC_DHCP6_OPT_BOOT_FILE_PARAM) {
+    } else if (NTOHS (Option->OpCode) == DHCP6_OPT_BOOT_FILE_PARAM) {
       Options[PXEBC_DHCP6_IDX_BOOT_FILE_PARAM] = Option;
-    } else if (NTOHS (Option->OpCode) == PXEBC_DHCP6_OPT_VENDOR_CLASS) {
+    } else if (NTOHS (Option->OpCode) == DHCP6_OPT_VENDOR_CLASS) {
       Options[PXEBC_DHCP6_IDX_VENDOR_CLASS] = Option;
     }
 
     Offset += (NTOHS (Option->OpLen) + 4);
     Option  = (EFI_DHCP6_PACKET_OPTION *) (Offer->Dhcp6.Option + Offset);
@@ -495,11 +495,11 @@ PxeBcParseDhcp6Packet (
   Option = Options[PXEBC_DHCP6_IDX_IA_NA];
   if (Option != NULL) {
     Option = PxeBcParseDhcp6Options (
                Option->Data + 12,
                NTOHS (Option->OpLen),
-               PXEBC_DHCP6_OPT_STATUS_CODE
+               DHCP6_OPT_STATUS_CODE
                );
     if ((Option != NULL && Option->Data[0] == 0) || (Option == NULL)) {
       IsProxyOffer = FALSE;
     }
   }
@@ -711,11 +711,11 @@ PxeBcRequestBootService (
   // Find Server ID Option from ProxyOffer.
   //
   Option = PxeBcDhcp6SeekOption (
              ProxyOffer->Dhcp6.Option,
              ProxyOffer->Length - 4,
-             PXEBC_DHCP6_OPT_SERVER_ID
+             DHCP6_OPT_SERVER_ID
              );
   if (Option == NULL) {
     return EFI_NOT_FOUND;
   }
   
@@ -730,11 +730,11 @@ PxeBcRequestBootService (
   while (RequestLen < Request->Length) {
     OpCode = NTOHS (((EFI_DHCP6_PACKET_OPTION *) RequestOpt)->OpCode);
     OpLen  = NTOHS (((EFI_DHCP6_PACKET_OPTION *) RequestOpt)->OpLen);
     if (OpCode != EFI_DHCP6_IA_TYPE_NA &&
         OpCode != EFI_DHCP6_IA_TYPE_TA &&
-        OpCode != PXEBC_DHCP6_OPT_SERVER_ID
+        OpCode != DHCP6_OPT_SERVER_ID
         ) {
       //
       // Copy all the options except IA option and Server ID
       //
       CopyMem (DiscoverOpt, RequestOpt, OpLen + 4);
@@ -749,11 +749,11 @@ PxeBcRequestBootService (
   // Update Elapsed option in the package 
   //
   Option = PxeBcDhcp6SeekOption (
              Discover->DhcpOptions,
              (UINT32)(RequestLen - 4),
-             PXEBC_DHCP6_OPT_ELAPSED_TIME
+             DHCP6_OPT_ELAPSED_TIME
              );
   if (Option != NULL) {
     CalcElapsedTime (Private);
     WriteUnaligned16 ((UINT16*)(Option + 4), HTONS((UINT16) 
Private->ElapsedTime));
   }  
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h 
b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h
index 38bf265..a6d52f9 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h
@@ -1,9 +1,9 @@
 /** @file
   Functions declaration related with DHCPv6 for UefiPxeBc Driver.
 
-  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2009 - 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
   http://opensource.org/licenses/bsd-license.php.
@@ -23,33 +23,10 @@
 #define PXEBC_IP6_ROUTE_TABLE_TIMEOUT     10
 
 #define PXEBC_DHCP6_S_PORT                547
 #define PXEBC_DHCP6_C_PORT                546
 
-#define PXEBC_DHCP6_OPT_CLIENT_ID         1
-#define PXEBC_DHCP6_OPT_SERVER_ID         2
-#define PXEBC_DHCP6_OPT_IA_NA             3
-#define PXEBC_DHCP6_OPT_IA_TA             4
-#define PXEBC_DHCP6_OPT_IAADDR            5
-#define PXEBC_DHCP6_OPT_ORO               6
-#define PXEBC_DHCP6_OPT_PREFERENCE        7
-#define PXEBC_DHCP6_OPT_ELAPSED_TIME      8
-#define PXEBC_DHCP6_OPT_REPLAY_MSG        9
-#define PXEBC_DHCP6_OPT_AUTH              11
-#define PXEBC_DHCP6_OPT_UNICAST           12
-#define PXEBC_DHCP6_OPT_STATUS_CODE       13
-#define PXEBC_DHCP6_OPT_RAPID_COMMIT      14
-#define PXEBC_DHCP6_OPT_USER_CLASS        15
-#define PXEBC_DHCP6_OPT_VENDOR_CLASS      16
-#define PXEBC_DHCP6_OPT_VENDOR_OPTS       17
-#define PXEBC_DHCP6_OPT_INTERFACE_ID      18
-#define PXEBC_DHCP6_OPT_RECONFIG_MSG      19
-#define PXEBC_DHCP6_OPT_RECONFIG_ACCEPT   20
-#define PXEBC_DHCP6_OPT_BOOT_FILE_URL     59    // Assigned by IANA, RFC 5970
-#define PXEBC_DHCP6_OPT_BOOT_FILE_PARAM   60    // Assigned by IANA, RFC 5970
-#define PXEBC_DHCP6_OPT_ARCH              61    // Assigned by IANA, RFC 5970
-#define PXEBC_DHCP6_OPT_UNDI              62    // Assigned by IANA, RFC 5970
 #define PXEBC_DHCP6_ENTERPRISE_NUM        343   // TODO: IANA TBD: temporarily 
using Intel's
 #define PXEBC_DHCP6_MAX_BOOT_FILE_SIZE    65535 //   It's a limitation of bit 
length, 65535*512 bytes.
 
 
 #define PXEBC_DHCP6_IDX_IA_NA             0
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h 
b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h
index ac7dc87..d0f5e5b 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h
@@ -1,10 +1,10 @@
 /** @file
   This EFI_PXE_BASE_CODE_PROTOCOL and EFI_LOAD_FILE_PROTOCOL.
   interfaces declaration.
 
-  Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2007 - 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
   http://opensource.org/licenses/bsd-license.php.
@@ -19,10 +19,11 @@
 
 #include <Uefi.h>
 
 #include <Guid/SmBios.h>
 #include <IndustryStandard/SmBios.h>
+#include <IndustryStandard/Dhcp.h>
 #include <Protocol/NetworkInterfaceIdentifier.h>
 #include <Protocol/Arp.h>
 #include <Protocol/Ip4.h>
 #include <Protocol/Ip4Config2.h>
 #include <Protocol/Ip6.h>
-- 
1.9.5.msysgit.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to