]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Define IPv4_ADDRESS and IPv6_ADDRESS in Base.h
authorRuiyu Ni <ruiyu.ni@intel.com>
Mon, 13 Feb 2017 10:08:24 +0000 (18:08 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Tue, 28 Feb 2017 03:30:31 +0000 (11:30 +0800)
Since the following patch needs to add API converting string
to IP address in BaseLib, define the IP address as base types
in Base.h.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/Base.h
MdePkg/Include/Uefi/UefiBaseType.h

index 8f5b919faaf153411d084dadbb146e68a943d12a..5b311f6648e6e46c6daaf8a7849b41920101992d 100644 (file)
@@ -6,7 +6,7 @@
   environment. There are a set of base libraries in the Mde Package that can\r
   be used to implement base modules.\r
 \r
   environment. There are a set of base libraries in the Mde Package that can\r
   be used to implement base modules.\r
 \r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -265,6 +265,20 @@ typedef struct {
   UINT8   Data4[8];\r
 } GUID;\r
 \r
   UINT8   Data4[8];\r
 } GUID;\r
 \r
+///\r
+/// 4-byte buffer. An IPv4 internet protocol address.\r
+///\r
+typedef struct {\r
+  UINT8 Addr[4];\r
+} IPv4_ADDRESS;\r
+\r
+///\r
+/// 16-byte buffer. An IPv6 internet protocol address.\r
+///\r
+typedef struct {\r
+  UINT8 Addr[16];\r
+} IPv6_ADDRESS;\r
+\r
 //\r
 // 8-bytes unsigned value that represents a physical system address.\r
 //\r
 //\r
 // 8-bytes unsigned value that represents a physical system address.\r
 //\r
index 84e4dc65bf7d1e3c051ba9bde3657835ca84f2be..728a0472602a1f2060d85302a532449e074d5d0e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Defines data types and constants introduced in UEFI.\r
 \r
 /** @file\r
   Defines data types and constants introduced in UEFI.\r
 \r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
 Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials are licensed and made available under \r
 Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials are licensed and made available under \r
@@ -87,16 +87,12 @@ typedef struct {
 ///\r
 /// 4-byte buffer. An IPv4 internet protocol address.\r
 ///\r
 ///\r
 /// 4-byte buffer. An IPv4 internet protocol address.\r
 ///\r
-typedef struct {\r
-  UINT8 Addr[4];\r
-} EFI_IPv4_ADDRESS;\r
+typedef IPv4_ADDRESS EFI_IPv4_ADDRESS;\r
 \r
 ///\r
 /// 16-byte buffer. An IPv6 internet protocol address.\r
 ///\r
 \r
 ///\r
 /// 16-byte buffer. An IPv6 internet protocol address.\r
 ///\r
-typedef struct {\r
-  UINT8 Addr[16];\r
-} EFI_IPv6_ADDRESS;\r
+typedef IPv6_ADDRESS EFI_IPv6_ADDRESS;\r
 \r
 ///\r
 /// 32-byte buffer containing a network Media Access Control address.\r
 \r
 ///\r
 /// 32-byte buffer containing a network Media Access Control address.\r