]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/PxeBaseCodeCallBack.h
automagically convert ELF to PE/COFF (i386 only)
[mirror_edk2.git] / MdePkg / Include / Protocol / PxeBaseCodeCallBack.h
1 /** @file
2 EFI PXE Base Code CallBack Protocol
3
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
9
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.
12
13 Module Name: PxeBaseCodeCallBack.h
14
15 **/
16
17 #ifndef _PXE_BASE_CODE_CALLBACK_H_
18 #define _PXE_BASE_CODE_CALLBACK_H_
19
20 //
21 // Call Back Definitions
22 //
23 #define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_GUID \
24 { \
25 0x245dca21, 0xfb7b, 0x11d3, {0x8f, 0x01, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
26 }
27
28 //
29 // Revision Number
30 //
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
34
35 //
36 // Protocol definition
37 //
38 typedef struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL;
39
40 typedef enum {
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;
51
52 typedef enum {
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;
58
59 /**
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.
62
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.
71
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
74
75 **/
76 typedef
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,
81 IN BOOLEAN Received,
82 IN UINT32 PacketLen,
83 IN EFI_PXE_BASE_CODE_PACKET *Packet OPTIONAL
84 );
85
86 struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL {
87 UINT64 Revision;
88 EFI_PXE_CALLBACK Callback;
89 };
90
91 extern EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid;
92
93 #endif
94