From: Ruiyu Ni <ruiyu.ni@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>
Subject: [PATCH v2 01/11] MdePkg: Define IPv4_ADDRESS and IPv6_ADDRESS in Base.h
Date: Mon, 27 Feb 2017 15:22:29 +0800 [thread overview]
Message-ID: <20170227072239.273228-2-ruiyu.ni@intel.com> (raw)
In-Reply-To: <20170227072239.273228-1-ruiyu.ni@intel.com>
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>
Cc: Liming Gao <liming.gao@intel.com>
---
MdePkg/Include/Base.h | 16 +++++++++++++++-
MdePkg/Include/Uefi/UefiBaseType.h | 10 +++-------
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 8f5b919..5b311f6 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -6,7 +6,7 @@
environment. There are a set of base libraries in the Mde Package that can
be used to implement base modules.
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -265,6 +265,20 @@ typedef struct {
UINT8 Data4[8];
} GUID;
+///
+/// 4-byte buffer. An IPv4 internet protocol address.
+///
+typedef struct {
+ UINT8 Addr[4];
+} IPv4_ADDRESS;
+
+///
+/// 16-byte buffer. An IPv6 internet protocol address.
+///
+typedef struct {
+ UINT8 Addr[16];
+} IPv6_ADDRESS;
+
//
// 8-bytes unsigned value that represents a physical system address.
//
diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h
index 84e4dc6..728a047 100644
--- a/MdePkg/Include/Uefi/UefiBaseType.h
+++ b/MdePkg/Include/Uefi/UefiBaseType.h
@@ -1,7 +1,7 @@
/** @file
Defines data types and constants introduced in UEFI.
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
@@ -87,16 +87,12 @@ typedef struct {
///
/// 4-byte buffer. An IPv4 internet protocol address.
///
-typedef struct {
- UINT8 Addr[4];
-} EFI_IPv4_ADDRESS;
+typedef IPv4_ADDRESS EFI_IPv4_ADDRESS;
///
/// 16-byte buffer. An IPv6 internet protocol address.
///
-typedef struct {
- UINT8 Addr[16];
-} EFI_IPv6_ADDRESS;
+typedef IPv6_ADDRESS EFI_IPv6_ADDRESS;
///
/// 32-byte buffer containing a network Media Access Control address.
--
2.9.0.windows.1
next prev parent reply other threads:[~2017-02-27 7:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 7:22 [PATCH v2 00/11] Add StrToGuid/HexToBytes/Ipv4/Ipv6 in BaseLib Ruiyu Ni
2017-02-27 7:22 ` Ruiyu Ni [this message]
2017-02-27 7:22 ` [PATCH v2 02/11] MdePkg/UefiDevicePathLib: Rename StrToGuid to avoid link failure Ruiyu Ni
2017-02-27 7:22 ` [PATCH v2 03/11] SignedCapsulePkg/IniParsing: " Ruiyu Ni
2017-02-27 7:51 ` Yao, Jiewen
2017-02-27 7:22 ` [PATCH v2 04/11] MdePkg/BaseLib: Add StrToGuid/StrHexToBytes/StrToIpv[4/6]Address Ruiyu Ni
2017-02-28 5:23 ` Fu, Siyuan
2017-02-27 7:22 ` [PATCH v2 05/11] MdePkg/BaseLib: Add AsciiStrToGuid/HexToBytes/ToIpv[4/6]Address Ruiyu Ni
2017-02-27 7:22 ` [PATCH v2 06/11] MdePkg/UefiDevicePathLib: Use BaseLib string conversion services Ruiyu Ni
2017-02-27 7:22 ` [PATCH v2 07/11] MdeModulePkg/CapsuleApp: Use StrToGuid in BaseLib Ruiyu Ni
2017-02-27 7:50 ` Yao, Jiewen
2017-02-27 7:22 ` [PATCH v2 08/11] SecurityPkg/SecureBootConfigDxe: " Ruiyu Ni
2017-02-27 7:22 ` [PATCH v2 09/11] ShellPkg/Debug1CommandLib: Use StrToGuid/StrHexToBytes " Ruiyu Ni
2017-02-28 17:05 ` Carsey, Jaben
2017-02-27 7:22 ` [PATCH v2 10/11] SignedCapsulePkg/IniParsingLib: Use AsciiStrToGuid " Ruiyu Ni
2017-02-27 7:50 ` Yao, Jiewen
2017-02-27 7:22 ` [PATCH v2 11/11] MdeModulePkg/NetLib: Use StrToIpv4/6Address " Ruiyu Ni
2017-02-28 3:23 ` [PATCH v2 00/11] Add StrToGuid/HexToBytes/Ipv4/Ipv6 " Gao, Liming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170227072239.273228-2-ruiyu.ni@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox