]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpDxe/HttpImpl.h
NetworkPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / NetworkPkg / HttpDxe / HttpImpl.h
index 49c8af1b2100f4a75565152e000ef5fd7d651063..ec6992f4aeb9df529ba35e23293a1f519a8d1f84 100644 (file)
@@ -1,15 +1,10 @@
 /** @file\r
   The header files of implementation of EFI_HTTP_PROTOCOL protocol interfaces.\r
 \r
-  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 \r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php.\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 #define HTTP_DEFAULT_PORT        80\r
 #define HTTP_END_OF_HDR_STR      "\r\n\r\n"\r
 #define HTTP_CRLF_STR            "\r\n"\r
-#define HTTP_VERSION_STR         "HTTP/1.1"\r
+#define HTTP_VERSION_STR         HTTP_VERSION\r
 #define HTTP_VERSION_CRLF_STR    " HTTP/1.1\r\n"\r
-#define HTTP_GET_STR             "GET "\r
-#define HTTP_HEAD_STR            "HEAD "\r
-//\r
-// Connect method has maximum length according to EFI_HTTP_METHOD defined in\r
-// UEFI2.5 spec so use this.\r
-//\r
-#define HTTP_MAXIMUM_METHOD_LEN  sizeof ("CONNECT")\r
+#define HTTP_ERROR_OR_NOT_SUPPORT_STATUS_CODE         300\r
+\r
 \r
 /**\r
   Returns the operational parameters for the current HTTP child instance.\r
 \r
   @param[in]  This                Pointer to EFI_HTTP_PROTOCOL instance.\r
   @param[out] HttpConfigData      Point to buffer for operational parameters of this\r
-                                  HTTP instance.\r
+                                  HTTP instance. It is the responsibility of the caller\r
+                                  to allocate the memory for HttpConfigData and\r
+                                  HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact,\r
+                                  it is recommended to allocate sufficient memory to record\r
+                                  IPv6Node since it is big enough for all possibilities.\r
 \r
   @retval EFI_SUCCESS             Operation succeeded.\r
   @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
                                   This is NULL.\r
                                   HttpConfigData is NULL.\r
-                                  HttpConfigData->AccessPoint is NULL.\r
-  @retval EFI_NOT_STARTED         The HTTP instance is not configured.\r
+                                  HttpConfigData->AccessPoint.IPv4Node or\r
+                                  HttpConfigData->AccessPoint.IPv6Node is NULL.\r
+  @retval EFI_NOT_STARTED         This EFI HTTP Protocol instance has not been started.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -64,8 +59,8 @@ EfiHttpGetModeData (
   connections with remote hosts, canceling all asynchronous tokens, and flush request\r
   and response buffers without informing the appropriate hosts.\r
 \r
-  Except for GetModeData() and Configure(), No other EFI HTTP function can be executed\r
-  by this instance until the Configure() function is executed and returns successfully.\r
+  No other EFI HTTP function can be executed by this instance until the Configure()\r
+  function is executed and returns successfully.\r
 \r
   @param[in]  This                Pointer to EFI_HTTP_PROTOCOL instance.\r
   @param[in]  HttpConfigData      Pointer to the configure data to configure the instance.\r
@@ -74,9 +69,9 @@ EfiHttpGetModeData (
   @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
                                   This is NULL.\r
                                   HttpConfigData->LocalAddressIsIPv6 is FALSE and\r
-                                  HttpConfigData->IPv4Node is NULL.\r
+                                  HttpConfigData->AccessPoint.IPv4Node is NULL.\r
                                   HttpConfigData->LocalAddressIsIPv6 is TRUE and\r
-                                  HttpConfigData->IPv6Node is NULL.\r
+                                  HttpConfigData->AccessPoint.IPv6Node is NULL.\r
   @retval EFI_ALREADY_STARTED     Reinitialize this HTTP instance without calling\r
                                   Configure() with NULL to reset it.\r
   @retval EFI_DEVICE_ERROR        An unexpected system or network error occurred.\r
@@ -111,6 +106,7 @@ EfiHttpConfigure (
                                   implementation.\r
   @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
                                   This is NULL.\r
+                                  Token is NULL.\r
                                   Token->Message is NULL.\r
                                   Token->Message->Body is not NULL,\r
                                   Token->Message->BodyLength is non-zero, and\r
@@ -141,8 +137,6 @@ EfiHttpRequest (
   @retval EFI_SUCCESS             Request and Response queues are successfully flushed.\r
   @retval EFI_INVALID_PARAMETER   This is NULL.\r
   @retval EFI_NOT_STARTED         This instance hasn't been configured.\r
-  @retval EFI_NO_MAPPING          When using the default address, configuration (DHCP,\r
-                                  BOOTP, RARP, etc.) hasn't finished yet.\r
   @retval EFI_NOT_FOUND           The asynchronous request or response token is not\r
                                   found.\r
   @retval EFI_UNSUPPORTED         The implementation does not support this function.\r
@@ -156,7 +150,7 @@ EfiHttpCancel (
 \r
 /**\r
   The Response() function queues an HTTP response to this HTTP instance, similar to\r
-  Receive() function in the EFI TCP driver. When the HTTP request is sent successfully,\r
+  Receive() function in the EFI TCP driver. When the HTTP response is received successfully,\r
   or if there is an error, Status in token will be updated and Event will be signaled.\r
 \r
   The HTTP driver will queue a receive token to the underlying TCP instance. When data\r