2 This file defines the EFI HTTP Boot Callback Protocol interface.
4 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 @par Revision Reference:
14 This Protocol is introduced in UEFI Specification 2.7
18 #ifndef __EFI_HTTP_BOOT_CALLBACK_H__
19 #define __EFI_HTTP_BOOT_CALLBACK_H__
21 #define EFI_HTTP_BOOT_CALLBACK_PROTOCOL_GUID \
23 0xba23b311, 0x343d, 0x11e6, {0x91, 0x85, 0x58, 0x20, 0xb1, 0xd6, 0x52, 0x99} \
26 typedef struct _EFI_HTTP_BOOT_CALLBACK_PROTOCOL EFI_HTTP_BOOT_CALLBACK_PROTOCOL
;
29 /// EFI_HTTP_BOOT_CALLBACK_DATA_TYPE
33 /// Data points to a DHCP4 packet which is about to transmit or has received.
37 /// Data points to a DHCP6 packet which is about to be transmit or has received.
41 /// Data points to an EFI_HTTP_MESSAGE structure, whichcontians a HTTP request message
42 /// to be transmitted.
46 /// Data points to an EFI_HTTP_MESSAGE structure, which contians a received HTTP
51 /// Part of the entity body has been received from the HTTP server. Data points to the
52 /// buffer of the entity body data.
54 HttpBootHttpEntityBody
,
56 } EFI_HTTP_BOOT_CALLBACK_DATA_TYPE
;
59 Callback function that is invoked when the HTTP Boot driver is about to transmit or has received a
62 This function is invoked when the HTTP Boot driver is about to transmit or has received packet.
63 Parameters DataType and Received specify the type of event and the format of the buffer pointed
64 to by Data. Due to the polling nature of UEFI device drivers, this callback function should not
65 execute for more than 5 ms.
66 The returned status code determines the behavior of the HTTP Boot driver.
68 @param[in] This Pointer to the EFI_HTTP_BOOT_CALLBACK_PROTOCOL instance.
69 @param[in] DataType The event that occurs in the current state.
70 @param[in] Received TRUE if the callback is being invoked due to a receive event.
71 FALSE if the callback is being invoked due to a transmit event.
72 @param[in] DataLength The length in bytes of the buffer pointed to by Data.
73 @param[in] Data A pointer to the buffer of data, the data type is specified by
76 @retval EFI_SUCCESS Tells the HTTP Boot driver to continue the HTTP Boot process.
77 @retval EFI_ABORTED Tells the HTTP Boot driver to abort the current HTTP Boot process.
81 (EFIAPI
* EFI_HTTP_BOOT_CALLBACK
) (
82 IN EFI_HTTP_BOOT_CALLBACK_PROTOCOL
*This
,
83 IN EFI_HTTP_BOOT_CALLBACK_DATA_TYPE DataType
,
86 IN VOID
*Data OPTIONAL
90 /// EFI HTTP Boot Callback Protocol is invoked when the HTTP Boot driver is about to transmit or
91 /// has received a packet. The EFI HTTP Boot Callback Protocol must be installed on the same handle
92 /// as the Load File Protocol for the HTTP Boot.
94 struct _EFI_HTTP_BOOT_CALLBACK_PROTOCOL
{
95 EFI_HTTP_BOOT_CALLBACK Callback
;
98 extern EFI_GUID gEfiHttpBootCallbackProtocolGuid
;