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