public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jiaxin Wu <jiaxin.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Ye Ting <ting.ye@intel.com>, Fu Siyuan <siyuan.fu@intel.com>,
	Wu Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch 1/2] MdePkg/Http.h: Clarify the usage of HttpConfigData in HTTP protocol
Date: Thu, 28 Sep 2017 13:41:49 +0800	[thread overview]
Message-ID: <1506577310-40432-2-git-send-email-jiaxin.wu@intel.com> (raw)
In-Reply-To: <1506577310-40432-1-git-send-email-jiaxin.wu@intel.com>

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
 MdePkg/Include/Protocol/Http.h | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/MdePkg/Include/Protocol/Http.h b/MdePkg/Include/Protocol/Http.h
index 297d9c3..bdcd7b1 100644
--- a/MdePkg/Include/Protocol/Http.h
+++ b/MdePkg/Include/Protocol/Http.h
@@ -303,19 +303,21 @@ typedef struct {
   The GetModeData() function is used to read the current mode data (operational
   parameters) for this HTTP protocol instance.
 
   @param[in]  This                Pointer to EFI_HTTP_PROTOCOL instance.
   @param[out] HttpConfigData      Point to buffer for operational parameters of this
-                                  HTTP instance.
+                                  HTTP instance. It is the responsibility of the caller 
+                                  to allocate the memory for HttpConfigData and 
+                                  HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact, 
+                                  it is recommended to allocate sufficient memory to record 
+                                  IPv6Node since it is big enough for all possibilities.
 
   @retval EFI_SUCCESS             Operation succeeded.
   @retval EFI_INVALID_PARAMETER   This is NULL.
                                   HttpConfigData is NULL.
-                                  HttpInstance->LocalAddressIsIPv6 is FALSE and
-                                  HttpConfigData->IPv4Node is NULL.
-                                  HttpInstance->LocalAddressIsIPv6 is TRUE and
-                                  HttpConfigData->IPv6Node is NULL.
+                                  HttpConfigData->AccessPoint.IPv4Node or 
+                                  HttpConfigData->AccessPoint.IPv6Node is NULL.
   @retval EFI_NOT_STARTED         This EFI HTTP Protocol instance has not been started.
 **/
 typedef
 EFI_STATUS
 (EFIAPI *EFI_HTTP_GET_MODE_DATA)(
@@ -341,13 +343,13 @@ EFI_STATUS
 
   @retval EFI_SUCCESS             Operation succeeded.
   @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:
                                   This is NULL.
                                   HttpConfigData->LocalAddressIsIPv6 is FALSE and
-                                  HttpConfigData->IPv4Node is NULL.
+                                  HttpConfigData->AccessPoint.IPv4Node is NULL.
                                   HttpConfigData->LocalAddressIsIPv6 is TRUE and
-                                  HttpConfigData->IPv6Node is NULL.
+                                  HttpConfigData->AccessPoint.IPv6Node is NULL.
   @retval EFI_ALREADY_STARTED     Reinitialize this HTTP instance without calling
                                   Configure() with NULL to reset it.
   @retval EFI_DEVICE_ERROR        An unexpected system or network error occurred.
   @retval EFI_OUT_OF_RESOURCES    Could not allocate enough system resources when
                                   executing Configure().
-- 
1.9.5.msysgit.1



  reply	other threads:[~2017-09-28  5:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28  5:41 [Patch 0/2] Clarify the usage of HttpConfigData in HTTP protocol Jiaxin Wu
2017-09-28  5:41 ` Jiaxin Wu [this message]
2017-09-28  5:41 ` [Patch 2/2] NetworkPkg/HttpDxe: " Jiaxin Wu
2017-09-28  7:23 ` [Patch 0/2] " Fu, Siyuan
2017-09-28  7:35 ` Ye, Ting

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=1506577310-40432-2-git-send-email-jiaxin.wu@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