2 EFI PXE Base Code CallBack Protocol
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. 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 Module Name: PxeBaseCodeCallBack.h
17 #ifndef _PXE_BASE_CODE_CALLBACK_H_
18 #define _PXE_BASE_CODE_CALLBACK_H_
21 // Call Back Definitions
23 #define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_GUID \
25 0x245dca21, 0xfb7b, 0x11d3, {0x8f, 0x01, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
31 #define EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION 0x00010000
32 #define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_REVISION \
33 EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION
36 // Protocol definition
38 typedef struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL
;
41 EFI_PXE_BASE_CODE_FUNCTION_FIRST
,
42 EFI_PXE_BASE_CODE_FUNCTION_DHCP
,
43 EFI_PXE_BASE_CODE_FUNCTION_DISCOVER
,
44 EFI_PXE_BASE_CODE_FUNCTION_MTFTP
,
45 EFI_PXE_BASE_CODE_FUNCTION_UDP_WRITE
,
46 EFI_PXE_BASE_CODE_FUNCTION_UDP_READ
,
47 EFI_PXE_BASE_CODE_FUNCTION_ARP
,
48 EFI_PXE_BASE_CODE_FUNCTION_IGMP
,
49 EFI_PXE_BASE_CODE_PXE_FUNCTION_LAST
50 } EFI_PXE_BASE_CODE_FUNCTION
;
53 EFI_PXE_BASE_CODE_CALLBACK_STATUS_FIRST
,
54 EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE
,
55 EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT
,
56 EFI_PXE_BASE_CODE_CALLBACK_STATUS_LAST
57 } EFI_PXE_BASE_CODE_CALLBACK_STATUS
;
60 Callback function that is invoked when the PXE Base Code Protocol is about to transmit, has
61 received, or is waiting to receive a packet.
63 @param This Pointer to the EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL instance.
64 @param Function The PXE Base Code Protocol function that is waiting for an event.
65 @param Received TRUE if the callback is being invoked due to a receive event. FALSE if
66 the callback is being invoked due to a transmit event.
67 @param PacketLen The length, in bytes, of Packet. This field will have a value of zero if
68 this is a wait for receive event.
69 @param Packet If Received is TRUE, a pointer to the packet that was just received;
70 otherwise a pointer to the packet that is about to be transmitted.
72 @retval EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE if Function specifies a continue operation
73 @retval EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT if Function specifies an abort operation
77 EFI_PXE_BASE_CODE_CALLBACK_STATUS
78 (EFIAPI
*EFI_PXE_CALLBACK
)(
79 IN EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL
*This
,
80 IN EFI_PXE_BASE_CODE_FUNCTION Function
,
83 IN EFI_PXE_BASE_CODE_PACKET
*Packet OPTIONAL
86 struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL
{
88 EFI_PXE_CALLBACK Callback
;
91 extern EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid
;