]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/PxeBaseCodeCallBack.h
Updated *.dec files and .h files to support correct include path scheme
[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 **/
14
15 #ifndef _PXE_BASE_CODE_CALLBACK_H_
16 #define _PXE_BASE_CODE_CALLBACK_H_
17
18 //
19 // Call Back Definitions
20 //
21 #define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_GUID \
22 { \
23 0x245dca21, 0xfb7b, 0x11d3, {0x8f, 0x01, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
24 }
25
26 //
27 // Revision Number
28 //
29 #define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_REVISION 0x00010000
30 #define EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION \
31 EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_REVISION
32
33 //
34 // Protocol definition
35 //
36 typedef struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL;
37
38 //
39 // Protocol defined in EFI1.1.
40 //
41 typedef EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK;
42
43 typedef enum {
44 EFI_PXE_BASE_CODE_FUNCTION_FIRST,
45 EFI_PXE_BASE_CODE_FUNCTION_DHCP,
46 EFI_PXE_BASE_CODE_FUNCTION_DISCOVER,
47 EFI_PXE_BASE_CODE_FUNCTION_MTFTP,
48 EFI_PXE_BASE_CODE_FUNCTION_UDP_WRITE,
49 EFI_PXE_BASE_CODE_FUNCTION_UDP_READ,
50 EFI_PXE_BASE_CODE_FUNCTION_ARP,
51 EFI_PXE_BASE_CODE_FUNCTION_IGMP,
52 EFI_PXE_BASE_CODE_PXE_FUNCTION_LAST
53 } EFI_PXE_BASE_CODE_FUNCTION;
54
55 typedef enum {
56 EFI_PXE_BASE_CODE_CALLBACK_STATUS_FIRST,
57 EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE,
58 EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT,
59 EFI_PXE_BASE_CODE_CALLBACK_STATUS_LAST
60 } EFI_PXE_BASE_CODE_CALLBACK_STATUS;
61
62 /**
63 Callback function that is invoked when the PXE Base Code Protocol is about to transmit, has
64 received, or is waiting to receive a packet.
65
66 @param This Pointer to the EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL instance.
67 @param Function The PXE Base Code Protocol function that is waiting for an event.
68 @param Received TRUE if the callback is being invoked due to a receive event. FALSE if
69 the callback is being invoked due to a transmit event.
70 @param PacketLen The length, in bytes, of Packet. This field will have a value of zero if
71 this is a wait for receive event.
72 @param Packet If Received is TRUE, a pointer to the packet that was just received;
73 otherwise a pointer to the packet that is about to be transmitted.
74
75 @retval EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE if Function specifies a continue operation
76 @retval EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT if Function specifies an abort operation
77
78 **/
79 typedef
80 EFI_PXE_BASE_CODE_CALLBACK_STATUS
81 (EFIAPI *EFI_PXE_CALLBACK)(
82 IN EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL *This,
83 IN EFI_PXE_BASE_CODE_FUNCTION Function,
84 IN BOOLEAN Received,
85 IN UINT32 PacketLen,
86 IN EFI_PXE_BASE_CODE_PACKET *Packet OPTIONAL
87 );
88
89 struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL {
90 UINT64 Revision;
91 EFI_PXE_CALLBACK Callback;
92 };
93
94 extern EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid;
95
96 #endif
97