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