]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/PxeBaseCodeCallBack.h
Formalize comments for Protocols and PPIs.
[mirror_edk2.git] / MdePkg / Include / Protocol / PxeBaseCodeCallBack.h
CommitLineData
d1f95000 1/** @file\r
4ca9b6c4
LG
2 EFI PXE Base Code CallBack Protocol is as defined in UEFI specification.\r
3 It is invoked when the PXE Base Code Protocol is about to transmit, has received, \r
4 or is waiting to receive a packet.\r
d1f95000 5\r
4ca9b6c4 6 Copyright (c) 2006 - 2008, Intel Corporation \r
d1f95000 7 All rights reserved. This program and the accompanying materials \r
8 are licensed and made available under the terms and conditions of the BSD License \r
9 which accompanies this distribution. The full text of the license may be found at \r
10 http://opensource.org/licenses/bsd-license.php \r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
14\r
d1f95000 15**/\r
16\r
17#ifndef _PXE_BASE_CODE_CALLBACK_H_\r
18#define _PXE_BASE_CODE_CALLBACK_H_\r
19\r
99e8ed21 20///\r
21/// Call Back Definitions\r
22///\r
d1f95000 23#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_GUID \\r
24 { \\r
25 0x245dca21, 0xfb7b, 0x11d3, {0x8f, 0x01, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \\r
26 }\r
27\r
28//\r
29// Revision Number\r
30//\r
a6508c05 31#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_REVISION 0x00010000\r
32#define EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION \\r
33 EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_REVISION\r
d1f95000 34\r
99e8ed21 35///\r
36/// Protocol definition\r
37///\r
d1f95000 38typedef struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL;\r
39\r
99e8ed21 40///\r
41/// Protocol defined in EFI1.1.\r
42/// \r
a6508c05 43typedef EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK;\r
44\r
d1f95000 45typedef enum {\r
46 EFI_PXE_BASE_CODE_FUNCTION_FIRST,\r
47 EFI_PXE_BASE_CODE_FUNCTION_DHCP,\r
48 EFI_PXE_BASE_CODE_FUNCTION_DISCOVER,\r
49 EFI_PXE_BASE_CODE_FUNCTION_MTFTP,\r
50 EFI_PXE_BASE_CODE_FUNCTION_UDP_WRITE,\r
51 EFI_PXE_BASE_CODE_FUNCTION_UDP_READ,\r
52 EFI_PXE_BASE_CODE_FUNCTION_ARP,\r
53 EFI_PXE_BASE_CODE_FUNCTION_IGMP,\r
54 EFI_PXE_BASE_CODE_PXE_FUNCTION_LAST\r
55} EFI_PXE_BASE_CODE_FUNCTION;\r
56\r
57typedef enum {\r
58 EFI_PXE_BASE_CODE_CALLBACK_STATUS_FIRST,\r
59 EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE,\r
60 EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT,\r
61 EFI_PXE_BASE_CODE_CALLBACK_STATUS_LAST\r
62} EFI_PXE_BASE_CODE_CALLBACK_STATUS;\r
63\r
64/** \r
65 Callback function that is invoked when the PXE Base Code Protocol is about to transmit, has\r
66 received, or is waiting to receive a packet. \r
67 \r
68 @param This Pointer to the EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL instance.\r
69 @param Function The PXE Base Code Protocol function that is waiting for an event. \r
70 @param Received TRUE if the callback is being invoked due to a receive event. FALSE if\r
71 the callback is being invoked due to a transmit event. \r
72 @param PacketLen The length, in bytes, of Packet. This field will have a value of zero if\r
73 this is a wait for receive event. \r
74 @param Packet If Received is TRUE, a pointer to the packet that was just received;\r
75 otherwise a pointer to the packet that is about to be transmitted. \r
76 \r
77 @retval EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE if Function specifies a continue operation \r
78 @retval EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT if Function specifies an abort operation\r
79 \r
80**/\r
81typedef \r
82EFI_PXE_BASE_CODE_CALLBACK_STATUS \r
83(EFIAPI *EFI_PXE_CALLBACK)(\r
84 IN EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL *This,\r
85 IN EFI_PXE_BASE_CODE_FUNCTION Function,\r
86 IN BOOLEAN Received,\r
87 IN UINT32 PacketLen,\r
88 IN EFI_PXE_BASE_CODE_PACKET *Packet OPTIONAL\r
89 );\r
90\r
44717a39 91///\r
92/// Protocol that is invoked when the PXE Base Code Protocol is about \r
93/// to transmit, has received, or is waiting to receive a packet.\r
94///\r
d1f95000 95struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL {\r
1f08a159 96 ///\r
97 /// The revision of the EFI_PXE_BASE_CODE_PROTOCOL. All future revisions must \r
98 /// be backwards compatible. If a future version is not backwards compatible \r
99 /// it is not the same GUID.\r
100 ///\r
d1f95000 101 UINT64 Revision;\r
102 EFI_PXE_CALLBACK Callback;\r
103};\r
104\r
105extern EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid;\r
106\r
107#endif \r
108\r