]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/PxeBaseCodeCallBack.h
Add the detailed descriptions for the structure data member in these protocol.
[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
992f22b9
LG
28///\r
29/// UEFI Revision Number Definition\r
30///\r
a6508c05 31#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_REVISION 0x00010000\r
f1004231 32\r
992f22b9
LG
33///\r
34/// EFI 1.1 Revision Number defintion\r
35///\r
a6508c05 36#define EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION \\r
37 EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_REVISION\r
d1f95000 38\r
99e8ed21 39///\r
992f22b9 40/// UEFI Protocol name\r
99e8ed21 41///\r
d1f95000 42typedef struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL;\r
43\r
99e8ed21 44///\r
992f22b9 45/// EFI1.1 Protocol name\r
99e8ed21 46/// \r
a6508c05 47typedef EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK;\r
48\r
9319d2c2
LG
49///\r
50/// Event type list for PXE Base Code Protocol function\r
51///\r
d1f95000 52typedef enum {\r
53 EFI_PXE_BASE_CODE_FUNCTION_FIRST,\r
54 EFI_PXE_BASE_CODE_FUNCTION_DHCP,\r
55 EFI_PXE_BASE_CODE_FUNCTION_DISCOVER,\r
56 EFI_PXE_BASE_CODE_FUNCTION_MTFTP,\r
57 EFI_PXE_BASE_CODE_FUNCTION_UDP_WRITE,\r
58 EFI_PXE_BASE_CODE_FUNCTION_UDP_READ,\r
59 EFI_PXE_BASE_CODE_FUNCTION_ARP,\r
60 EFI_PXE_BASE_CODE_FUNCTION_IGMP,\r
61 EFI_PXE_BASE_CODE_PXE_FUNCTION_LAST\r
62} EFI_PXE_BASE_CODE_FUNCTION;\r
63\r
9319d2c2
LG
64///\r
65/// Callback status type\r
66///\r
d1f95000 67typedef enum {\r
68 EFI_PXE_BASE_CODE_CALLBACK_STATUS_FIRST,\r
69 EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE,\r
70 EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT,\r
71 EFI_PXE_BASE_CODE_CALLBACK_STATUS_LAST\r
72} EFI_PXE_BASE_CODE_CALLBACK_STATUS;\r
73\r
74/** \r
75 Callback function that is invoked when the PXE Base Code Protocol is about to transmit, has\r
76 received, or is waiting to receive a packet. \r
77 \r
78 @param This Pointer to the EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL instance.\r
79 @param Function The PXE Base Code Protocol function that is waiting for an event. \r
80 @param Received TRUE if the callback is being invoked due to a receive event. FALSE if\r
81 the callback is being invoked due to a transmit event. \r
82 @param PacketLen The length, in bytes, of Packet. This field will have a value of zero if\r
83 this is a wait for receive event. \r
84 @param Packet If Received is TRUE, a pointer to the packet that was just received;\r
85 otherwise a pointer to the packet that is about to be transmitted. \r
86 \r
87 @retval EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE if Function specifies a continue operation \r
88 @retval EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT if Function specifies an abort operation\r
89 \r
90**/\r
91typedef \r
92EFI_PXE_BASE_CODE_CALLBACK_STATUS \r
93(EFIAPI *EFI_PXE_CALLBACK)(\r
94 IN EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL *This,\r
95 IN EFI_PXE_BASE_CODE_FUNCTION Function,\r
96 IN BOOLEAN Received,\r
97 IN UINT32 PacketLen,\r
98 IN EFI_PXE_BASE_CODE_PACKET *Packet OPTIONAL\r
99 );\r
100\r
44717a39 101///\r
102/// Protocol that is invoked when the PXE Base Code Protocol is about \r
103/// to transmit, has received, or is waiting to receive a packet.\r
104///\r
d1f95000 105struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL {\r
1f08a159 106 ///\r
107 /// The revision of the EFI_PXE_BASE_CODE_PROTOCOL. All future revisions must \r
108 /// be backwards compatible. If a future version is not backwards compatible \r
109 /// it is not the same GUID.\r
110 ///\r
d1f95000 111 UINT64 Revision;\r
112 EFI_PXE_CALLBACK Callback;\r
113};\r
114\r
115extern EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid;\r
116\r
117#endif \r
118\r