mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 23:24:03 +02:00
NetworkPkg/HttpDxe: Clarify the usage of HttpConfigData in HTTP protocol
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> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
This commit is contained in:
parent
bf06b383e6
commit
de15f8b6ef
@ -33,16 +33,18 @@ EFI_HTTP_PROTOCOL mEfiHttpTemplate = {
|
|||||||
|
|
||||||
@param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
|
@param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
|
||||||
@param[out] HttpConfigData Point to buffer for operational parameters of this
|
@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_SUCCESS Operation succeeded.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||||
This is NULL.
|
This is NULL.
|
||||||
HttpConfigData is NULL.
|
HttpConfigData is NULL.
|
||||||
HttpInstance->LocalAddressIsIPv6 is FALSE and
|
HttpConfigData->AccessPoint.IPv4Node or
|
||||||
HttpConfigData->IPv4Node is NULL.
|
HttpConfigData->AccessPoint.IPv6Node is NULL.
|
||||||
HttpInstance->LocalAddressIsIPv6 is TRUE and
|
|
||||||
HttpConfigData->IPv6Node is NULL.
|
|
||||||
@retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.
|
@retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -65,8 +67,8 @@ EfiHttpGetModeData (
|
|||||||
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
|
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
|
||||||
ASSERT (HttpInstance != NULL);
|
ASSERT (HttpInstance != NULL);
|
||||||
|
|
||||||
if ((HttpInstance->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv6Node == NULL) ||
|
if ((HttpConfigData->AccessPoint.IPv6Node == NULL) ||
|
||||||
(!HttpInstance->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv4Node == NULL)) {
|
(HttpConfigData->AccessPoint.IPv4Node == NULL)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,9 +117,9 @@ EfiHttpGetModeData (
|
|||||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||||
This is NULL.
|
This is NULL.
|
||||||
HttpConfigData->LocalAddressIsIPv6 is FALSE and
|
HttpConfigData->LocalAddressIsIPv6 is FALSE and
|
||||||
HttpConfigData->IPv4Node is NULL.
|
HttpConfigData->AccessPoint.IPv4Node is NULL.
|
||||||
HttpConfigData->LocalAddressIsIPv6 is TRUE and
|
HttpConfigData->LocalAddressIsIPv6 is TRUE and
|
||||||
HttpConfigData->IPv6Node is NULL.
|
HttpConfigData->AccessPoint.IPv6Node is NULL.
|
||||||
@retval EFI_ALREADY_STARTED Reinitialize this HTTP instance without calling
|
@retval EFI_ALREADY_STARTED Reinitialize this HTTP instance without calling
|
||||||
Configure() with NULL to reset it.
|
Configure() with NULL to reset it.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The header files of implementation of EFI_HTTP_PROTOCOL protocol interfaces.
|
The header files of implementation of EFI_HTTP_PROTOCOL protocol interfaces.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
@ -33,16 +33,18 @@
|
|||||||
|
|
||||||
@param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
|
@param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
|
||||||
@param[out] HttpConfigData Point to buffer for operational parameters of this
|
@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_SUCCESS Operation succeeded.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||||
This is NULL.
|
This is NULL.
|
||||||
HttpConfigData is NULL.
|
HttpConfigData is NULL.
|
||||||
HttpInstance->LocalAddressIsIPv6 is FALSE and
|
HttpConfigData->AccessPoint.IPv4Node or
|
||||||
HttpConfigData->IPv4Node is NULL.
|
HttpConfigData->AccessPoint.IPv6Node is NULL.
|
||||||
HttpInstance->LocalAddressIsIPv6 is TRUE and
|
|
||||||
HttpConfigData->IPv6Node is NULL.
|
|
||||||
@retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.
|
@retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -73,9 +75,9 @@ EfiHttpGetModeData (
|
|||||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||||
This is NULL.
|
This is NULL.
|
||||||
HttpConfigData->LocalAddressIsIPv6 is FALSE and
|
HttpConfigData->LocalAddressIsIPv6 is FALSE and
|
||||||
HttpConfigData->IPv4Node is NULL.
|
HttpConfigData->AccessPoint.IPv4Node is NULL.
|
||||||
HttpConfigData->LocalAddressIsIPv6 is TRUE and
|
HttpConfigData->LocalAddressIsIPv6 is TRUE and
|
||||||
HttpConfigData->IPv6Node is NULL.
|
HttpConfigData->AccessPoint.IPv6Node is NULL.
|
||||||
@retval EFI_ALREADY_STARTED Reinitialize this HTTP instance without calling
|
@retval EFI_ALREADY_STARTED Reinitialize this HTTP instance without calling
|
||||||
Configure() with NULL to reset it.
|
Configure() with NULL to reset it.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user