From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id ADA848221C for ; Tue, 21 Feb 2017 20:50:51 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Feb 2017 20:50:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,192,1484035200"; d="scan'208";a="1100867134" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.25]) by orsmga001.jf.intel.com with ESMTP; 21 Feb 2017 20:50:50 -0800 From: Ruiyu Ni To: edk2-devel@lists.01.org Cc: Liming Gao Date: Wed, 22 Feb 2017 12:50:37 +0800 Message-Id: <20170222045047.558308-2-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.9.0.windows.1 In-Reply-To: <20170222045047.558308-1-ruiyu.ni@intel.com> References: <20170222045047.558308-1-ruiyu.ni@intel.com> Subject: [PATCH 01/11] MdePkg: Define IPv4_ADDRESS and IPv6_ADDRESS in Base.h X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2017 04:50:51 -0000 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 Cc: Liming Gao --- 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.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
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.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.
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