--- /dev/null
+/** @file\r
+ This file defines the EFI HTTP Boot Callback Protocol interface.\r
+\r
+ Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\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
+\r
+ @par Revision Reference:\r
+ This Protocol is introduced in UEFI Specification 2.7\r
+\r
+**/\r
+\r
+#ifndef __EFI_HTTP_BOOT_CALLBACK_H__\r
+#define __EFI_HTTP_BOOT_CALLBACK_H__\r
+\r
+#define EFI_HTTP_BOOT_CALLBACK_PROTOCOL_GUID \\r
+ { \\r
+ 0xba23b311, 0x343d, 0x11e6, {0x91, 0x85, 0x58, 0x20, 0xb1, 0xd6, 0x52, 0x99} \\r
+ }\r
+\r
+typedef struct _EFI_HTTP_BOOT_CALLBACK_PROTOCOL EFI_HTTP_BOOT_CALLBACK_PROTOCOL;\r
+\r
+///\r
+/// EFI_HTTP_BOOT_CALLBACK_DATA_TYPE\r
+///\r
+typedef enum {\r
+ ///\r
+ /// Data points to a DHCP4 packet which is about to transmit or has received.\r
+ ///\r
+ HttpBootDhcp4,\r
+ ///\r
+ /// Data points to a DHCP6 packet which is about to be transmit or has received.\r
+ ///\r
+ HttpBootDhcp6,\r
+ ///\r
+ /// Data points to an EFI_HTTP_MESSAGE structure, whichcontians a HTTP request message\r
+ /// to be transmitted.\r
+ ///\r
+ HttpBootHttpRequest,\r
+ ///\r
+ /// Data points to an EFI_HTTP_MESSAGE structure, which contians a received HTTP \r
+ /// response message.\r
+ ///\r
+ HttpBootHttpResponse,\r
+ ///\r
+ /// Part of the entity body has been received from the HTTP server. Data points to the\r
+ /// buffer of the entity body data.\r
+ ///\r
+ HttpBootHttpEntityBody,\r
+ HttpBootTypeMax\r
+} EFI_HTTP_BOOT_CALLBACK_DATA_TYPE;\r
+\r
+/**\r
+ Callback function that is invoked when the HTTP Boot driver is about to transmit or has received a\r
+ packet.\r
+\r
+ This function is invoked when the HTTP Boot driver is about to transmit or has received packet.\r
+ Parameters DataType and Received specify the type of event and the format of the buffer pointed\r
+ to by Data. Due to the polling nature of UEFI device drivers, this callback function should not\r
+ execute for more than 5 ms.\r
+ The returned status code determines the behavior of the HTTP Boot driver.\r
+\r
+ @param[in] This Pointer to the EFI_HTTP_BOOT_CALLBACK_PROTOCOL instance.\r
+ @param[in] DataType The event that occurs in the current state.\r
+ @param[in] Received TRUE if the callback is being invoked due to a receive event.\r
+ FALSE if the callback is being invoked due to a transmit event.\r
+ @param[in] DataLength The length in bytes of the buffer pointed to by Data.\r
+ @param[in] Data A pointer to the buffer of data, the data type is specified by\r
+ DataType.\r
+ \r
+ @retval EFI_SUCCESS Tells the HTTP Boot driver to continue the HTTP Boot process.\r
+ @retval EFI_ABORTED Tells the HTTP Boot driver to abort the current HTTP Boot process.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI * EFI_HTTP_BOOT_CALLBACK) (\r
+ IN EFI_HTTP_BOOT_CALLBACK_PROTOCOL *This,\r
+ IN EFI_HTTP_BOOT_CALLBACK_DATA_TYPE DataType,\r
+ IN BOOLEAN Received,\r
+ IN UINT32 DataLength,\r
+ IN VOID *Data OPTIONAL\r
+ );\r
+\r
+///\r
+/// EFI HTTP Boot Callback Protocol is invoked when the HTTP Boot driver is about to transmit or \r
+/// has received a packet. The EFI HTTP Boot Callback Protocol must be installed on the same handle\r
+/// as the Load File Protocol for the HTTP Boot.\r
+///\r
+struct _EFI_HTTP_BOOT_CALLBACK_PROTOCOL {\r
+ EFI_HTTP_BOOT_CALLBACK Callback;\r
+};\r
+\r
+extern EFI_GUID gEfiHttpBootCallbackProtocolGuid;\r
+\r
+#endif\r
# This Package provides all definitions, library classes and libraries instances.\r
#\r
# It also provides the definitions(including PPIs/PROTOCOLs/GUIDs) of\r
-# EFI1.10/UEFI2.6/PI1.4 and some Industry Standards.\r
+# EFI1.10/UEFI2.7/PI1.4 and some Industry Standards.\r
#\r
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
## Include/Protocol/UfsDeviceConfig.h\r
gEfiUfsDeviceConfigProtocolGuid = { 0xb81bfab0, 0xeb3, 0x4cf9, { 0x84, 0x65, 0x7f, 0xa9, 0x86, 0x36, 0x16, 0x64 }}\r
\r
+ ## Include/Protocol/HttpBootCallback.h\r
+ gEfiHttpBootCallbackProtocolGuid = {0xba23b311, 0x343d, 0x11e6, {0x91, 0x85, 0x58, 0x20, 0xb1, 0xd6, 0x52, 0x99}}\r
+\r
#\r
# Protocols defined in Shell2.0\r
#\r